McpAccountManager

McpAccountManager — Object representing the account manager, implemented by Mission Control

Functions

Object Hierarchy

    GInterface
    ╰── McpAccountManager

Includes

#include <mission-control-plugins/mission-control-plugins.h>

Description

This object represents the Telepathy AccountManager.

Most virtual methods on the McpAccountStorageIface interface receive an object provided by Mission Control that implements this interface. It can be used to manipulate Mission Control's in-memory cache of accounts.

Only Mission Control should implement this interface.

Functions

mcp_account_manager_get_unique_name ()

gchar *
mcp_account_manager_get_unique_name (McpAccountManager *mcpa,
                                     const gchar *manager,
                                     const gchar *protocol,
                                     const gchar *identification);

Generate and return the canonical unique name of this [new] account. Should not be called for accounts which have already had a name assigned: Intended for use when a plugin encounters an account which MC has not previously seen before (ie one created by a 3rd party in the back-end that the plugin in question provides an interface to).

Changed in 5.17: instead of a map from string to GValue, the last argument is the result of calling IdentifyAccount on the parameters, which normalizes the account's name in a protocol-dependent way. Use mcp_account_manager_identify_account_async() to do that.

Parameters

mcpa

an McpAccountManager instance

 

manager

the name of the manager

 

protocol

the name of the protocol

 

identification

the result of calling IdentifyAccount for this account

 

Returns

the newly allocated account name, which should be freed once the caller is done with it.


mcp_account_manager_escape_variant_for_keyfile ()

gchar *
mcp_account_manager_escape_variant_for_keyfile
                               (const McpAccountManager *mcpa,
                                GVariant *variant);

Escape variant so it could be passed to g_key_file_set_value(). For instance, escaping the boolean value TRUE returns "true", and escaping the string value containing one space returns "\s".

It is a programming error to use an unsupported type. The supported types are currently G_VARIANT_TYPE_STRING, G_VARIANT_TYPE_BOOLEAN, G_VARIANT_TYPE_INT32, G_VARIANT_TYPE_UINT32, G_VARIANT_TYPE_INT64, G_VARIANT_TYPE_UINT64, G_VARIANT_TYPE_BYTE, G_VARIANT_TYPE_STRING_ARRAY, G_VARIANT_TYPE_OBJECT_PATH and G_VARIANT_TYPE_OBJECT_PATH_ARRAY.

Parameters

mcpa

a McpAccountManager

 

variant

a GVariant with a supported GVariantType

 

Returns

the escaped form of variant .

[transfer full]


mcp_account_manager_unescape_variant_from_keyfile ()

GVariant *
mcp_account_manager_unescape_variant_from_keyfile
                               (const McpAccountManager *mcpa,
                                const gchar *escaped,
                                const GVariantType *type,
                                GError **error);

Unescape escaped as if it had appeared in a GKeyFile, with syntax appropriate for type .

It is a programming error to use an unsupported type.

Parameters

mcpa

a McpAccountManager

 

escaped

a string that could have come from g_key_file_get_value()

 

type

the type of the variant to which to unescape

 

Returns

the unescaped form of escaped (*not* a floating reference).

[transfer full]


mcp_account_manager_identify_account_async ()

void
mcp_account_manager_identify_account_async
                               (McpAccountManager *mcpa,
                                const gchar *manager,
                                const gchar *protocol,
                                GVariant *parameters,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

mcp_account_manager_identify_account_finish ()

gchar *
mcp_account_manager_identify_account_finish
                               (McpAccountManager *mcpa,
                                GAsyncResult *res,
                                GError **error);

Types and Values

See Also

McpAccountStorage