![]() |
![]() |
![]() |
libaccounts-glib Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
#include <libaccounts-glib/ag-service-type.h> AgServiceType; const gchar * ag_service_type_get_display_name (AgServiceType *service_type
); const gchar * ag_service_type_get_description (AgServiceType *service_type
); void ag_service_type_get_file_contents (AgServiceType *service_type
,const gchar **contents
,gsize *len
); const gchar * ag_service_type_get_i18n_domain (AgServiceType *service_type
); const gchar * ag_service_type_get_icon_name (AgServiceType *service_type
); const gchar * ag_service_type_get_name (AgServiceType *service_type
); GList * ag_service_type_get_tags (AgServiceType *service_type
); gboolean ag_service_type_has_tag (AgServiceType *service_type
,const gchar *tag
); void ag_service_type_list_free (GList *list
); AgServiceType * ag_service_type_ref (AgServiceType *service_type
); void ag_service_type_unref (AgServiceType *service_type
);
The AgServiceType structure represents a service type. The structure is
not directly exposed to applications, but its fields are accessible via
getter methods.
It is instantiated by AgManager with ag_manager_list_service_types()
or
ag_manager_load_service_type()
. Additonally, AgManager can be instantiated
with a set service type with ag_manager_new_for_service_type()
, which
restricts some future operations on the manager, such as ag_manager_list()
or ag_manager_list_services()
, to only affect accounts or services with the
set service type.
The structure is reference counted. One must use ag_service_type_unref()
when done with it.
typedef struct _AgServiceType AgServiceType;
Opaque structure. Use related accessor functions.
const gchar * ag_service_type_get_display_name (AgServiceType *service_type
);
Get the display name of the AgServiceType.
|
the AgServiceType. |
Returns : |
the display name of service_type . |
const gchar * ag_service_type_get_description (AgServiceType *service_type
);
Get the description of the AgServiceType.
|
the AgServiceType. |
Returns : |
the description of service_type , or NULL upon failure. |
Since 1.2
void ag_service_type_get_file_contents (AgServiceType *service_type
,const gchar **contents
,gsize *len
);
Gets the contents of the XML service type file. The buffer returned in
contents
should not be modified or freed, and is guaranteed to be valid as
long as service_type
is referenced.
If some error occurs, contents
is set to NULL
.
|
the AgServiceType. |
|
location to receive the pointer to the file contents. |
|
location to receive the length of the file, in bytes. |
const gchar * ag_service_type_get_i18n_domain (AgServiceType *service_type
);
Get the translation domain of the AgServiceType.
|
the AgServiceType. |
Returns : |
the translation domain. |
const gchar * ag_service_type_get_icon_name (AgServiceType *service_type
);
Get the icon name of the AgServiceType.
|
the AgServiceType. |
Returns : |
the name of the icon of service_type . |
const gchar * ag_service_type_get_name (AgServiceType *service_type
);
Get the name of the AgServiceType.
|
the AgServiceType. |
Returns : |
the name of service_type . |
GList * ag_service_type_get_tags (AgServiceType *service_type
);
Get list of tags specified for the AgServiceType.
|
the AgServiceType. |
Returns : |
GList of tags for
service_type .
The list must be freed with g_list_free() . Entries are owned by the
AgServiceType type and must not be free'd. [transfer container][element-type utf8]
|
gboolean ag_service_type_has_tag (AgServiceType *service_type
,const gchar *tag
);
Check if the AgServiceType has the requested tag.
|
the AgServiceType. |
|
the tag to check for. |
Returns : |
TRUE if the AgServiceType has the tag, FALSE otherwise |
void ag_service_type_list_free (GList *list
);
Frees the list list
.
|
a GList of service types returned by
some function of this library, such as ag_manager_list_service_types() . [element-type AgServiceType]
|
AgServiceType * ag_service_type_ref (AgServiceType *service_type
);
Adds a reference to service_type
.
|
the AgServiceType. |
Returns : |
service_type . |
void ag_service_type_unref (AgServiceType *service_type
);
Used to unreference the AgServiceType structure.
|
the AgServiceType. |