Convenience function to create a new account proxy. The returned #TpAccount is not guaranteed to be ready at the point of return.
Proxy for the D-Bus daemon
The non-NULL object path of this account
The account's automatic presence type (a #TpConnectionPresenceType).
When the account is put online automatically, for instance to make a channel request or because network connectivity becomes available, the automatic presence type, status and message will be copied to their "requested" counterparts.
One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail. Change notifications for automatic-presence-type, automatic-status and automatic-status-message are always emitted together, so it is sufficient to connect to one of the notification signals.
This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %TP_CONNECTION_PRESENCE_TYPE_UNSET.
The string status name to use in conjunction with the #TpAccount:automatic-presence-type.
One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail. Change notifications for automatic-presence-type, automatic-status and automatic-status-message are always emitted together, so it is sufficient to connect to one of the notification signals.
This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %NULL.
The user-defined message to use in conjunction with the #TpAccount:automatic-presence-type.
One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail. Change notifications for automatic-presence-type, automatic-status and automatic-status-message are always emitted together, so it is sufficient to connect to one of the notification signals.
This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %NULL.
The D-Bus bus name for this object. Read-only except during construction.
%TRUE if an attempt is currently being made to change the account's presence (#TpAccount:current-presence-type, #TpAccount:current-status and #TpAccount:current-status-message) to match its requested presence (#TpAccount:requested-presence-type, #TpAccount:requested-status and #TpAccount:requested-status-message).
One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail.
This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %FALSE.
The account's connection manager name.
Whether the account should connect automatically or not. To change this property, use tp_account_set_connect_automatically_async().
One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail.
This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %FALSE.
The connection of the account, or %NULL if account is offline. Note that the returned #TpConnection is not guaranteed to have any features pre-prepared (not even %TP_CONNECTION_FEATURE_CORE) unless %TP_ACCOUNT_FEATURE_CONNECTION has been prepared on the account
One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail. If %TP_ACCOUNT_FEATURE_CONNECTION has been prepared, this signal will be delayed until the connection is ready.
This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %NULL.
The D-Bus error name for the last disconnection or connection failure, (in particular, %TP_ERROR_STR_CANCELLED if it was disconnected by user request), or %NULL if the account is connected.
One can receive change notifications on this property by connecting to the #TpAccount::status-changed signal, or by connecting to the #GObject::notify signal and using this property as the signal detail.
This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %NULL.
A map from string to #GValue containing extensible error details related to #TpAccount:connection-error. Functions like tp_asv_get_string() can be used to read from this map.
The keys for this map are defined by
One can receive change notifications on this property by connecting to the #TpAccount::status-changed signal, or by connecting to the #GObject::notify signal and using this property as the signal detail.
This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is an empty map.
The account's connection manager name.
The account's connection status type (a %TpConnectionStatus).
One can receive change notifications on this property by connecting to the #TpAccount::status-changed signal, or by connecting to the #GObject::notify signal and using this property as the signal detail.
This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %TP_CONNECTION_STATUS_DISCONNECTED.
The account's connection status reason (a %TpConnectionStatusReason).
One can receive change notifications on this property by connecting to the #TpAccount::status-changed signal, or by connecting to the #GObject::notify signal and using this property as the signal detail.
This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %TP_CONNECTION_STATUS_REASON_NONE_SPECIFIED.
The account connection's current presence type (a %TpConnectionPresenceType).
One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail. Change notifications for current-presence-type, current-status and current-status-message are always emitted together, so it is sufficient to connect to one of the notification signals.
This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %TP_CONNECTION_PRESENCE_TYPE_UNSET.
The current Status string of the account.
One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail. Change notifications for current-presence-type, current-status and current-status-message are always emitted together, so it is sufficient to connect to one of the notification signals.
This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %NULL.
The current status message message of the account.
One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail. Change notifications for current-presence-type, current-status and current-status-message are always emitted together, so it is sufficient to connect to one of the notification signals.
This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %NULL.
The D-Bus daemon for this object (this object itself, if it is a TpDBusDaemon). Read-only except during construction.
The account's display name, from the DisplayName property.
One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail.
This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %NULL.
Whether this account is enabled or not.
One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail.
This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is FALSE.
The #TpSimpleClientFactory used to create this proxy, or %NULL if this proxy was not created through a factory.
Whether this account has been online or not.
One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail.
This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %FALSE.
The account's icon name. To change this propery, use tp_account_set_icon_name_async().
One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail.
This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %NULL.
Known D-Bus interface names for this object.
The nickname that should be set for the user on this account.
One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail.
This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %NULL.
The normalized form of the user's own unique identifier on this protocol. For example, on XMPP accounts this is the user's JID; on ICQ this is the user's UIN; and so on.
One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail.
This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %NULL.
The D-Bus object path for this object. Read-only except during construction.
The account's machine-readable protocol name, such as "jabber", "msn" or "local-xmpp". Recommended names for most protocols can be found in the Telepathy D-Bus Interface Specification.
The account's machine-readable protocol name, such as "jabber", "msn" or "local-xmpp". Recommended names for most protocols can be found in the Telepathy D-Bus Interface Specification.
The account's requested presence type (a #TpConnectionPresenceType).
Since 0.13.8, one can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail. Change notifications for requested-presence-type, requested-status and requested-status-message are always emitted together, so it is sufficient to connect to one of the notification signals.
This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %NULL.
The requested Status string of the account.
Since 0.13.8, one can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail. Change notifications for requested-presence-type, requested-status and requested-status-message are always emitted together, so it is sufficient to connect to one of the notification signals.
This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %NULL.
The requested status message message of the account.
Since 0.13.8, one can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail. Change notifications for requested-presence-type, requested-status and requested-status-message are always emitted together, so it is sufficient to connect to one of the notification signals.
This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %NULL.
A machine-readable name identifying a specific service to which this account connects, or a copy of #TpAccount:protocol if there is no more specific service.
Well-known names for various services can be found in the Telepathy D-Bus Interface Specification.
For instance, accounts for the "jabber" protocol should have the service names "google-talk", "ovi-chat", "facebook" and "lj-talk" for accounts that connect to Google Talk, Ovi Chat, Facebook and Livejournal, respectively, and this property will be "jabber" for accounts that connect to a generic Jabber server.
To change this property, use tp_account_set_service_async().
The storage identifier for this account.
A provider-specific variant type used to identify this account with the provider. This value will be %NULL if #TpAccount:storage-provider is an empty string.
This property cannot change once an Account has been created.
This is not guaranteed to have been retrieved until the %TP_ACCOUNT_FEATURE_STORAGE feature has been prepared; until then, the value is %NULL.
Provider-specific information used to identify this account. Use g_variant_get_type() to check that the type is what you expect. For instance, if you use a #TpAccount:storage-provider with numeric identifiers for accounts, this variant might have type %G_VARIANT_TYPE_UINT32; if the storage provider has string-based identifiers, it should have type %G_VARIANT_TYPE_STRING.
This property cannot change once an Account has been created.
This is not guaranteed to have been retrieved until the %TP_ACCOUNT_FEATURE_STORAGE feature has been prepared; until then, the value is %NULL.
The storage provider for this account.
The name of the account storage implementation. When this is the empty string the account is internally stored.
This property cannot change once an Account has been created.
This is not guaranteed to have been retrieved until the %TP_ACCOUNT_FEATURE_STORAGE feature has been prepared; until then, the value is %NULL.
The storage restrictions for this account.
A bitfield of #TpStorageRestrictionFlags that give the limitations of this account imposed by the storage provider. This value will be 0 if #TpAccount:storage-provider is an empty string.
This property cannot change once an Account has been created.
This is not guaranteed to have been retrieved until the %TP_ACCOUNT_FEATURE_STORAGE feature has been prepared; until then, the value is 0.
The object paths of previously-active accounts superseded by this one. For instance, this can be used in a logger to read old logs for an account that has been migrated from one connection manager to another.
This is not guaranteed to have been retrieved until the %TP_ACCOUNT_FEATURE_CORE feature has been prepared; until then, the value is NULL.
If the %TP_ACCOUNT_FEATURE_ADDRESSING feature has been prepared successfully, a list of additional URI schemes for which this account should be used if possible. Otherwise %NULL.
For instance, a SIP or Skype account might have "tel" in this list if the user would like to use that account to call phone numbers.
This list should not contain the primary URI scheme(s) for the account's protocol (for instance, "xmpp" for XMPP, or "sip" or "sips" for SIP), since it should be assumed to be useful for those schemes in any case.
The notify::uri-schemes signal cannot be relied on if the Account Manager is Mission Control version 5.14.0 or older.
Whether this account is valid.
One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail.
This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %FALSE.
a URI scheme such as "tel", "sip" or "xmpp"
Binds the :connection-status of self
to the boolean property of another
object using a #GBinding such that the target_property
will be set to
%TRUE when self
is connected (and invert
is %FALSE).
target_property
will be synchronised immediately (%G_BINDING_SYNC_CREATE).
invert
can be interpreted as analogous to %G_BINDING_INVERT_BOOLEAN.
For instance, this function can be used to bind the GtkWidget:sensitive property to only make a widget sensitive when the account is connected.
See g_object_bind_property() for more information.
the target #GObject
the property on target
to bind (must be %G_TYPE_BOOLEAN)
%TRUE if you wish to invert the value of target_property
(i.e. %FALSE if connected)
Creates a binding between source_property
on source
and target_property
on target
.
Whenever the source_property
is changed the target_property
is
updated using the same value. For instance:
g_object_bind_property (action, "active", widget, "sensitive", 0);
Will result in the "sensitive" property of the widget #GObject instance to be updated with the same value of the "active" property of the action #GObject instance.
If flags
contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
if target_property
on target
changes then the source_property
on source
will be updated as well.
The binding will automatically be removed when either the source
or the
target
instances are finalized. To remove the binding without affecting the
source
and the target
you can just call g_object_unref() on the returned
#GBinding instance.
Removing the binding by calling g_object_unref() on it must only be done if
the binding, source
and target
are only used from a single thread and it
is clear that both source
and target
outlive the binding. Especially it
is not safe to rely on this if the binding, source
or target
can be
finalized from different threads. Keep another reference to the binding and
use g_binding_unbind() instead to be on the safe side.
A #GObject can have multiple bindings.
the property on source
to bind
the target #GObject
the property on target
to bind
flags to pass to #GBinding
Creates a binding between source_property
on source
and target_property
on target,
allowing you to set the transformation functions to be used by
the binding.
This function is the language bindings friendly version of g_object_bind_property_full(), using #GClosures instead of function pointers.
the property on source
to bind
the target #GObject
the property on target
to bind
flags to pass to #GBinding
a #GClosure wrapping the transformation function from the source
to the target,
or %NULL to use the default
a #GClosure wrapping the transformation function from the target
to the source,
or %NULL to use the default
Convert a D-Bus error name into a GError as if it was returned by a method on this proxy. This method is useful when D-Bus error names are emitted in signals, such as Connection.ConnectionError and Group.MembersChangedDetailed.
a D-Bus error name, for instance from the callback for tp_cli_connection_connect_to_connection_error()
a debug message that accompanied the error name, or %NULL
If the account's connection is not connected, return the D-Bus error name with which it last disconnected or failed to connect (in particular, this is %TP_ERROR_STR_CANCELLED if it was disconnected by a user request). This is the same as #TpAccount:connection-error.
If details
is not %NULL, it will be used to return additional details about
the error (the same as #TpAccount:connection-error-details).
Otherwise, return %NULL, without altering details
.
The returned string and details
may become invalid when the main loop is
re-entered or the account is destroyed.
Returns the parameters of the account, in a variant of type %G_VARIANT_TYPE_VARDICT where the keys are parameter names (account, password, require-encryption etc.). Use g_variant_lookup() or g_variant_lookup_value() for convenient access to the values.
The allowed parameters depend on the connection manager, and can be found
via tp_connection_manager_get_protocol() and
tp_connection_manager_protocol_get_param(). Well-known parameters are
listed
Makes an asynchronous request of self'
s StorageSpecificInformation
property (part of the Account.Interface.Storage interface).
When the operation is finished, callback
will be called. You must then
call tp_account_dup_storage_specific_information_vardict_finish() to get the
result of the request.
a callback to call when the request is satisfied
Retrieve the value of the request begun with tp_account_dup_storage_specific_information_vardict_async().
a #GAsyncResult
Set the connection of the account by specifying the connection object path. This function does not return a new ref and it is not guaranteed that the returned #TpConnection object is ready.
The use-case for this function is in a HandleChannels callback and you
already know the object path for the connection, so you can let account
create its #TpConnection and return it for use.
the path to connection object for #TpAccount
This function is intended for #GObject implementations to re-enforce a [floating][floating-ref] object reference. Doing this is seldom required: all #GInitiallyUnowneds are created with a floating reference which usually just needs to be sunken by calling g_object_ref_sink().
Increases the freeze count on object
. If the freeze count is
non-zero, the emission of "notify" signals on object
is
stopped. The signals are queued until the freeze count is decreased
to zero. Duplicate notifications are squashed so that at most one
#GObject::notify signal is emitted for each property modified while the
object is frozen.
This is necessary for accessors that modify multiple properties to prevent premature notification while the object is still being modified.
Gets the automatic presence, status and status message of account
. These
values are the same as the #TpAccount:automatic-presence-type,
#TpAccount:automatic-status and #TpAccount:automatic-status-message
properties, and are the values that will be used if the account should
be put online automatically.
Requests an asynchronous get of account'
s avatar. When
the operation is finished, callback
will be called. You can then call
tp_account_get_avatar_finish() to get the result of the operation.
a callback to call when the request is satisfied
Finishes an async get operation of account'
s avatar.
Beware that the returned value is only valid until result
is freed.
Copy it with g_array_ref() if you need to keep it for longer.
a #GAsyncResult
Gets the connection status and reason from account
. The two values
are the same as the #TpAccount:connection-status and
#TpAccount:connection-status-reason properties.
Gets the current presence, status and status message of account
. These
values are the same as the #TpAccount:current-presence-type,
#TpAccount:current-status and #TpAccount:current-status-message properties.
Gets a named field from the objects table of associations (see g_object_set_data()).
name of the key for that association
Returns the parameters of the account, in a hash table where each string is the parameter name (account, password, require-encryption etc.), and each value is a #GValue. Using the tp_asv_get family of functions (tp_asv_get_uint32(), tp_asv_get_string() etc.) to access the parameters is recommended.
The allowed parameters depend on the connection manager, and can be found
via tp_connection_manager_get_protocol() and
tp_connection_manager_protocol_get_param(). Well-known parameters are
listed
Returns the portion of account'
s object path after the standard
#TP_ACCOUNT_OBJECT_PATH_BASE prefix, of the form "cm/protocol/acct". This
string uniquely identifies the account.
This function is only intended to be used when printing debug messages or in tools for developer. For a string suitable for displaying to the user, see tp_account_get_display_name(). To retrieve the connection manager and protocol name parts of the object path, see tp_account_get_connection_manager() and tp_account_get_protocol(). For persistent identification of the account, use tp_proxy_get_object_path().
Gets a property of an object.
The value
can be:
In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling g_value_unset().
Note that g_object_get_property() is really intended for language bindings, g_object_get() is much more convenient for C programming.
the name of the property to get
return location for the property value
This function gets back user data pointers stored via g_object_set_qdata().
A #GQuark, naming the user data pointer
Gets the requested presence, status and status message of account
. These
values are the same as the #TpAccount:requested-presence-type,
#TpAccount:requested-status and #TpAccount:requested-status-message
properties.
Makes an asynchronous request of self'
s StorageSpecificInformation
property (part of the Account.Interface.Storage interface).
When the operation is finished, callback
will be called. You must then
call tp_account_get_storage_specific_information_finish() to get the
result of the request.
a callback to call when the request is satisfied
Retrieve the value of the request begun with tp_account_get_storage_specific_information_async().
Beware that the returned value is only valid until result
is freed.
Copy it with g_hash_table_ref() if you need to keep it for longer.
a #GAsyncResult
Return the same thing as the #TpAccount:supersedes property, in a way that may be more convenient for C code.
The returned pointers are not guaranteed to remain valid after the main loop has been re-entered.
Return the #TpAccount:uri-schemes property
Gets n_properties
properties for an object
.
Obtained properties will be set to values
. All properties must be valid.
Warnings will be emitted and undefined behaviour may result if invalid
properties are passed in.
the names of each property to get
the values of each property to get
Return whether this proxy is known to have a particular interface. In versions older than 0.11.11, this was a macro wrapper around tp_proxy_has_interface_by_id().
For objects that discover their interfaces at runtime, this method will indicate that interfaces are missing until they are known to be present. In subclasses that define features for use with tp_proxy_prepare_async(), successfully preparing the "core" feature for that subclass (such as %TP_CHANNEL_FEATURE_CORE or %TP_CONNECTION_FEATURE_CORE) implies that the interfaces are known.
the D-Bus interface required, as a string
Return whether this proxy is known to have a particular interface, by its quark ID. This is equivalent to using g_quark_to_string() followed by tp_proxy_has_interface(), but more efficient.
quark representing the D-Bus interface required
Checks whether object
has a [floating][floating-ref] reference.
Return %TRUE if feature
has been prepared successfully, or %FALSE if
feature
has not been requested, has not been prepared yet, or is not
available on this object at all.
(For instance, if feature
is %TP_CHANNEL_FEATURE_CHAT_STATES and self
is a #TpChannel in a protocol that doesn't actually implement chat states,
or is not a #TpChannel at all, then this method will return %FALSE.)
To prepare features, call tp_proxy_prepare_async().
a feature that is supported by self'
s class
Emits a "notify" signal for the property property_name
on object
.
When possible, eg. when signaling a property change from within the class that registered the property, you should use g_object_notify_by_pspec() instead.
Note that emission of the notify signal may be blocked with g_object_freeze_notify(). In this case, the signal emissions are queued and will be emitted (in reverse order) when g_object_thaw_notify() is called.
the name of a property installed on the class of object
.
Emits a "notify" signal for the property specified by pspec
on object
.
This function omits the property name lookup, hence it is faster than g_object_notify().
One way to avoid using g_object_notify() from within the class that registered the properties, and using g_object_notify_by_pspec() instead, is to store the GParamSpec used with g_object_class_install_property() inside a static array, e.g.:
enum
{
PROP_0,
PROP_FOO,
PROP_LAST
};
static GParamSpec *properties[PROP_LAST];
static void
my_object_class_init (MyObjectClass *klass)
{
properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
0, 100,
50,
G_PARAM_READWRITE);
g_object_class_install_property (gobject_class,
PROP_FOO,
properties[PROP_FOO]);
}
and then notify a change on the "foo" property with:
g_object_notify_by_pspec (self, properties[PROP_FOO]);
the #GParamSpec of a property installed on the class of object
.
#TpProxy itself does not support any features, but subclasses like #TpChannel can support features, which can either be core functionality like %TP_CHANNEL_FEATURE_CORE, or extended functionality like %TP_CHANNEL_FEATURE_CHAT_STATES.
Proxy instances start with no features prepared. When features are requested via tp_proxy_prepare_async(), the proxy starts to do the necessary setup to use those features.
tp_proxy_prepare_async() always waits for core functionality of the proxy's class to be prepared, even if it is not specifically requested: for instance, because %TP_CHANNEL_FEATURE_CORE is core functionality of a #TpChannel,
|[ TpChannel *channel = ...;
tp_proxy_prepare_async (channel, NULL, callback, user_data);
is equivalent to
|[
TpChannel *channel = ...;
GQuark features[] = { TP_CHANNEL_FEATURE_CORE, 0 };
tp_proxy_prepare_async (channel, features, callback, user_data);
If a feature represents core functionality (like %TP_CHANNEL_FEATURE_CORE), failure to prepare it will result in tp_proxy_prepare_async() finishing unsuccessfully: if failure to prepare the feature indicates that the proxy is no longer useful, it will also emit #TpProxy::invalidated.
If a feature represents non-essential functionality (like %TP_CHANNEL_FEATURE_CHAT_STATES), or is not supported by the object at all, then failure to prepare it is not fatal: tp_proxy_prepare_async() will complete successfully, but tp_proxy_is_prepared() will still return %FALSE for the feature, and accessor methods for the feature will typically return a dummy value.
Some #TpProxy subclasses automatically start to prepare their core features when instantiated, and features will sometimes become prepared as a side-effect of other actions, but to ensure that a feature is present you must generally call tp_proxy_prepare_async() and wait for the result.
an array of desired features, ending with 0; %NULL is equivalent to an array containing only 0
if not %NULL, called exactly once, when the features have all been prepared or failed to prepare, or after the proxy is invalidated
Check for error in a call to tp_proxy_prepare_async(). An error here
generally indicates that either the asynchronous call was cancelled,
or self
has emitted #TpProxy::invalidated.
the result passed to the callback of tp_proxy_prepare_async()
Requests an asynchronous reconnect of account
. When the operation is
finished, callback
will be called. You can then call
tp_account_reconnect_finish() to get the result of the operation.
a callback to call when the request is satisfied
Finishes an async reconnect of account
.
a #GAsyncResult
Increase the reference count of object,
and possibly remove the
[floating][floating-ref] reference, if object
has a floating reference.
In other words, if the object is floating, then this call "assumes ownership" of the floating reference, converting it to a normal reference by clearing the floating flag while leaving the reference count unchanged. If the object is not floating, then this call adds a new normal reference increasing the reference count by one.
Since GLib 2.56, the type of object
will be propagated to the return type
under the same conditions as for g_object_ref().
Requests an asynchronous removal of account
. When the operation is
finished, callback
will be called. You can then call
tp_account_remove_finish() to get the result of the operation.
a callback to call when the request is satisfied
Finishes an async removal of account
.
a #GAsyncResult
Requests an asynchronous change of presence on account
. When the
operation is finished, callback
will be called. You can then call
tp_account_request_presence_finish() to get the result of the operation.
the requested presence
a status message to set, or %NULL
a message for the change, or %NULL
a callback to call when the request is satisfied
Finishes an async presence change request on account
.
a #GAsyncResult
Releases all references to other objects. This can be used to break reference cycles.
This function should only be called from object system implementations.
Requests an asynchronous change of account'
s automatic presence. When the
operation is finished, callback
will be called. You can then call
tp_account_set_automatic_presence_finish() to get the result of the
operation.
the requested presence
a status message to set, or %NULL
a message for the change, or %NULL
a callback to call when the request is satisfied
Finishes an asynchronous request to change the automatic presence of
account
.
a #GAsyncResult
Requests an asynchronous change of the Avatar parameter on self
. When
the operation is finished, callback
will be called. You can then call
tp_account_set_avatar_finish() to get the result of the operation.
If len
equals 0, the avatar is cleared.
a new avatar to set; can be %NULL only if len
equals 0
the MIME type of the new avatar; can be %NULL only if len
equals 0
a callback to call when the request is satisfied
Finishes an async avatar change request on account
.
a #GAsyncResult
Requests an asynchronous set of the ConnectAutomatically property of
account
. When the operation is finished, callback
will be called. You can
then call tp_account_set_display_name_finish() to get the result of the
operation.
new value for the parameter
a callback to call when the request is satisfied
Finishes an async set of the ConnectAutomatically property.
a #GAsyncResult
Each object carries around a table of associations from strings to pointers. This function lets you set an association.
If the object already had an association with that name, the old association will be destroyed.
Internally, the key
is converted to a #GQuark using g_quark_from_string().
This means a copy of key
is kept permanently (even after object
has been
finalized) — so it is recommended to only use a small, bounded set of values
for key
in your program, to avoid the #GQuark storage growing unbounded.
name of the key
data to associate with that key
Requests an asynchronous set of the DisplayName property of account
. When
the operation is finished, callback
will be called. You can then call
tp_account_set_display_name_finish() to get the result of the operation.
a new display name, or %NULL to unset the display name
a callback to call when the request is satisfied
Finishes an async set of the DisplayName property.
a #GAsyncResult
Requests an asynchronous set of the Enabled property of account
. When the
operation is finished, callback
will be called. You can then call
tp_account_set_enabled_finish() to get the result of the operation.
the new enabled value of account
a callback to call when the request is satisfied
Finishes an async set of the Enabled property.
a #GAsyncResult
Requests an asynchronous set of the Icon property of account
. When
the operation is finished, callback
will be called. You can then call
tp_account_set_icon_name_finish() to get the result of the operation.
a new icon name, or %NULL to unset the icon name
a callback to call when the request is satisfied
Finishes an async set of the Icon parameter.
a #GAsyncResult
Requests an asynchronous change of the Nickname parameter on account
. When
the operation is finished, callback
will be called. You can then call
tp_account_set_nickname_finish() to get the result of the operation.
a new nickname to set
a callback to call when the request is satisfied
Finishes an async nickname change request on account
.
a #GAsyncResult
Sets a property on an object.
the name of the property to set
the value
Requests an asynchronous set of the Service property on self
. When
the operation is finished, callback
will be called. You can then call
tp_account_set_service_finish() to get the result of the operation.
a new service name, or %NULL or the empty string to unset the service name (which will result in the #TpAccount:service property becoming the same as #TpAccount:protocol)
a callback to call when the request is satisfied
Finishes an async set of the Service parameter.
a #GAsyncResult
Add scheme
to the list of additional URI schemes that would be returned
by tp_account_get_uri_schemes(), or remove it from that list.
scheme
should not be the primary URI scheme for the account's
protocol (for instance, "xmpp" for XMPP, or "sip" or "sips" for SIP),
since the account should be assumed to be useful for those schemes
regardless of the contents of the list.
Calling this method does not require the %TP_ACCOUNT_FEATURE_ADDRESSING feature to be enabled, but the change will not be reflected in the result of tp_account_get_uri_schemes() or tp_account_associated_with_uri_scheme() unless that feature has been enabled.
a non-%NULL URI scheme such as "tel"
%TRUE to use this account for scheme,
or %FALSE to not use it
a callback to call when the request is satisfied
Interpret the result of tp_account_set_uri_scheme_association_async().
a #GAsyncResult
Remove a specified datum from the object's data associations, without invoking the association's destroy handler.
name of the key
This function gets back user data pointers stored via
g_object_set_qdata() and removes the data
from object
without invoking its destroy() function (if any was
set).
Usually, calling this function is only required to update
user data pointers with a destroy notifier, for example:
void
object_add_to_user_list (GObject *object,
const gchar *new_string)
{
// the quark, naming the object data
GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
// retrieve the old string list
GList *list = g_object_steal_qdata (object, quark_string_list);
// prepend new string
list = g_list_prepend (list, g_strdup (new_string));
// this changed 'list', so we need to set it again
g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
}
static void
free_string_list (gpointer data)
{
GList *node, *list = data;
for (node = list; node; node = node->next)
g_free (node->data);
g_list_free (list);
}
Using g_object_get_qdata() in the above example, instead of g_object_steal_qdata() would have left the destroy function set, and thus the partial string list would have been freed upon g_object_set_qdata_full().
A #GQuark, naming the user data pointer
Reverts the effect of a previous call to
g_object_freeze_notify(). The freeze count is decreased on object
and when it reaches zero, queued "notify" signals are emitted.
Duplicate notifications for each property are squashed so that at most one #GObject::notify signal is emitted for each property, in the reverse order in which they have been queued.
It is an error to call this function when the freeze count is zero.
Decreases the reference count of object
. When its reference count
drops to 0, the object is finalized (i.e. its memory is freed).
If the pointer to the #GObject may be reused in future (for example, if it is an instance variable of another object), it is recommended to clear the pointer to %NULL rather than retain a dangling pointer to a potentially invalid #GObject instance. Use g_clear_object() for this.
Requests an asynchronous update of parameters of account
. When the
operation is finished, callback
will be called. You can then call
tp_account_update_parameters_finish() to get the result of the operation.
new parameters to set on account
list of parameters to unset on account
a callback to call when the request is satisfied
Finishes an async update of the parameters on account
.
a #GAsyncResult
Requests an asynchronous update of parameters of account
. When the
operation is finished, callback
will be called. You can then call
tp_account_update_parameters_finish() to get the result of the operation.
If parameters
is a floating reference (see g_variant_ref_sink()),
ownership of parameters
is taken by this function. This means
you can pass the result of g_variant_new() or g_variant_new_parsed()
directly to this function without additional reference-count management.
a variant of type %G_VARIANT_TYPE_VARDICT containing new parameters to set on account
list of parameters to unset on account
a callback to call when the request is satisfied
Finishes an async update of the parameters on account
.
a #GAsyncResult
Emits a "notify" signal for the property property_name
on object
.
When possible, eg. when signaling a property change from within the class that registered the property, you should use g_object_notify_by_pspec() instead.
Note that emission of the notify signal may be blocked with g_object_freeze_notify(). In this case, the signal emissions are queued and will be emitted (in reverse order) when g_object_thaw_notify() is called.
This function essentially limits the life time of the closure
to
the life time of the object. That is, when the object is finalized,
the closure
is invalidated by calling g_closure_invalidate() on
it, in order to prevent invocations of the closure with a finalized
(nonexisting) object. Also, g_object_ref() and g_object_unref() are
added as marshal guards to the closure,
to ensure that an extra
reference count is held on object
during invocation of the
closure
. Usually, this function will be called on closures that
use this object
as closure data.
#GClosure to watch
Ensure that the known interfaces for TpAccount have been set up. This is done automatically when necessary, but for correct overriding of library interfaces by local extensions, you should call this function before calling tp_proxy_or_subclass_hook_on_interface_add() with first argument %TP_TYPE_ACCOUNT.
Find the #GParamSpec with the given name for an
interface. Generally, the interface vtable passed in as g_iface
will be the default vtable from g_type_default_interface_ref(), or,
if you know the interface has already been loaded,
g_type_default_interface_peek().
any interface vtable for the interface, or the default vtable for the interface
name of a property to look up.
Add a property to an interface; this is only useful for interfaces that are added to GObject-derived types. Adding a property to an interface forces all objects classes with that interface to have a compatible property. The compatible property could be a newly created #GParamSpec, but normally g_object_class_override_property() will be used so that the object class only needs to provide an implementation and inherits the property description, default value, bounds, and so forth from the interface property.
This function is meant to be called from the interface's default
vtable initialization function (the class_init
member of
#GTypeInfo.) It must not be called after after class_init
has
been called for any object types implementing this interface.
If pspec
is a floating reference, it will be consumed.
any interface vtable for the interface, or the default vtable for the interface.
the #GParamSpec for the new property
Lists the properties of an interface.Generally, the interface
vtable passed in as g_iface
will be the default vtable from
g_type_default_interface_ref(), or, if you know the interface has
already been loaded, g_type_default_interface_peek().
any interface vtable for the interface, or the default vtable for the interface
Convenience function to create a new account proxy. The returned #TpAccount is not guaranteed to be ready at the point of return.
Proxy for the D-Bus daemon
The non-NULL object path of this account
Creates a new instance of a #GObject subtype and sets its properties.
Construction parameters (see %G_PARAM_CONSTRUCT, %G_PARAM_CONSTRUCT_ONLY) which are not explicitly specified are set to their default values.
the type id of the #GObject subtype to instantiate
an array of #GParameter
Validates and parses a Telepathy Account's object path, extracting the connection manager's name, the protocol, and the account's unique identifier from the path. This includes replacing underscores with hyphens in the protocol name, as defined in the Account specification.
Any of the out parameters may be %NULL if not needed. If %TRUE is returned, the caller is responsible for freeing the strings stored in any non-%NULL out parameters, using g_free().
a Telepathy Account's object path
The Telepathy Account Manager stores the user's configured real-time communication accounts. This object represents a stored account.
If this account is deleted from the account manager, the #TpProxy::invalidated signal will be emitted with the domain %TP_DBUS_ERRORS and the error code %TP_DBUS_ERROR_OBJECT_REMOVED.
One can connect to the #GObject::notify signal to get change notifications for many of the properties on this object. Refer to each property's documentation for whether it can be used in this way.
#TpAccount objects should normally be obtained from the #TpAccountManager.
Since 0.16, #TpAccount always has a non-%NULL #TpProxy:factory, and its #TpProxy:factory will be propagated to its #TpConnection (if any). If a #TpAccount is created without going via the #TpAccountManager or specifying a #TpProxy:factory, the default is to use a new #TpAutomaticClientFactory.