| streamtuner Developers Manual |
|---|
STCategory — a structure for defining a category.
struct STCategory; gboolean (*STCategoryURLCallback) (STCategory *category); STCategory* st_category_new (void); void st_category_free (STCategory *category);
struct STCategory {
char *name;
char *label;
char *url_postfix;
STCategoryURLCallback url_cb;
};
| char *name | the category internal name. |
| char *label | the category human-readable name. |
| char *url_postfix | the category URL postfix. |
| STCategoryURLCallback url_cb | a function which will be called when the category is about to be reloaded. |
gboolean (*STCategoryURLCallback) (STCategory *category);
Specifies the type of function to be stored in the url_cb member of the STCategory structure. The function will be called before reloading category, and may update its label and url_postfix members.
| category : | the category which is about to be reloaded. |
| Returns : | the function should return FALSE if the reload should be cancelled. |
STCategory* st_category_new (void);
Creates a new STCategory. The structure members are initialized to NULL, and at least the name and label members must be filled manually.
| Returns : | a new STCategory. |
void st_category_free (STCategory *category);
Destroys category (g_free() will be called on the name, label and url_postfix members).
| category : | the STCategory to destroy. |
| << st-action | st-dialog >> |