Accounts.Provider

Fields

None

Methods

class

list_free (list)

get_description ()

get_display_name ()

get_domains_regex ()

get_file_contents (contents)

get_i18n_domain ()

get_icon_name ()

get_name ()

get_plugin_name ()

get_single_account ()

get_tags ()

match_domain (domain)

ref ()

unref ()

Details

class Accounts.Provider

Opaque structure. Use related accessor functions.

classmethod list_free(list)
Parameters:

list ([Accounts.Provider]) – a GLib.List of providers returned by some function of this library.

Frees the list list.

get_description()
Returns:

the description of self, or None upon failure.

Return type:

str

Get the description of the Accounts.Provider.

New in version 1.2.

get_display_name()
Returns:

the display name of self.

Return type:

str

Get the display name of the Accounts.Provider.

get_domains_regex()
Returns:

a regular expression matching the domain names.

Return type:

str

Get a regular expression matching all domains where this provider’s accounts can be used.

New in version 1.1.

get_file_contents(contents)
Parameters:

contents (str) – location to receive the pointer to the file 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 self is referenced. If some error occurs, contents is set to None.

get_i18n_domain()
Returns:

the translation domain.

Return type:

str

Get the translation domain of the Accounts.Provider.

get_icon_name()
Returns:

the icon_name.

Return type:

str

Get the icon name of the Accounts.Provider.

get_name()
Returns:

the name of self.

Return type:

str

Get the name of the Accounts.Provider.

get_plugin_name()
Returns:

the plugin name for self, or None if a plugin name is not defined.

Return type:

str

Get the name of the account plugin which manages all accounts created from this Accounts.Provider. 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.

New in version 1.5.

get_single_account()
Returns:

False if multiple accounts can be created from this provider, True otherwise.

Return type:

bool

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.

New in version 1.14.

get_tags()
Returns:

GLib.List of tags for self. The list must be freed with g_list_free(). Entries are owned by the Accounts.Provider type and must not be free’d.

Return type:

[str]

Get list of tags specified for the Accounts.Provider.

New in version 1.25.

match_domain(domain)
Parameters:

domain (str) – a domain name.

Returns:

True if the given domain is supported, False otherwise.

Return type:

bool

Check whether domain is supported by this provider, by matching it with the regex returned by Accounts.Provider.get_domains_regex(). If the provider does not define a regular expression to match the supported domains, this function will return False.

New in version 1.2.

ref()
Returns:

self.

Return type:

Accounts.Provider

Adds a reference to self.

unref()

Used to unreference the Accounts.Provider structure.