Top |
McpAccountManagerMcpAccountManager — Object representing the account manager, implemented by Mission Control |
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.
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.
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 |
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
.
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.
mcpa |
||
escaped |
a string that could have come from |
|
type |
the type of the variant to which to unescape |
void mcp_account_manager_identify_account_async (McpAccountManager *mcpa
,const gchar *manager
,const gchar *protocol
,GVariant *parameters
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
gchar * mcp_account_manager_identify_account_finish (McpAccountManager *mcpa
,GAsyncResult *res
,GError **error
);