AgService

AgService — A representation of a service.

Synopsis

                    AgService;
const gchar *       ag_service_get_name                 (AgService *service);
const gchar *       ag_service_get_display_name         (AgService *service);
const gchar *       ag_service_get_service_type         (AgService *service);
const gchar *       ag_service_get_provider             (AgService *service);
const gchar *       ag_service_get_icon_name            (AgService *service);
const gchar *       ag_service_get_i18n_domain          (AgService *service);
void                ag_service_get_file_contents        (AgService *service,
                                                         const gchar **contents,
                                                         gsize *data_offset);
AgService *         ag_service_ref                      (AgService *service);
void                ag_service_unref                    (AgService *service);
void                ag_service_list_free                (GList *list);

Description

The AgService structure represents a service. The structure is not directly exposed to applications, but its fields are accessible via getter methods. The structure is reference counted. One must use ag_service_unref() when done with it.

Details

AgService

typedef struct {
} AgService;


ag_service_get_name ()

const gchar *       ag_service_get_name                 (AgService *service);

service :

the AgService.

Returns :

the name of service.

ag_service_get_display_name ()

const gchar *       ag_service_get_display_name         (AgService *service);

service :

the AgService.

Returns :

the display name of service.

ag_service_get_service_type ()

const gchar *       ag_service_get_service_type         (AgService *service);

service :

the AgService.

Returns :

the type of service.

ag_service_get_provider ()

const gchar *       ag_service_get_provider             (AgService *service);

service :

the AgService.

Returns :

the name of the provider of service.

ag_service_get_icon_name ()

const gchar *       ag_service_get_icon_name            (AgService *service);

service :

the AgService.

Returns :

the name of the icon of service.

ag_service_get_i18n_domain ()

const gchar *       ag_service_get_i18n_domain          (AgService *service);

service :

the AgService.

Returns :

the name of the translation catalog.

ag_service_get_file_contents ()

void                ag_service_get_file_contents        (AgService *service,
                                                         const gchar **contents,
                                                         gsize *data_offset);

Gets the contents of the XML service file. The buffer returned in contents should not be modified or freed, and is guaranteed to be valid as long as service is referenced. If data_offset is not NULL, it is set to the offset where the <type_data> element can be found. If some error occurs, contents is set to NULL.

service :

the AgService.

contents :

location to receive the pointer to the file contents.

data_offset :

pointer to receive the offset of the type data.

ag_service_ref ()

AgService *         ag_service_ref                      (AgService *service);

Adds a reference to service.

service :

the AgService.

Returns :

service.

ag_service_unref ()

void                ag_service_unref                    (AgService *service);

Used to unreference the AgService structure.

service :

the AgService.

ag_service_list_free ()

void                ag_service_list_free                (GList *list);

Frees the list list.

list :

a GList of services returned by some function of this library.