## e-categories

e-categories —

## Synopsis

    GList*      e_categories_get_list           (void);
    void        e_categories_add                (const char *category,
                                                 const char *color,
                                                 const char *icon_file,
                                                 gboolean searchable);
    void        e_categories_remove             (const char *category);
    gboolean    e_categories_exist              (const char *category);
    const char* e_categories_get_color_for      (const char *category);
    void        e_categories_set_color_for      (const char *category,
                                                 const char *color);
    const char* e_categories_get_icon_file_for  (const char *category);
    void        e_categories_set_icon_file_for  (const char *category,
                                                 const char *icon_file);
    gboolean    e_categories_is_searchable      (const char *category);

## Description

## Details

### e_categories_get_list ()

    GList*      e_categories_get_list           (void);

Returns a list of all the category names currently configured.

Returns : | a GList containing the names of the categories. The list should be freed using g_list_free, but the names of the categories should not be touched at all, they are internal strings.

### e_categories_add ()

    void        e_categories_add                (const char *category,
                                                 const char *color,
                                                 const char *icon_file,
                                                 gboolean searchable);

Adds a new category, with its corresponding color and icon, to the configuration database.

`category` : | name of category to add.
`color` : | associated color.
`icon_file` : | full path of the icon associated to the category.
`searchable` : | whether the category can be used for searching in the GUI.

### e_categories_remove ()

    void        e_categories_remove             (const char *category);

Removes the given category from the configuration.

`category` : | category to be removed.

### e_categories_exist ()

    gboolean    e_categories_exist              (const char *category);

Checks whether the given category is available in the configuration.

`category` : | category to be searched.
Returns : | `TRUE` if the category is available, `FALSE` otherwise.

### e_categories_get_color_for ()

    const char* e_categories_get_color_for      (const char *category);

Gets the color associated with the given category.

`category` : | category to retrieve the color for.
Returns : | a string representation of the color.

### e_categories_set_color_for ()

    void        e_categories_set_color_for      (const char *category,
                                                 const char *color);

Sets the color associated with the given category.

`category` : | category to set the color for.
`color` : | X color.

### e_categories_get_icon_file_for ()

    const char* e_categories_get_icon_file_for  (const char *category);

Gets the icon file associated with the given category.

`category` : | category to retrieve the icon file for.
Returns : | a string representation of the color.

### e_categories_set_icon_file_for ()

    void        e_categories_set_icon_file_for  (const char *category,
                                                 const char *icon_file);

Sets the icon file associated with the given category.

`category` : | category to set the icon file for.
`icon_file` : |

### e_categories_is_searchable ()

    gboolean    e_categories_is_searchable      (const char *category);

Gets whether the given calendar is to be used for searches in the GUI.

Return value; `TRUE`% if the category is searchable, `FALSE`% if not.

`category` : | category name.
Returns : |