libaccounts-glib Reference Manual: AgApplication

## AgApplication AgApplication — information on the client applications of libaccounts. |

## Functions

const gchar * | ag_application_get_description ()
GDesktopAppInfo * | ag_application_get_desktop_app_info ()
const gchar * | ag_application_get_i18n_domain ()
const gchar * | ag_application_get_name ()
const gchar * | ag_application_get_service_usage ()
AgApplication * | ag_application_ref ()
void | ag_application_unref ()

## Types and Values

| AgApplication

## Object Hierarchy

        GBoxed
        ╰── AgApplication

## Includes

    #include <libaccounts-glib/ag-application.h>

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

## Functions

### ag_application_get_description ()

    const gchar *
    ag_application_get_description (AgApplication *self);

Get the description of the AgApplication.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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` .

#### Parameters

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.

#### Parameters

self | the AgApplication. |

## Types and Values

### AgApplication

    typedef struct _AgApplication AgApplication;

Opaque structure. Use related accessor functions.