| streamtuner Developers Manual |
|---|
st-action — functions for defining and executing actions.
void st_action_register (const char *id, const char *label, const char *command); gboolean st_action_run (const char *id, const char *uri, GError **err);
These functions provide support for defining actions which can be customized from the streamtuner preferences, and for running them with an URI parameter.
void st_action_register (const char *id,
const char *label,
const char *command);Registers a new action. The action will appear in the applications page of the streamtuner preferences, and the user will be able to modify its associated command.
| id : | an unique id for the action. |
| label : | a human-readable label for the action. |
| command : | the default command for the action, or NULL. |
gboolean st_action_run (const char *id,
const char *uri,
GError **err);Runs action id with uri as parameter. The action must have been previously registered with st_action_register().
| id : | the id of the action to run. |
| uri : | the URI to run the action on. |
| err : | a location to report errors, or NULL. |
| Returns : | TRUE on success, FALSE on failure. |
| << API Reference | STCategory >> |