Top |
const gchar * | ag_provider_get_name () |
const gchar * | ag_provider_get_display_name () |
const gchar * | ag_provider_get_description () |
const gchar * | ag_provider_get_i18n_domain () |
const gchar * | ag_provider_get_icon_name () |
const gchar * | ag_provider_get_domains_regex () |
gboolean | ag_provider_match_domain () |
const gchar * | ag_provider_get_plugin_name () |
gboolean | ag_provider_get_single_account () |
GList * | ag_provider_get_tags () |
void | ag_provider_get_file_contents () |
AgProvider * | ag_provider_ref () |
void | ag_provider_unref () |
void | ag_provider_list_free () |
The AgProvider structure represents an account provider. The structure is
not directly exposed to applications, but its fields are accessible via
getter methods. It can be instantiated by AgManager with
ag_manager_get_provider()
or ag_manager_list_providers()
.
The structure is reference counted. One must use ag_provider_unref()
when
done with it.
See the example of creating a new AgAccount to see how AgProvider can be used.
const gchar *
ag_provider_get_name (AgProvider *provider
);
Get the name of the AgProvider.
const gchar *
ag_provider_get_display_name (AgProvider *provider
);
Get the display name of the AgProvider.
const gchar *
ag_provider_get_description (AgProvider *provider
);
Get the description of the AgProvider.
Since: 1.2
const gchar *
ag_provider_get_i18n_domain (AgProvider *provider
);
Get the translation domain of the AgProvider.
const gchar *
ag_provider_get_icon_name (AgProvider *provider
);
Get the icon name of the AgProvider.
const gchar *
ag_provider_get_domains_regex (AgProvider *provider
);
Get a regular expression matching all domains where this provider's accounts can be used.
Since: 1.1
gboolean ag_provider_match_domain (AgProvider *provider
,const gchar *domain
);
Check whether domain
is supported by this provider, by matching it with the
regex returned by ag_provider_get_domains_regex()
.
If the provider does not define a regular expression to match the supported
domains, this function will return FALSE
.
Since: 1.2
const gchar *
ag_provider_get_plugin_name (AgProvider *provider
);
Get the name of the account plugin which manages all accounts created from this AgProvider. Some platforms might find it useful to store plugin names in the provider XML files, especially when the same plugin can work for different providers.
Since: 1.5
gboolean
ag_provider_get_single_account (AgProvider *provider
);
Tell whether the provider doesn't support creating more than one account. Note that libaccounts itself does not enforce preventing the creation of multiple accounts when this flag is set: the flag is only informative, and its implementation is left to the client.
Since: 1.14
GList *
ag_provider_get_tags (AgProvider *provider
);
Get list of tags specified for the AgProvider.
GList of tags for
provider
. The list must be freed with g_list_free()
. Entries are owned by
the AgProvider type and must not be free'd.
[transfer container][element-type utf8]
Since: 1.25
void ag_provider_get_file_contents (AgProvider *provider
,const gchar **contents
);
Gets the contents of the XML provider file. The buffer returned in contents
should not be modified or freed, and is guaranteed to be valid as long as
provider
is referenced.
If some error occurs, contents
is set to NULL
.
AgProvider *
ag_provider_ref (AgProvider *provider
);
Adds a reference to provider
.
void
ag_provider_unref (AgProvider *provider
);
Used to unreference the AgProvider structure.