AccountManager interface

AccountManager interface — client-side wrappers for AccountManager functionality

Functions

Object Hierarchy


Includes

#include <telepathy-glib/cli-misc.h>

Description

This section documents the auto-generated C wrappers for the AccountManager. These are not usually useful, since TpAccountManager provides a high-level API.

Functions

tp_cli_account_manager_callback_for_create_account ()

void
(*tp_cli_account_manager_callback_for_create_account)
                               (TpAccountManager *proxy,
                                const gchar *out_Account,
                                const GError *error,
                                gpointer user_data,
                                GObject *weak_object);

Signature of the callback called when a CreateAccount method call succeeds or fails.

Parameters

proxy

the proxy on which the call was made

 

out_Account

Used to return an 'out' argument if error is NULL: The new <tp:dbus-ref namespace="im.telepathy.v1">Account</tp:dbus-ref>.

 

error

NULL on success, or an error on failure

 

user_data

user-supplied data

 

weak_object

user-supplied object

 

tp_cli_account_manager_call_create_account ()

TpProxyPendingCall *
tp_cli_account_manager_call_create_account
                               (TpAccountManager *proxy,
                                gint timeout_ms,
                                const gchar *in_Connection_Manager,
                                const gchar *in_Protocol,
                                const gchar *in_Display_Name,
                                GHashTable *in_Parameters,
                                GHashTable *in_Properties,
                                tp_cli_account_manager_callback_for_create_account callback,
                                gpointer user_data,
                                GDestroyNotify destroy,
                                GObject *weak_object);

Start a CreateAccount method call.

Request the creation of a new <tp:dbus-ref namespace="im.telepathy.v1">Account</tp:dbus-ref>. The account manager SHOULD NOT allow invalid accounts to be created.

Parameters

proxy

the TpProxy

 

timeout_ms

the timeout in milliseconds, or -1 to use the default

 

in_Connection_Manager

Used to pass an 'in' argument: The name of the connection manager, e.g. &quot;salut&quot;.

 

in_Protocol

Used to pass an 'in' argument: The protocol, e.g. &quot;local-xmpp&quot;.

 

in_Display_Name

Used to pass an 'in' argument: The initial value of the new account's <tp:dbus-ref namespace="im.telepathy.v1.Account">DisplayName</tp:dbus-ref> property. The account manager SHOULD modify this to make it unique if an Account already exists with the same display name, for instance by appending a number or the 'account' parameter. Account manager implementations SHOULD accept an empty string, but account editing user interfaces should avoid passing an empty string for this parameter. <tp:rationale> <p>The account creation UI may ask the user for a name for the new account. If the author of the UI chooses not to do this, the account creation UI is better able to suggest a default display name because it has protocol-specific knowledge which the account manager does not.</p> <p>The account manager always knows the complete list of accounts so it can easily tell whether it should append something to the display name to avoid presenting two identically-named accounts to the user.</p> </tp:rationale>

 

in_Parameters

Used to pass an 'in' argument: Initial parameter values, as would be passed to <tp:dbus-ref namespace="im.telepathy.v1.ConnectionManager">RequestConnection</tp:dbus-ref>.

 

in_Properties

Used to pass an 'in' argument: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>The values of any other properties to be set immediately on the new Account.</p> <p>Only the properties mentioned in <tp:member-ref>SupportedAccountProperties</tp:member-ref> are acceptable here. In particular, the <tp:dbus-ref namespace="im.telepathy.v1.Account">DisplayName</tp:dbus-ref> and <tp:dbus-ref namespace="im.telepathy.v1.Account">Parameters</tp:dbus-ref> properties are never allowed here, since they are set using the other arguments to this method.</p> <p>Account manager implementations SHOULD support creating accounts with an empty value for this argument.</p>

 

callback

called when the method call succeeds or fails; may be NULL to make a "fire and forget" call with no reply tracking

 

user_data

user-supplied data passed to the callback; must be NULL if callback is NULL

 

destroy

called with the user_data as argument, after the call has succeeded, failed or been cancelled; must be NULL if callback is NULL

 

weak_object

If not NULL, a GObject which will be weakly referenced; if it is destroyed, this call will automatically be cancelled. Must be NULL if callback is NULL

 

Returns

a TpProxyPendingCall representing the call in progress. It is borrowed from the object, and will become invalid when the callback is called, the call is cancelled or the TpProxy becomes invalid.


