![]() |
![]() |
![]() |
LibAppStream Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#define APPSTREAM_TYPE_CATEGORY void appstream_category_add_subcategory (AppstreamCategory *self
,AppstreamCategory *cat
); void appstream_category_remove_subcategory (AppstreamCategory *self
,AppstreamCategory *cat
); gboolean appstream_category_has_subcategory (AppstreamCategory *self
); AppstreamCategory * appstream_category_new (void
); const gchar * appstream_category_get_name (AppstreamCategory *self
); const gchar * appstream_category_get_summary (AppstreamCategory *self
); const gchar * appstream_category_get_icon (AppstreamCategory *self
); const gchar * appstream_category_get_directory (AppstreamCategory *self
); GList * appstream_category_get_included (AppstreamCategory *self
); GList * appstream_category_get_excluded (AppstreamCategory *self
); gint appstream_category_get_level (AppstreamCategory *self
); GList * appstream_category_get_subcategories (AppstreamCategory *self
); struct AppstreamCategory; struct AppstreamCategoryClass; #define APPSTREAM_TYPE_MENU_PARSER GList * appstream_menu_parser_parse (AppstreamMenuParser *self
); AppstreamMenuParser * appstream_menu_parser_new (void
); AppstreamMenuParser * appstream_menu_parser_new_from_file (const gchar *menu_file
); gboolean appstream_menu_parser_get_update_category_data (AppstreamMenuParser *self
); void appstream_menu_parser_set_update_category_data (AppstreamMenuParser *self
,gboolean value
); struct AppstreamMenuParser; gpointer appstream_menu_parser_ref (gpointer instance
); void appstream_menu_parser_unref (gpointer instance
); GParamSpec * appstream_param_spec_menu_parser (const gchar *name
,const gchar *nick
,const gchar *blurb
,GType object_type
,GParamFlags flags
); void appstream_value_set_menu_parser (GValue *value
,gpointer v_object
); gpointer appstream_value_get_menu_parser (const GValue *value
); void appstream_value_take_menu_parser (GValue *value
,gpointer v_object
); struct AppstreamMenuParserClass; GList * appstream_get_system_categories (void
);
#define APPSTREAM_TYPE_CATEGORY (appstream_category_get_type ())
The type for AppstreamCategory.
void appstream_category_add_subcategory (AppstreamCategory *self
,AppstreamCategory *cat
);
|
the AppstreamCategory instance |
|
void appstream_category_remove_subcategory (AppstreamCategory *self
,AppstreamCategory *cat
);
|
the AppstreamCategory instance |
|
gboolean appstream_category_has_subcategory (AppstreamCategory *self
);
|
the AppstreamCategory instance |
Returns : |
TRUE if this category has any subcategory |
const gchar * appstream_category_get_name (AppstreamCategory *self
);
Get and return the current value of the "name" property.
|
the AppstreamCategory instance to query |
Returns : |
the value of the "name" property |
const gchar * appstream_category_get_summary (AppstreamCategory *self
);
Get and return the current value of the "summary" property.
|
the AppstreamCategory instance to query |
Returns : |
the value of the "summary" property |
const gchar * appstream_category_get_icon (AppstreamCategory *self
);
Get and return the current value of the "icon" property.
|
the AppstreamCategory instance to query |
Returns : |
the value of the "icon" property |
const gchar * appstream_category_get_directory (AppstreamCategory *self
);
Get and return the current value of the "directory" property.
|
the AppstreamCategory instance to query |
Returns : |
the value of the "directory" property |
GList * appstream_category_get_included (AppstreamCategory *self
);
Get and return the current value of the "included" property.
|
the AppstreamCategory instance to query |
Returns : |
the value of the "included" property |
GList * appstream_category_get_excluded (AppstreamCategory *self
);
Get and return the current value of the "excluded" property.
|
the AppstreamCategory instance to query |
Returns : |
the value of the "excluded" property |
gint appstream_category_get_level (AppstreamCategory *self
);
Get and return the current value of the "level" property.
|
the AppstreamCategory instance to query |
Returns : |
the value of the "level" property |
GList * appstream_category_get_subcategories
(AppstreamCategory *self
);
Get and return the current value of the "subcategories" property.
|
the AppstreamCategory instance to query |
Returns : |
the value of the "subcategories" property |
struct AppstreamCategory { GObject parent_instance; AppstreamCategoryPrivate * priv; };
Description of an XDG Menu category
struct AppstreamCategoryClass { GObjectClass parent_class; };
The class structure for APPSTREAM_TYPE_CATEGORY
. All the fields in this structure are private and should never be accessed directly.
GObjectClass |
the parent class structure |
#define APPSTREAM_TYPE_MENU_PARSER (appstream_menu_parser_get_type ())
The type for AppstreamMenuParser.
GList * appstream_menu_parser_parse (AppstreamMenuParser *self
);
Parse the menu file
|
the AppstreamMenuParser instance |
Returns : |
GList of Category objects found in the Menu, or NULL if there was an error |
AppstreamMenuParser * appstream_menu_parser_new (void
);
Create a new MenuParser for the generic AppStream categories list
AppstreamMenuParser * appstream_menu_parser_new_from_file
(const gchar *menu_file
);
Create a new MenuParser for an arbitrary menu file
|
gboolean appstream_menu_parser_get_update_category_data
(AppstreamMenuParser *self
);
Get and return the current value of the "update-category-data" property.
|
the AppstreamMenuParser instance to query |
Returns : |
the value of the "update-category-data" property |
void appstream_menu_parser_set_update_category_data (AppstreamMenuParser *self
,gboolean value
);
Set the value of the "update-category-data" property to value
.
|
the AppstreamMenuParser instance to modify |
|
the new value of the "update-category-data" property |
struct AppstreamMenuParser { GTypeInstance parent_instance; volatile int ref_count; AppstreamMenuParserPrivate * priv; };
Parser for XDG Menu files
gpointer appstream_menu_parser_ref (gpointer instance
);
Increases the reference count of object
.
|
a AppstreamMenuParser. |
Returns : |
the same object
|
void appstream_menu_parser_unref (gpointer instance
);
Decreases the reference count of object
. When its reference count drops to 0, the object is finalized (i.e. its memory is freed).
|
a AppstreamMenuParser. |
GParamSpec * appstream_param_spec_menu_parser (const gchar *name
,const gchar *nick
,const gchar *blurb
,GType object_type
,GParamFlags flags
);
Creates a new GParamSpecBoxed instance specifying a APPSTREAM_TYPE_MENU_PARSER
derived property.
See
for details on property names.
g_param_spec_internal()
|
canonical name of the property specified |
|
nick name for the property specified |
|
description of the property specified |
|
APPSTREAM_TYPE_MENU_PARSER derived type of this property |
|
flags for the property specified |
void appstream_value_set_menu_parser (GValue *value
,gpointer v_object
);
Set the contents of a APPSTREAM_TYPE_MENU_PARSER
derived GValue to v_object
.
appstream_value_set_menu_parser()
increases the reference count of v_object
(the GValue holds a reference to v_object
). If you do not wish to increase the reference count of the object (i.e. you wish to pass your current reference to the GValue because you no longer need it), use appstream_value_take_menu_parser()
instead.
It is important that your GValue holds a reference to v_object
(either its own, or one it has taken) to ensure that the object won't be destroyed while the GValue still exists).
|
a valid GValue of APPSTREAM_TYPE_MENU_PARSER derived type |
|
object value to be set |
gpointer appstream_value_get_menu_parser (const GValue *value
);
Get the contents of a APPSTREAM_TYPE_MENU_PARSER
derived GValue.
|
a valid GValue of APPSTREAM_TYPE_MENU_PARSER derived type |
Returns : |
object contents of value
|
void appstream_value_take_menu_parser (GValue *value
,gpointer v_object
);
Sets the contents of a APPSTREAM_TYPE_MENU_PARSER
derived GValue to v_object
and takes over the ownership of the callers reference to v_object
; the caller doesn't have to unref it any more (i.e. the reference count of the object is not increased).
If you want the GValue to hold its own reference to v_object
, use appstream_value_set_menu_parser()
instead.
|
a valid GValue of APPSTREAM_TYPE_MENU_PARSER derived type |
|
object value to be set |
struct AppstreamMenuParserClass { GTypeClass parent_class; void (*finalize) (AppstreamMenuParser *self); };
The class structure for APPSTREAM_TYPE_MENU_PARSER
. All the fields in this structure are private and should never be accessed directly.
GTypeClass |
the parent class structure |
GList * appstream_get_system_categories (void
);
Get a GList of the default AppStream categories
|
the (null) instance |