AsMenuParser 3 APPSTREAM Library
AsMenuParser Parser for XDG menu files designed for software-centers

## Functions

AsMenuParser * | as_menu_parser_new ()
AsMenuParser * | as_menu_parser_construct ()
AsMenuParser * | as_menu_parser_new_from_file ()
AsMenuParser * | as_menu_parser_construct_from_file ()
void | as_menu_parser_set_update_category_data ()
GList * | as_menu_parser_parse ()
gboolean | as_menu_parser_get_update_category_data ()
GList * | as_get_system_categories ()

## Properties

gboolean | update-category-data | Read / Write

## Object Hierarchy

        GObject
        ╰── AsMenuParser

## Includes

    #include <appstream.h>

## Description

This object parses an XDG menu file and returns a set of AsCategory objects which can be used by software-centers to group the applications they show. By default, it loads a common set of categories from an internal menu file. A custom menu file may be specified using the alternative class constructor.

See also: AsCategory

## Functions

### as_menu_parser_new ()

    AsMenuParser *
    as_menu_parser_new (void);

Creates a new AsMenuParser.

#### Returns

an AsMenuParser.

[transfer full]

as_menu_parser_new

### as_menu_parser_construct ()

    AsMenuParser *
    as_menu_parser_construct (GType object_type);

Create a new MenuParser for the generic AppStream categories list

#### Returns

an AsMenuParser.

[transfer full]

as_menu_parser_construct

### as_menu_parser_new_from_file ()

    AsMenuParser *
    as_menu_parser_new_from_file (const gchar *menu_file);

Creates a new AsMenuParser with a custom XDG menu file.

menu_file a custom XDG menu XML file

#### Returns

an AsMenuParser.

[transfer full]

as_menu_parser_new_from_file

### as_menu_parser_construct_from_file ()

    AsMenuParser *
    as_menu_parser_construct_from_file (GType object_type,
                                        const gchar *menu_file);

Create a new MenuParser for an arbitrary menu file

#### Returns

an AsMenuParser.

[transfer full]

as_menu_parser_construct_from_file

### as_menu_parser_set_update_category_data ()

    void
    as_menu_parser_set_update_category_data
                                   (AsMenuParser *self,
                                    gboolean value);

as_menu_parser_set_update_category_data

### as_menu_parser_parse ()

    GList *
    as_menu_parser_parse (AsMenuParser *self);

Parse the menu file

#### Returns

GList of AsCategory objects found in the menu, or NULL if there was an error.

[element-type AsCategory][transfer full]

as_menu_parser_parse

### as_menu_parser_get_update_category_data ()

    gboolean
    as_menu_parser_get_update_category_data
                                   (AsMenuParser *self);

#### Returns

as_menu_parser_get_update_category_data

### as_get_system_categories ()

    GList *
    as_get_system_categories (void);

Get a GList of the default AppStream categories

#### Returns

GList of AsCategory objects.

[element-type AsCategory][transfer full]

as_get_system_categories

## Types and Values

## Property Details

### The `“update-category-data”` property

      “update-category-data”     gboolean

update-category-data.

Flags: Read / Write

Default value: FALSE

AsMenuParser:update-category-data