tp_cli_account_manager_signal_callback_account_removed ()

void
(*tp_cli_account_manager_signal_callback_account_removed)
                               (TpAccountManager *proxy,
                                const gchar *arg_Account,
                                gpointer user_data,
                                GObject *weak_object);

Represents the signature of a callback for the signal AccountRemoved.

Parameters

proxy

The proxy on which tp_cli_account_manager_connect_to_account_removed() was called

 

arg_Account

An Account, which must not be used any more.

 

user_data

User-supplied data

 

weak_object

User-supplied weakly referenced object

 

tp_cli_account_manager_connect_to_account_removed ()

TpProxySignalConnection *
tp_cli_account_manager_connect_to_account_removed
                               (TpAccountManager *proxy,
                                tp_cli_account_manager_signal_callback_account_removed callback,
                                gpointer user_data,
                                GDestroyNotify destroy,
                                GObject *weak_object,
                                GError **error);

Connect a handler to the signal AccountRemoved.

The given account has been removed. <tp:rationale> This is effectively change notification for the valid and invalid accounts lists. On emission of this signal, the Account indicated will no longer be present in either of the lists. </tp:rationale>

Parameters

proxy

A TpAccountManager or subclass

 

callback

Callback to be called when the signal is received

 

user_data

User-supplied data for the callback

 

destroy

Destructor for the user-supplied data, which will be called when this signal is disconnected, or before this function returns NULL

 

weak_object

A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected

 

error

If not NULL, used to raise an error if NULL is returned

 

Returns

a TpProxySignalConnection containing all of the above, which can be used to disconnect the signal; or NULL if the proxy does not have the desired interface or has become invalid.


tp_cli_account_manager_signal_callback_account_usability_changed ()

void
(*tp_cli_account_manager_signal_callback_account_usability_changed)
                               (TpAccountManager *proxy,
                                const gchar *arg_Account,
                                gboolean arg_Usable,
                                gpointer user_data,
                                GObject *weak_object);

Represents the signature of a callback for the signal AccountUsabilityChanged.

Parameters

proxy

The proxy on which tp_cli_account_manager_connect_to_account_usability_changed() was called

 

arg_Account

An <tp:dbus-ref namespace="im.telepathy.v1">Account</tp:dbus-ref>.

 

arg_Usable

True if the account is now valid.

 

user_data

User-supplied data

 

weak_object

User-supplied weakly referenced object

 

tp_cli_account_manager_connect_to_account_usability_changed ()

TpProxySignalConnection *
tp_cli_account_manager_connect_to_account_usability_changed
                               (TpAccountManager *proxy,
                                tp_cli_account_manager_signal_callback_account_usability_changed callback,
                                gpointer user_data,
                                GDestroyNotify destroy,
                                GObject *weak_object,
                                GError **error);

Connect a handler to the signal AccountUsabilityChanged.

The validity of the given account has changed. New accounts are also indicated by this signal, as an account validity change (usually to True) on an account that did not previously exist. <tp:rationale> This is effectively change notification for the valid and invalid accounts lists. </tp:rationale>

Parameters

proxy

A TpAccountManager or subclass

 

callback

Callback to be called when the signal is received

 

user_data

User-supplied data for the callback

 

destroy

Destructor for the user-supplied data, which will be called when this signal is disconnected, or before this function returns NULL

 

weak_object

A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected

 

error

If not NULL, used to raise an error if NULL is returned

 

Returns

a TpProxySignalConnection containing all of the above, which can be used to disconnect the signal; or NULL if the proxy does not have the desired interface or has become invalid.


tp_cli_account_callback_for_reconnect ()

void
(*tp_cli_account_callback_for_reconnect)
                               (TpAccount *proxy,
                                const GError *error,
                                gpointer user_data,
                                GObject *weak_object);

Signature of the callback called when a Reconnect method call succeeds or fails.

Parameters

proxy

the proxy on which the call was made

 

error

NULL on success, or an error on failure

 

user_data

user-supplied data

 

weak_object

user-supplied object

 

tp_cli_account_call_reconnect ()

TpProxyPendingCall *
tp_cli_account_call_reconnect (TpAccount *proxy,
                               gint timeout_ms,
                               tp_cli_account_callback_for_reconnect callback,
                               gpointer user_data,
                               GDestroyNotify destroy,
                               GObject *weak_object);

Start a Reconnect method call.

