AgApplication

AgApplication — information on the client applications of libaccounts.

Synopsis

#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);

Object Hierarchy

  GBoxed
   +----AgApplication

Description

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);
}


Details

AgApplication

typedef struct _AgApplication AgApplication;

Opaque structure. Use related accessor functions.


ag_application_get_description ()

const gchar *       ag_application_get_description      (AgApplication *self);

Get the description of the AgApplication.

self :

the AgApplication.

Returns :

the description of self.

ag_application_get_desktop_app_info ()

GDesktopAppInfo *   ag_application_get_desktop_app_info (AgApplication *self);

Get the GDesktopAppInfo of the application.

self :

the AgApplication.

Returns :

the GDesktopAppInfo for self, or NULL if failed. [transfer full]

ag_application_get_i18n_domain ()

const gchar *       ag_application_get_i18n_domain      (AgApplication *self);

Get the translation domain of the AgApplication.

self :

the AgApplication.

Returns :

the translation domain.

ag_application_get_name ()

const gchar *       ag_application_get_name             (AgApplication *self);

Get the name of the AgApplication.

self :

the AgApplication.

Returns :

the name of self.

ag_application_get_service_usage ()

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.

self :

the AgApplication.

service :

an AgService.

Returns :

usage description of the service.

ag_application_ref ()

AgApplication *     ag_application_ref                  (AgApplication *self);

Increment the reference count of self.

self :

the AgApplication.

Returns :

self.

ag_application_unref ()

void                ag_application_unref                (AgApplication *self);

Decrements the reference count of self. The item is destroyed when the count gets to 0.

self :

the AgApplication.