![]() |
![]() |
![]() |
libaccounts-glib Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
#include <libaccounts-glib/ag-application.h> AgApplication; const gchar * ag_application_get_description (AgApplication *self
); GDesktopAppInfo * ag_application_get_desktop_app_info (AgApplication *self
); const gchar * ag_application_get_i18n_domain (AgApplication *self
); const gchar * ag_application_get_name (AgApplication *self
); const gchar * ag_application_get_service_usage (AgApplication *self
,AgService *service
); AgApplication * ag_application_ref (AgApplication *self
); void ag_application_unref (AgApplication *self
);
The AgApplication structure holds information on the client applications
registered with libaccounts.
It is instantiated by AgManager with ag_manager_get_application()
and
ag_manager_list_applications_by_service()
, and destroyed with
ag_application_unref()
.
Example 3. Querying application names for an AgService
AgManager *manager; GList *services, *applications; AgService *service; manager = ag_manager_new (); services = ag_manager_list_services (manager); g_assert (services != NULL); service = (AgService *) services->data; applications = ag_manager_list_applications_by_service (manager, service); g_print ("Service type: %s\n", ag_service_get_name (service)); for (applications; applications != NULL; applications = applications->next) { const gchar *application_name = ag_application_get_name ((AgApplication *) applications->data); g_print (" Application name: %s\n", application_name); }
typedef struct _AgApplication AgApplication;
Opaque structure. Use related accessor functions.
const gchar * ag_application_get_description (AgApplication *self
);
Get the description of the AgApplication.
|
the AgApplication. |
Returns : |
the description of self . |
GDesktopAppInfo * ag_application_get_desktop_app_info (AgApplication *self
);
Get the GDesktopAppInfo of the application.
|
the AgApplication. |
Returns : |
the GDesktopAppInfo for self , or NULL if
failed. [transfer full]
|
const gchar * ag_application_get_i18n_domain (AgApplication *self
);
Get the translation domain of the AgApplication.
|
the AgApplication. |
Returns : |
the translation domain. |
const gchar * ag_application_get_name (AgApplication *self
);
Get the name of the AgApplication.
|
the AgApplication. |
Returns : |
the name of self . |
const gchar * ag_application_get_service_usage (AgApplication *self
,AgService *service
);
Get the description from the application XML file, for the specified service; if not found, get the service-type description instead.
|
the AgApplication. |
|
an AgService. |
Returns : |
usage description of the service. |
AgApplication * ag_application_ref (AgApplication *self
);
Increment the reference count of self
.
|
the AgApplication. |
Returns : |
self . |
void ag_application_unref (AgApplication *self
);
Decrements the reference count of self
. The item is destroyed when the
count gets to 0.
|
the AgApplication. |