<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>Re-connect this account. If the account is currently disconnected and the requested presence is offline, or if the account is not <tp:member-ref>Enabled</tp:member-ref> or not <tp:member-ref>Usable</tp:member-ref>, this does nothing.</p> <p>If the account is disconnected and the requested presence is not offline, this forces an attempt to connect with the requested presence immediately.</p> <p>If the account is connecting or connected, this is equivalent to remembering the current value of <tp:member-ref>RequestedPresence</tp:member-ref>, setting its value to (OFFLINE, &quot;offline&quot;, &quot;&quot;), waiting for the change to take effect, then setting its value to the value that was previously remembered.</p> <tp:rationale> <p>Clients desiring &quot;instant apply&quot; semantics for CM parameters MAY call this method to achieve that.</p> </tp:rationale> <p>In particular, if the account's <tp:member-ref>Connection</tp:member-ref> is in the Connecting state, calling this method causes the attempt to connect to be aborted and re-tried.</p> <tp:rationale> <p>This is necessary to ensure that the new parameters are picked up.</p> </tp:rationale>

Parameters

proxy

the TpProxy

 

timeout_ms

the timeout in milliseconds, or -1 to use the default

 

callback

called when the method call succeeds or fails; may be NULL to make a "fire and forget" call with no reply tracking

 

user_data

user-supplied data passed to the callback; must be NULL if callback is NULL

 

destroy

called with the user_data as argument, after the call has succeeded, failed or been cancelled; must be NULL if callback is NULL

 

weak_object

If not NULL, a GObject which will be weakly referenced; if it is destroyed, this call will automatically be cancelled. Must be NULL if callback is NULL

 

Returns

a TpProxyPendingCall representing the call in progress. It is borrowed from the object, and will become invalid when the callback is called, the call is cancelled or the TpProxy becomes invalid.


tp_cli_account_callback_for_remove ()

void
(*tp_cli_account_callback_for_remove) (TpAccount *proxy,
                                       const GError *error,
                                       gpointer user_data,
                                       GObject *weak_object);

Signature of the callback called when a Remove method call succeeds or fails.

Parameters

proxy

the proxy on which the call was made

 

error

NULL on success, or an error on failure

 

user_data

user-supplied data

 

weak_object

user-supplied object

 

tp_cli_account_call_remove ()

TpProxyPendingCall *
tp_cli_account_call_remove (TpAccount *proxy,
                            gint timeout_ms,
                            tp_cli_account_callback_for_remove callback,
                            gpointer user_data,
                            GDestroyNotify destroy,
                            GObject *weak_object);

Start a Remove method call.

Delete the account.

Parameters

proxy

the TpProxy

 

timeout_ms

the timeout in milliseconds, or -1 to use the default

 

callback

called when the method call succeeds or fails; may be NULL to make a "fire and forget" call with no reply tracking

 

user_data

user-supplied data passed to the callback; must be NULL if callback is NULL

 

destroy

called with the user_data as argument, after the call has succeeded, failed or been cancelled; must be NULL if callback is NULL

 

weak_object

If not NULL, a GObject which will be weakly referenced; if it is destroyed, this call will automatically be cancelled. Must be NULL if callback is NULL

 

Returns

a TpProxyPendingCall representing the call in progress. It is borrowed from the object, and will become invalid when the callback is called, the call is cancelled or the TpProxy becomes invalid.


tp_cli_account_callback_for_update_parameters ()

void
(*tp_cli_account_callback_for_update_parameters)
                               (TpAccount *proxy,
                                const gchar **out_Reconnect_Required,
                                const GError *error,
                                gpointer user_data,
                                GObject *weak_object);

Signature of the callback called when a UpdateParameters method call succeeds or fails.

Parameters

proxy

the proxy on which the call was made

 

out_Reconnect_Required

Used to return an 'out' argument if error is NULL: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>If all of the updates could be applied to the active <tp:member-ref>Connection</tp:member-ref> (if any), the empty list, signifying that no reconnection is required for the new parameters to take effect. For example, if the only parameter updated is <tt>...Cellular.<tp:dbus-ref namespace="im.telepathy.v1.Connection.Interface.Cellular1">MessageValidityPeriod</tp:dbus-ref></tt>, the new value can be applied immediately to the connection.</p> <p>Otherwise, a list of the names of parameters with changes that will not take effect until the account is reconnected. User interfaces that require &quot;instant apply&quot; semantics MAY call <tp:member-ref>Reconnect</tp:member-ref> in response to receiving a non-empty list. For example, if the caller updates both <tt>...Anonymity.<tp:dbus-ref namespace="im.telepathy.v1.Connection.Interface.Anonymity1">AnonymityMandatory</tp:dbus-ref></tt> and <tt>require-encryption</tt>, the former can be applied to the current connection, but the latter needs a reconnect to take effect, so this method should return <code>[&quot;require-encryption&quot;]</code>.</p>

 

