| LibAppStream Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
AppstreamSearchQueryAppstreamSearchQuery — Class describing a query on the AppStream application database |
#define APPSTREAM_TYPE_SEARCH_QUERY gboolean appstream_search_query_get_search_all_categories (AppstreamSearchQuery *self); void appstream_search_query_set_search_all_categories (AppstreamSearchQuery *self); void appstream_search_query_set_categories_from_string (AppstreamSearchQuery *self,const gchar *categories_str); AppstreamSearchQuery * appstream_search_query_new (const gchar *term); const gchar * appstream_search_query_get_search_term (AppstreamSearchQuery *self); void appstream_search_query_set_search_term (AppstreamSearchQuery *self,const gchar *value); gchar ** appstream_search_query_get_categories (AppstreamSearchQuery *self,int *result_length1); void appstream_search_query_set_categories (AppstreamSearchQuery *self,gchar **value,int value_length1); struct AppstreamSearchQuery; struct AppstreamSearchQueryClass; #define APPSTREAM_TYPE_DATABASE gboolean appstream_database_open (AppstreamDatabase *self); gboolean appstream_database_db_exists (AppstreamDatabase *self); GPtrArray * appstream_database_get_all_applications (AppstreamDatabase *self); GPtrArray * appstream_database_find_applications (AppstreamDatabase *self,AppstreamSearchQuery *query); GPtrArray * appstream_database_find_applications_by_str (AppstreamDatabase *self,const gchar *search_str,const gchar *categories_str); void appstream_database_refresh (AppstreamDatabase *self,GAsyncReadyCallback _callback_,gpointer _user_data_); gboolean appstream_database_refresh_finish (AppstreamDatabase *self,GAsyncResult *_res_,GError **error); AppstreamDatabase * appstream_database_new (void); const gchar * appstream_database_get_database_path (AppstreamDatabase *self); struct AppstreamDatabase; struct AppstreamDatabaseClass;
#define APPSTREAM_TYPE_SEARCH_QUERY (appstream_search_query_get_type ())
The type for AppstreamSearchQuery.
gboolean appstream_search_query_get_search_all_categories
(AppstreamSearchQuery *self);
|
the AppstreamSearchQuery instance |
Returns : |
TRUE if we search in all categories |
void appstream_search_query_set_search_all_categories
(AppstreamSearchQuery *self);
Shortcut to set that we should search in all categories
|
the AppstreamSearchQuery instance |
void appstream_search_query_set_categories_from_string (AppstreamSearchQuery *self,const gchar *categories_str);
Set the categories list from a string
|
the AppstreamSearchQuery instance |
|
. Comma-separated list of category-names. [in] |
AppstreamSearchQuery * appstream_search_query_new (const gchar *term);
|
const gchar * appstream_search_query_get_search_term
(AppstreamSearchQuery *self);
Get and return the current value of the "search-term" property.
|
the AppstreamSearchQuery instance to query |
Returns : |
the value of the "search-term" property |
void appstream_search_query_set_search_term (AppstreamSearchQuery *self,const gchar *value);
Set the value of the "search-term" property to value.
|
the AppstreamSearchQuery instance to modify |
|
the new value of the "search-term" property |
gchar ** appstream_search_query_get_categories (AppstreamSearchQuery *self,int *result_length1);
Get and return the current value of the "categories" property.
|
the AppstreamSearchQuery instance to query |
Returns : |
the value of the "categories" property |
void appstream_search_query_set_categories (AppstreamSearchQuery *self,gchar **value,int value_length1);
Set the value of the "categories" property to value.
|
the AppstreamSearchQuery instance to modify |
|
the new value of the "categories" property |
struct AppstreamSearchQuery {
GObject parent_instance;
AppstreamSearchQueryPrivate * priv;
};
Class describing a query on the AppStream application database
struct AppstreamSearchQueryClass {
GObjectClass parent_class;
};
The class structure for APPSTREAM_TYPE_SEARCH_QUERY. All the fields in this structure are private and should never be accessed directly.
GObjectClass |
the parent class structure |
#define APPSTREAM_TYPE_DATABASE (appstream_database_get_type ())
The type for AppstreamDatabase.
gboolean appstream_database_open (AppstreamDatabase *self);
|
the AppstreamDatabase instance |
gboolean appstream_database_db_exists (AppstreamDatabase *self);
|
the AppstreamDatabase instance |
Returns : |
TRUE if the application database exists |
GPtrArray * appstream_database_get_all_applications
(AppstreamDatabase *self);
|
the AppstreamDatabase instance |
GPtrArray * appstream_database_find_applications (AppstreamDatabase *self,AppstreamSearchQuery *query);
|
the AppstreamDatabase instance |
|
GPtrArray * appstream_database_find_applications_by_str (AppstreamDatabase *self,const gchar *search_str,const gchar *categories_str);
|
the AppstreamDatabase instance |
|
|
|
void appstream_database_refresh (AppstreamDatabase *self,GAsyncReadyCallback _callback_,gpointer _user_data_);
Make a DBus call telling the system to refresh the internal database of available applications. AppStream uses the metadata provided by your distributor to regenerate the database.
See also: appstream_database_refresh_finish()
|
the AppstreamDatabase instance |
|
callback to call when the request is satisfied. [scope async] |
|
the data to pass to _callback_ function. [closure]
|
gboolean appstream_database_refresh_finish (AppstreamDatabase *self,GAsyncResult *_res_,GError **error);
Make a DBus call telling the system to refresh the internal database of available applications. AppStream uses the metadata provided by your distributor to regenerate the database.
See also: appstream_database_refresh()
|
the AppstreamDatabase instance |
|
a GAsyncResult |
|
location to store the error occuring, or NULL to ignore. [error-domains GIOErrorEnum]
|
Returns : |
TRUE if refresh was successfull. |
const gchar * appstream_database_get_database_path
(AppstreamDatabase *self);
Get and return the current value of the "database-path" property.
|
the AppstreamDatabase instance to query |
Returns : |
the value of the "database-path" property |
struct AppstreamDatabase {
GObject parent_instance;
AppstreamDatabasePrivate * priv;
};
Class to access the AppStream application database
struct AppstreamDatabaseClass {
GObjectClass parent_class;
gboolean (*open) (AppstreamDatabase* self);
};
The class structure for APPSTREAM_TYPE_DATABASE. All the fields in this structure are private and should never be accessed directly.
GObjectClass |
the parent class structure |
virtual method called by
|