AsCategory 3 APPSTREAM Library
AsCategory Representation of a XDG category

## Functions

AsCategory * | as_category_new ()
AsCategory * | as_category_construct ()
void | as_category_complete ()
const gchar * | as_category_get_directory ()
const gchar * | as_category_get_name ()
void | as_category_set_icon ()
void | as_category_set_name ()
const gchar * | as_category_get_summary ()
const gchar * | as_category_get_icon ()
void | as_category_add_subcategory ()
void | as_category_remove_subcategory ()
gboolean | as_category_has_subcategory ()
void | as_category_set_directory ()
GList * | as_category_get_included ()
GList * | as_category_get_excluded ()
gint | as_category_get_level ()
void | as_category_set_level ()
GList * | as_category_get_subcategories ()

## Properties

gchar * | directory | Read / Write
gpointer | excluded | Read
gchar * | icon | Read / Write
gpointer | included | Read
gint | level | Read / Write
gchar * | name | Read / Write
gpointer | subcategories | Read
gchar * | summary | Read

## Object Hierarchy

        GObject
        ╰── AsCategory

## Includes

    #include <appstream.h>

## Description

This object represents an XDG category, as defined at: http://standards.freedesktop.org/menu-spec/menu-spec-1.0.htmlcategory-registry

The AsCategory object does not support all aspects of a menu. It's main purpose is to be used in software-centers to show information about application-groups, which are use to thematically group applications.

You can use AsMenuParser to get a set of supported default categories.

See also: AsMenuParser

## Functions

### as_category_new ()

    AsCategory *
    as_category_new (void);

Creates a new AsCategory.

#### Returns

a new AsCategory.

[transfer full]

as_category_new

### as_category_construct ()

    AsCategory *
    as_category_construct (GType object_type);

Construct a new AsCategory.

#### Returns

a new AsCategory.

[transfer full]

as_category_construct

### as_category_complete ()

    void
    as_category_complete (AsCategory *self);

as_category_complete

### as_category_get_directory ()

    const gchar *
    as_category_get_directory (AsCategory *self);

as_category_get_directory

### as_category_get_name ()

    const gchar *
    as_category_get_name (AsCategory *self);

as_category_get_name

### as_category_set_icon ()

    void
    as_category_set_icon (AsCategory *self,
                          const gchar *value);

as_category_set_icon

### as_category_set_name ()

    void
    as_category_set_name (AsCategory *self,
                          const gchar *value);

as_category_set_name

### as_category_get_summary ()

    const gchar *
    as_category_get_summary (AsCategory *self);

as_category_get_summary

### as_category_get_icon ()

    const gchar *
    as_category_get_icon (AsCategory *self);

as_category_get_icon

### as_category_add_subcategory ()

    void
    as_category_add_subcategory (AsCategory *self,
                                 AsCategory *cat);

as_category_add_subcategory

### as_category_remove_subcategory ()

    void
    as_category_remove_subcategory (AsCategory *self,
                                    AsCategory *cat);

as_category_remove_subcategory

### as_category_has_subcategory ()

    gboolean
    as_category_has_subcategory (AsCategory *self);

Test for sub-categories.

#### Returns

TRUE if this category has any subcategory

as_category_has_subcategory

### as_category_set_directory ()

    void
    as_category_set_directory (AsCategory *self,
                               const gchar *value);

as_category_set_directory

### as_category_get_included ()

    GList *
    as_category_get_included (AsCategory *self);

#### Returns

an array of category names.

[element-type utf8][transfer none]

as_category_get_included

### as_category_get_excluded ()

    GList *
    as_category_get_excluded (AsCategory *self);

#### Returns

an array of category names.

[element-type utf8][transfer none]

as_category_get_excluded

### as_category_get_level ()

    gint
    as_category_get_level (AsCategory *self);

as_category_get_level

### as_category_set_level ()

    void
    as_category_set_level (AsCategory *self,
                           gint value);

as_category_set_level

### as_category_get_subcategories ()

    GList *
    as_category_get_subcategories (AsCategory *self);

#### Returns

an array of category names.

[element-type utf8][transfer none]

as_category_get_subcategories

## Types and Values

## Property Details

### The `“directory”` property

      “directory”                gchar *

directory.

Flags: Read / Write

Default value: NULL

AsCategory:directory

### The `“excluded”` property

      “excluded”                 gpointer

excluded.

Flags: Read

AsCategory:excluded

### The `“icon”` property

      “icon”                     gchar *

icon.

Flags: Read / Write

Default value: NULL

AsCategory:icon

### The `“included”` property

      “included”                 gpointer

included.

Flags: Read

AsCategory:included

### The `“level”` property

      “level”                    gint

level.

Flags: Read / Write

Default value: 0

AsCategory:level

### The `“name”` property

      “name”                     gchar *

name.

Flags: Read / Write

Default value: NULL

AsCategory:name

### The `“subcategories”` property

      “subcategories”            gpointer

subcategories.

Flags: Read

AsCategory:subcategories

### The `“summary”` property

      “summary”                  gchar *

summary.

Flags: Read

Default value: NULL

AsCategory:summary