error

NULL on success, or an error on failure

 

user_data

user-supplied data

 

weak_object

user-supplied object

 

tp_cli_account_call_update_parameters ()

TpProxyPendingCall *
tp_cli_account_call_update_parameters (TpAccount *proxy,
                                       gint timeout_ms,
                                       GHashTable *in_Set,
                                       const gchar **in_Unset,
                                       tp_cli_account_callback_for_update_parameters callback,
                                       gpointer user_data,
                                       GDestroyNotify destroy,
                                       GObject *weak_object);

Start a UpdateParameters method call.

<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>Change the value of the <tp:member-ref>Parameters</tp:member-ref> property.</p> <p>If any of the <var>Set</var> parameters’ <tp:type>Conn_Mgr_Param_Flags</tp:type> include <code>DBus_Property</code>, the change will be applied immediately to the corresponding D-Bus Property on the active <tp:member-ref>Connection</tp:member-ref>, if there is one. If any of the <var>Unset</var> parameters’ <tp:type>Conn_Mgr_Param_Flags</tp:type> include both <code>DBus_Property</code> and <code>Has_Default</code>, the corresponding D-Bus Property on the connection will be set to the default value. Changes to other parameters will not take effect until the next time the account is disconnected and reconnected. (If parameters are explicitly set to their default value, or are unset when previously set to their default value, the account manager MAY decide that no reconnection is necessary to make the change take effect.)</p> <tp:rationale> <p>In general, reconnecting is a destructive operation that shouldn't happen as a side-effect. In particular, migration tools that twiddle the settings of all accounts shouldn't cause an automatic disconnect and reconnect.</p> </tp:rationale>

Parameters

proxy

the TpProxy

 

timeout_ms

the timeout in milliseconds, or -1 to use the default

 

in_Set

Used to pass an 'in' argument: A mapping from parameter names to their values. These parameters should be stored for future use.

 

in_Unset

Used to pass an 'in' argument: A list of the names of parameters to be removed from the set of stored values, allowing the default values to be used. If the given parameters were not, in fact, stored, or even if they do not exist at all, the account manager MUST accept this without error.

 

callback

called when the method call succeeds or fails; may be NULL to make a "fire and forget" call with no reply tracking

 

user_data

user-supplied data passed to the callback; must be NULL if callback is NULL

 

destroy

called with the user_data as argument, after the call has succeeded, failed or been cancelled; must be NULL if callback is NULL

 

weak_object

If not NULL, a GObject which will be weakly referenced; if it is destroyed, this call will automatically be cancelled. Must be NULL if callback is NULL

 

Returns

a TpProxyPendingCall representing the call in progress. It is borrowed from the object, and will become invalid when the callback is called, the call is cancelled or the TpProxy becomes invalid.


tp_cli_account_signal_callback_removed ()

void
(*tp_cli_account_signal_callback_removed)
                               (TpAccount *proxy,
                                gpointer user_data,
                                GObject *weak_object);

Represents the signature of a callback for the signal Removed.

Parameters

proxy

The proxy on which tp_cli_account_connect_to_removed() was called

 

user_data

User-supplied data

 

weak_object

User-supplied weakly referenced object

 

tp_cli_account_connect_to_removed ()

TpProxySignalConnection *
tp_cli_account_connect_to_removed (TpAccount *proxy,
                                   tp_cli_account_signal_callback_removed callback,
                                   gpointer user_data,
                                   GDestroyNotify destroy,
                                   GObject *weak_object,
                                   GError **error);

Connect a handler to the signal Removed.

This account has been removed. <tp:rationale> This is redundant with <tp:dbus-ref namespace="im.telepathy.v1.AccountManager">AccountRemoved</tp:dbus-ref>, but it's still worth having, to avoid having to bind to AccountManager.AccountRemoved to tell you whether your Account is valid — ideally, an account-editing UI should only care about a single Account. </tp:rationale>

Parameters

proxy

A TpAccount or subclass

 

callback

Callback to be called when the signal is received

 

user_data

User-supplied data for the callback

 

destroy

Destructor for the user-supplied data, which will be called when this signal is disconnected, or before this function returns NULL

 

weak_object

A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected

 

error

If not NULL, used to raise an error if NULL is returned

 

Returns

a TpProxySignalConnection containing all of the above, which can be used to disconnect the signal; or NULL if the proxy does not have the desired interface or has become invalid.


tp_cli_account_interface_avatar1_signal_callback_avatar_changed ()

void
(*tp_cli_account_interface_avatar1_signal_callback_avatar_changed)
                               (TpAccount *proxy,
                                gpointer user_data,
                                GObject *weak_object);

Represents the signature of a callback for the signal AvatarChanged.

Parameters

proxy

The proxy on which tp_cli_account_interface_avatar1_connect_to_avatar_changed() was called

 

user_data

User-supplied data

 

weak_object

User-supplied weakly referenced object

 

tp_cli_account_interface_avatar1_connect_to_avatar_changed ()

TpProxySignalConnection *
tp_cli_account_interface_avatar1_connect_to_avatar_changed
                               (TpAccount *proxy,
                                tp_cli_account_interface_avatar1_signal_callback_avatar_changed callback,
                                gpointer user_data,
                                GDestroyNotify destroy,
                                GObject *weak_object,
                                GError **error);

Connect a handler to the signal AvatarChanged.

Emitted when the Avatar property changes. <tp:rationale>The avatar itself is deliberately not included in this signal, to reduce bus traffic in the (likely common) case where no running application cares about the user's own avatar.</tp:rationale>

Parameters

proxy

A TpAccount or subclass

 

callback

Callback to be called when the signal is received

 

user_data

User-supplied data for the callback

 

destroy

Destructor for the user-supplied data, which will be called when this signal is disconnected, or before this function returns NULL

 

weak_object

A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected

 

error

If not NULL, used to raise an error if NULL is returned

 

Returns

a TpProxySignalConnection containing all of the above, which can be used to disconnect the signal; or NULL if the proxy does not have the desired interface or has become invalid.


tp_cli_account_interface_addressing1_callback_for_set_uri_scheme_association ()

void
(*tp_cli_account_interface_addressing1_callback_for_set_uri_scheme_association)
                               (TpAccount *proxy,
                                const GError *error,
                                gpointer user_data,
                                GObject *weak_object);

Signature of the callback called when a SetURISchemeAssociation method call succeeds or fails.

Parameters

proxy

the proxy on which the call was made

 

error

NULL on success, or an error on failure

 

user_data

user-supplied data

 

weak_object

user-supplied object

 

tp_cli_account_interface_addressing1_call_set_uri_scheme_association ()

TpProxyPendingCall *
tp_cli_account_interface_addressing1_call_set_uri_scheme_association
                               (TpAccount *proxy,
                                gint timeout_ms,
                                const gchar *in_URI_Scheme,
                                gboolean in_Association,
                                tp_cli_account_interface_addressing1_callback_for_set_uri_scheme_association callback,
                                gpointer user_data,
                                GDestroyNotify destroy,
                                GObject *weak_object);

Start a SetURISchemeAssociation method call.

<p>Associate (or disassociate) an account with a particular URI addressing scheme, (such as 'tel' for telephony)</p>

Parameters

proxy

the TpProxy

 

timeout_ms

the timeout in milliseconds, or -1 to use the default

 

in_URI_Scheme

Used to pass an 'in' argument: <p>URI scheme to associate/disassociate the account with/from</p>

 

in_Association

Used to pass an 'in' argument: <p>True to associate this account with a given addressing scheme</p> <p>False if the account should not be associated with said scheme</p>

 

callback

called when the method call succeeds or fails; may be NULL to make a "fire and forget" call with no reply tracking

 

user_data

user-supplied data passed to the callback; must be NULL if callback is NULL

 

destroy

called with the user_data as argument, after the call has succeeded, failed or been cancelled; must be NULL if callback is NULL

 

weak_object

If not NULL, a GObject which will be weakly referenced; if it is destroyed, this call will automatically be cancelled. Must be NULL if callback is NULL

 

Returns

a TpProxyPendingCall representing the call in progress. It is borrowed from the object, and will become invalid when the callback is called, the call is cancelled or the TpProxy becomes invalid.

Types and Values

See Also

TpAccountManager