a D-Bus daemon; may not be %NULL
the well-known or unique name of the connection process; if well-known, this function will make a blocking call to the bus daemon to resolve the unique name. May be %NULL if object_path
is not, in which case a well-known name will be derived from object_path
.
the object path of the connection process. May be %NULL if bus_name
is a well-known name, in which case the object path will be derived from bus_name
.
The Amount field of the Balance.AccountBalance property.
For this property to be valid, you must first call tp_proxy_prepare_async() with the feature %TP_CONNECTION_FEATURE_BALANCE.
See Also: tp_connection_get_balance()
The Currency field of the Balance.AccountBalance property.
For this property to be valid, you must first call tp_proxy_prepare_async() with the feature %TP_CONNECTION_FEATURE_BALANCE.
See Also: tp_connection_get_balance()
The Scale field of the Balance.AccountBalance property.
For this property to be valid, you must first call tp_proxy_prepare_async() with the feature %TP_CONNECTION_FEATURE_BALANCE.
See Also: tp_connection_get_balance()
The Balance.ManageCreditURI property.
For this property to be valid, you must first call tp_proxy_prepare_async() with the feature %TP_CONNECTION_FEATURE_BALANCE.
A #GPtrArray of blocked #TpContact. Changes are notified using the #TpConnection::blocked-contacts-changed signal.
These TpContact objects have been prepared with the desired features. See tp_simple_client_factory_add_contact_features() to define which features needs to be prepared on them.
For this property to be valid, you must first call tp_proxy_prepare_async() with the feature %TP_CONNECTION_FEATURE_CONTACT_BLOCKING.
The D-Bus bus name for this object. Read-only except during construction.
If true, presence subscription and publication can be changed using the RequestSubscription, AuthorizePublication and RemoveContacts methods.
Rational: link-local XMPP, presence is implicitly published to everyone in the local subnet, so the user cannot control their presence publication.
For this property to be valid, you must first call tp_proxy_prepare_async() with the feature %TP_CONNECTION_FEATURE_CONTACT_LIST_PROPERTIES or %TP_CONNECTION_FEATURE_CONTACT_LIST.
If this property is %TRUE, contacts may be reported as abusive to the server administrators by setting report_abusive to %TRUE when calling tp_connection_block_contacts_async().
For this property to be valid, you must first call tp_proxy_prepare_async() with the feature %TP_CONNECTION_FEATURE_CONTACT_BLOCKING.
The %TpCapabilities object representing the capabilities of this connection, or NULL if we don't know yet.
To wait for valid capability information, call tp_proxy_prepare_async() with the feature %TP_CONNECTION_FEATURE_CAPABILITIES.
This connection's connection manager name.
This connection's connection manager name.
Initially %FALSE; changes to %TRUE when the connection has gone to CONNECTED status, introspection has finished and it's ready for use.
By the time this property becomes %TRUE, any extra interfaces will have been set up and the #TpProxy:interfaces property will have been populated.
This is similar to %TP_CONNECTION_FEATURE_CONNECTED, except that once it has changed to %TRUE, it remains %TRUE even if the connection has been invalidated.
The names of all groups that currently exist. This may be a larger set than the union of all #TpContact:contact-groups properties, if the connection allows groups to be empty.
This property's value is not meaningful until the #TpConnection:contact-list-state property has become %TP_CONTACT_LIST_STATE_SUCCESS.
For this property to be valid, you must first call tp_proxy_prepare_async() with the feature %TP_CONNECTION_FEATURE_CONTACT_GROUPS.
If true, presence subscriptions (in both directions) on this connection are stored by the server or other infrastructure.
If false, presence subscriptions on this connection are not stored.
For this property to be valid, you must first call tp_proxy_prepare_async() with the feature %TP_CONNECTION_FEATURE_CONTACT_LIST_PROPERTIES or %TP_CONNECTION_FEATURE_CONTACT_LIST.
The progress made in retrieving the contact list.
For this property to be valid, you must first call tp_proxy_prepare_async() with the feature %TP_CONNECTION_FEATURE_CONTACT_LIST_PROPERTIES or %TP_CONNECTION_FEATURE_CONTACT_LIST.
The D-Bus daemon for this object (this object itself, if it is a TpDBusDaemon). Read-only except during construction.
True if each contact can be in at most one group; false if each contact can be in many groups.
This property cannot change after the connection has moved to the %TP_CONNECTION_STATUS_CONNECTED state. Until then, its value is undefined, and it may change at any time, without notification.
For this property to be valid, you must first call tp_proxy_prepare_async() with the feature %TP_CONNECTION_FEATURE_CONTACT_GROUPS.
The #TpSimpleClientFactory used to create this proxy, or %NULL if this proxy was not created through a factory.
Indicates the extent to which contacts' groups can be set and stored.
This property cannot change after the connection has moved to the %TP_CONNECTION_STATUS_CONNECTED state. Until then, its value is undefined, and it may change at any time, without notification.
For this property to be valid, you must first call tp_proxy_prepare_async() with the feature %TP_CONNECTION_FEATURE_CONTACT_GROUPS.
Known D-Bus interface names for this object.
The D-Bus object path for this object. Read-only except during construction.
The connection'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.
If true, the Message parameter to RequestSubscription is likely to be significant, and user interfaces SHOULD prompt the user for a message to send with the request; a message such as "I would like to add you to my contact list", translated into the local user's language, might make a suitable default.
For this property to be valid, you must first call tp_proxy_prepare_async() with the feature %TP_CONNECTION_FEATURE_CONTACT_LIST_PROPERTIES or %TP_CONNECTION_FEATURE_CONTACT_LIST.
A #TpContact representing the local user on this connection, or %NULL if not yet available.
If the local user's unique identifier changes (for instance by using /nick on IRC), this property will change to a different #TpContact object representing the new identifier, and #GObject::notify will be emitted.
The #TpContact object is guaranteed to have all of the features previously passed to tp_simple_client_factory_add_contact_features() prepared.
To wait for a non-%NULL self-contact (and other properties), call tp_proxy_prepare_async() with the feature %TP_CONNECTION_FEATURE_CONNECTED.
The %TP_HANDLE_TYPE_CONTACT handle of the local user on this connection, or 0 if we don't know yet or if the connection has become invalid.
This may change if the local user's unique identifier changes (for instance by using /nick on IRC), in which case #GObject::notify will be emitted.
To wait for a valid self-handle (and other properties), call tp_proxy_prepare_async() with the feature %TP_CONNECTION_FEATURE_CONNECTED.
This connection's status, or %TP_UNKNOWN_CONNECTION_STATUS if we don't know yet.
To wait for a valid status (and other properties), call tp_proxy_prepare_async() with the feature %TP_CONNECTION_FEATURE_CORE.
Since version 0.11.3, the change to status %TP_CONNECTION_STATUS_CONNECTED is delayed slightly, until introspection of the connection has finished.
To wait for a valid status (and other properties), call tp_proxy_prepare_async() with the feature %TP_CONNECTION_FEATURE_CORE.
The reason why #TpConnection:status changed to its current value, or TP_CONNECTION_STATUS_REASON_NONE_SPECIFIED if unknown. know yet.
Subscribe to any opt-in change notifications for interested_in
.
For contact information, use #TpContact instead, which will call this automatically.
a string identifying an interface or part of an interface to which this connection will subscribe
Add the given contacts
to the given group,
creating it if necessary.
For this to work properly self
must have interface
%TP_IFACE_CONNECTION_INTERFACE_CONTACT_GROUPS.
the group to alter.
An array of #TpContact objects to include in the group.
a callback to call when the operation finishes
Finishes tp_connection_add_to_group_async()
a #GAsyncResult
For each of the given contacts,
request that the local user's presence is
sent to that contact, i.e. that their #TpContact:publish-state property
becomes %TP_SUBSCRIPTION_STATE_YES.
For this to work properly self
must have interface
%TP_IFACE_CONNECTION_INTERFACE_CONTACT_LIST.
An array of #TpContact objects to authorize
a callback to call when the operation finishes
Finishes tp_connection_authorize_publication_async()
a #GAsyncResult
Binds the :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
Direct the server to block contacts
.
An array of #TpContact objects to block
If %TRUE, report these contacts as abusive to the server administrators as well as blocking them. See #TpConnection:can-report-abusive to discover whether reporting abuse is supported. If #TpConnection:can-report-abusive is %FALSE, this parameter will be ignored.
a callback to call when the operation finishes
Finishes tp_connection_block_contacts_async()
a #GAsyncResult
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
Disconnect the connection.
This method is intended for use by AccountManager implementations, such as Mission Control. To disconnect a connection managed by an AccountManager, either use tp_account_request_presence_async() or tp_account_set_enabled_async(), depending whether the intention is to put the account offline temporarily, or disable it longer-term.
a callback to call when the request is satisfied
Interpret the result of tp_connection_disconnect_async().
a #GAsyncResult
Create a #TpContact object and make any asynchronous method calls necessary
to ensure that all the features specified in features
are ready for use
(if they are supported at all).
It is not an error to put features in features
even if the connection
manager doesn't support them - users of this method should have a static
list of features they would like to use if possible, and use it for all
connection managers.
A strings representing the desired contact by its identifier in the IM protocol (an XMPP JID, SIP URI, MSN Passport, AOL screen-name etc.)
An array of features that must be ready for use (if supported) before the callback is called (may be %NULL if n_features
is 0)
A user callback to call when the contact is ready
Finishes tp_connection_dup_contact_by_id_async().
a #GAsyncResult
Try to return an existing contact object or create a new contact object immediately.
If tp_connection_has_immortal_handles() would return %TRUE and
identifier
is non-%NULL, this function always succeeds.
On connections without immortal handles, it is not possible to guarantee
that handle
remains valid without making asynchronous D-Bus calls, so
it might be necessary to delay processing of messages or other events
until a #TpContact can be constructed asynchronously, for instance by using
tp_connection_get_contacts_by_id().
Similarly, if identifier
is %NULL, it might not be possible to find the
identifier for handle
without making asynchronous D-Bus calls, so
it might be necessary to delay processing of messages or other events
until a #TpContact can be constructed asynchronously, for instance by using
tp_connection_get_contacts_by_handle().
a handle of type %TP_HANDLE_TYPE_CONTACT
the normalized identifier (XMPP JID, etc.) corresponding to handle,
or %NULL if not known
Returns a newly allocated #GList of supported contact info fields for this connection. The list must be freed with tp_contact_info_spec_list_free().
To wait for valid supported fields, call tp_proxy_prepare_async() with the feature %TP_CONNECTION_FEATURE_CONTACT_INFO.
This property cannot change after self
goes to the Connected state.
Retrieves the user's contact list. In general, blocked contacts are not included in this list. The #TpContact objects returned are guaranteed to have all of the features previously passed to tp_simple_client_factory_add_contact_features() prepared.
Before calling this method, you must first call tp_proxy_prepare_async() with the %TP_CONNECTION_FEATURE_CONTACT_LIST feature, and verify that #TpConnection:contact-list-state is set to %TP_CONTACT_LIST_STATE_SUCCESS.
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.
Return the the #TpAccount associated with this connection. Will return %NULL
if self
was not acquired from a #TpAccount via tp_account_get_connection(),
or if the account object got finalized in the meantime (#TpConnection does
not keep a strong ref on its #TpAccount).
To wait for valid avatar requirements, call tp_proxy_prepare_async() with the feature %TP_CONNECTION_FEATURE_AVATAR_REQUIREMENTS.
This property cannot change after self
goes to the Connected state.
If self
has a valid account balance, returns %TRUE and sets the variables
pointed to by balance,
scale
and currency
to the appropriate fields
of the Balance.AccountBalance property.
The monetary value of the balance is expressed as a fixed-point number,
balance,
with a decimal scale defined by scale;
for instance a balance
of 1234 with scale
of 2 represents a value of "12.34" in the currency
represented by currency
.
Requires %TP_CONNECTION_FEATURE_BALANCE to be prepared.
The value of Balance.ManageCreditURI.
Requires %TP_CONNECTION_FEATURE_BALANCE to be prepared.
Return (via a callback) any number of attributes of the given handles.
Since telepathy-glib version 0.13.8,
the handles will remain valid until connection
becomes invalid
(signalled by #TpProxy::invalidated). In earlier versions, if hold
was %TRUE, the callback would hold a reference to them which could be
released with tp_connection_unref_handles().
This is a thin wrapper around the GetContactAttributes D-Bus method, and should be used in preference to tp_cli_connection_interface_contacts_call_get_contact_attributes(); mixing this function, tp_connection_hold_handles(), tp_connection_unref_handles(), and #TpContact with direct use of the RequestHandles, HoldHandles and GetContactAttributes D-Bus methods is unwise, as #TpConnection and #TpContact perform client-side reference counting of handles. The #TpContact API provides a higher-level abstraction which should usually be used instead.
callback
will later be called with the attributes of those of the given
handles that were valid. Invalid handles are simply omitted from the
parameter to the callback.
If hold
is %TRUE, the callback
is given one reference to each handle
that appears as a key in the callback's attributes
parameter.
the timeout in milliseconds, or -1 to use the default
an array of handles
a #GStrv of interfaces
if %TRUE, the callback will hold one reference to each valid handle
called on success or failure (unless weak_object
has become unreferenced)
if not %NULL, an object to be weakly referenced: if it is destroyed, callback
will not be called
Returns the flags describing how contact info (vCards) behaves on this connection
To wait for valid contact info flags, call tp_proxy_prepare_async() with the feature %TP_CONNECTION_FEATURE_CONTACT_INFO.
This property cannot change after self
goes to the Connected state.
Returns a newly allocated #GList of supported contact info fields for this connection. The list must be freed with g_list_free() after used.
Note that the #TpContactInfoFieldSpecs in the returned #GList are not dupped before returning from this function. One could copy every item in the list using tp_contact_info_field_spec_copy().
To wait for valid supported fields, call tp_proxy_prepare_async() with the feature %TP_CONNECTION_FEATURE_CONTACT_INFO.
This property cannot change after self
goes to the Connected state.
Return (via a callback) the contacts on the contact list and any number of their attributes.
Since telepathy-glib version 0.13.8,
the handles will remain valid until connection
becomes invalid
(signalled by #TpProxy::invalidated). In earlier versions, if hold
was %TRUE, the callback would hold a reference to them which could be
released with tp_connection_unref_handles().
This is a thin wrapper around the RequestContactList D-Bus method, and should be used in preference to lower-level functions; it is similar to tp_connection_get_contact_attributes().
The #TpContact API provides a higher-level abstraction which should usually be used instead.
If hold
is %TRUE, the callback
is given a reference to each handle
that appears as a key in the callback's attributes
parameter.
the timeout in milliseconds (using a large timeout is recommended)
a #GStrv of interfaces
if %TRUE, the callback will hold one reference to each handle it receives
called on success or failure (unless weak_object
has become unreferenced)
if not %NULL, an object to be weakly referenced: if it is destroyed, callback
will not be called
Create a number of #TpContact objects and make asynchronous method calls
to hold their handles and ensure that all the features specified in
features
are ready for use (if they are supported at all).
It is not an error to put features in features
even if the connection
manager doesn't support them - users of this method should have a static
list of features they would like to use if possible, and use it for all
connection managers.
An array of handles of type %TP_HANDLE_TYPE_CONTACT representing the desired contacts
An array of features that must be ready for use (if supported) before the callback is called (may be %NULL if n_features
is 0)
A user callback to call when the contacts are ready
An object to pass to the callback, which will be weakly referenced; if this object is destroyed, the operation will be cancelled
Create a number of #TpContact objects and make asynchronous method calls
to obtain their handles and ensure that all the features specified in
features
are ready for use (if they are supported at all).
It is not an error to put features in features
even if the connection
manager doesn't support them - users of this method should have a static
list of features they would like to use if possible, and use it for all
connection managers.
An array of strings representing the desired contacts by their identifiers in the IM protocol (XMPP JIDs, SIP URIs, MSN Passports, AOL screen-names etc.)
An array of features that must be ready for use (if supported) before the callback is called (may be %NULL if n_features
is 0)
A user callback to call when the contacts are ready
An object to pass to the callback, which will be weakly referenced; if this object is destroyed, the operation will be cancelled
Gets a named field from the objects table of associations (see g_object_set_data()).
name of the key for that association
If the connection has disconnected, return the D-Bus error name with which it disconnected (in particular, this is %TP_ERROR_STR_CANCELLED if it was disconnected by a user request).
Otherwise, return %NULL, without altering details
.
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
Return a #TpContact representing the local user on this connection.
The returned object is not necessarily valid after the main loop is re-entered; ref it with g_object_ref() if you want to keep it.
Return the %TP_HANDLE_TYPE_CONTACT handle of the local user on this connection, or 0 if the self-handle is not known yet or the connection has become invalid (the TpProxy::invalidated signal).
The returned handle is not necessarily valid forever (the notify::self-handle signal will be emitted if it changes, which can happen on protocols such as IRC). Construct a #TpContact object if you want to track the local user's identifier in the protocol, or other information like their presence status, over time.
If reason
is not %NULL it is set to the reason why "status" changed to its
current value, or %TP_CONNECTION_STATUS_REASON_NONE_SPECIFIED if unknown.
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 %TRUE if this connection is known to not destroy handles (#TpHandle) until it disconnects.
On such connections, if you know that a handle maps to a particular identifier now, then you can rely on that handle mapping to that identifier for the whole lifetime of the connection.
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
Hold (ensure a reference to) the given handles, if they are valid.
If they are valid, the callback will later be called with the given handles; if not all of them are valid, the callback will be called with an error.
This function, along with tp_connection_unref_handles(), tp_connection_get_contact_attributes() and #TpContact, keeps a client-side reference count of handles; you should not use the RequestHandles, HoldHandles and GetContactAttributes D-Bus methods directly as well as these functions.
the timeout in milliseconds, or -1 to use the default
the handle type
an array of handles
called on success or failure (unless weak_object
has become unreferenced)
if not %NULL, an object to be weakly referenced: if it is destroyed, callback
will not be called
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
.
If the object path of connection
is in the correct form, set
protocol
and cm_name,
return TRUE. Otherwise leave them unchanged and
return FALSE.
#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()
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 to refresh the #TpContact:contact-info property on each contact from
contacts,
requesting it from the network if an up-to-date version is not
cached locally. "notify::contact-info" will be emitted when the contact's
information are updated.
If %TP_CONTACT_FEATURE_CONTACT_INFO is not yet set on a contact, it will be set before its property gets updated.
An array of #TpContact objects associated with self
Remove the given contacts
from the contact list entirely. It is
protocol-dependent whether this works, and under which circumstances.
For this to work properly self
must have interface
%TP_IFACE_CONNECTION_INTERFACE_CONTACT_LIST.
An array of #TpContact objects to remove
a callback to call when the operation finishes
Finishes tp_connection_remove_contacts_async()
a #GAsyncResult
Remove the given contacts
from the given group
. If there are no members
left in the group afterwards, the group MAY itself be removed.
For this to work properly self
must have interface
%TP_IFACE_CONNECTION_INTERFACE_CONTACT_GROUPS.
the group to alter.
An array of #TpContact objects to remove from the group.
a callback to call when the operation finishes
Finishes tp_connection_remove_from_group_async()
a #GAsyncResult
Remove all members from the given group, then remove the group itself.
For this to work properly self
must have interface
%TP_IFACE_CONNECTION_INTERFACE_CONTACT_GROUPS.
the group to remove.
a callback to call when the operation finishes
Finishes tp_connection_remove_group_async()
a #GAsyncResult
Rename the given old_name
.
On protocols where groups behave like tags, this is an API short-cut for adding all of the group's members to a group with the new name, then removing the old group.
For this to work properly self
must have interface
%TP_IFACE_CONNECTION_INTERFACE_CONTACT_GROUPS.
the group to rename
the new name for the group
a callback to call when the operation finishes
Finishes tp_connection_rename_group_async()
a #GAsyncResult
Request the handles corresponding to the given identifiers, and if they are valid, hold (ensure a reference to) the corresponding handles.
If they are valid, the callback will later be called with the given handles; if not all of them are valid, the callback will be called with an error.
the timeout in milliseconds, or -1 to use the default
the handle type
an array of string identifiers for which handles are required, terminated by %NULL (must not be %NULL or empty)
called on success or failure (unless weak_object
has become unreferenced)
if not %NULL, an object to be weakly referenced: if it is destroyed, callback
will not be called
Request that the given contacts
allow the local user to subscribe to their
presence, i.e. that their #TpContact:subscribe-state property becomes
%TP_SUBSCRIPTION_STATE_YES.
For this to work properly self
must have interface
%TP_IFACE_CONNECTION_INTERFACE_CONTACT_LIST.
An array of #TpContact objects to whom requests are to be sent.
an optional plain-text message from the user, to send to those contacts
with the subscription request.
a callback to call when the operation finishes
Finishes tp_connection_request_subscription_async()
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 set of the contact info of self
. When
the operation is finished, callback
will be called. You can then call
tp_connection_set_contact_info_finish() to get the result of the operation.
This method should not be expected to succeed if the result of tp_connection_get_contact_info_flags() does not include %TP_CONTACT_INFO_FLAG_CAN_SET.
a #GList of #TpContactInfoField
a callback to call when the request is satisfied
Finishes an async set of self
info.
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
Add the given contacts
to the given group
(creating it if necessary), and
remove all other members.
For this to work properly self
must have interface
%TP_IFACE_CONNECTION_INTERFACE_CONTACT_GROUPS.
the group to alter.
An array of #TpContact objects members for the group. If this set is empty, this method MAY remove the group.
a callback to call when the operation finishes
Finishes tp_connection_set_group_members_async()
a #GAsyncResult
Sets a property on an object.
the name of the property to set
the value
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.
Direct the server to unblock contacts
.
An array of #TpContact objects to block
a callback to call when the operation finishes
Finishes tp_connection_unblock_contacts_async()
a #GAsyncResult
Attempt to set the given contacts'
#TpContact:publish-state property to
%TP_SUBSCRIPTION_STATE_NO, i.e. stop sending presence to them.
For this to work properly self
must have interface
%TP_IFACE_CONNECTION_INTERFACE_CONTACT_LIST.
An array of #TpContact objects to remove
a callback to call when the operation finishes
Finishes tp_connection_unpublish_async()
a #GAsyncResult
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.
Do nothing. In versions of telepathy-glib prior to 0.13.8,
this released a reference to the handles in handles
.
a handle type
an array of n_handles
handles
Attempt to set the given contacts'
#TpContact:subscribe-state property to
%TP_SUBSCRIPTION_STATE_NO, i.e. stop receiving their presence.
For this to work properly self
must have interface
%TP_IFACE_CONNECTION_INTERFACE_CONTACT_LIST.
An array of #TpContact objects to remove
a callback to call when the operation finishes
Finishes tp_connection_unsubscribe_async()
a #GAsyncResult
Given several #TpContact objects, make asynchronous method calls
ensure that all the features specified in features
are ready for use
(if they are supported at all).
It is not an error to put features in features
even if the connection
manager doesn't support them - users of this method should have a static
list of features they would like to use if possible, and use it for all
connection managers.
An array of #TpContact objects associated with self
An array of features that must be ready for use (if supported) before the callback is called
A user callback to call when the contacts are ready
An object to pass to the callback, which will be weakly referenced; if this object is destroyed, the operation will be cancelled
Given several #TpContact objects, make asynchronous method calls
ensure that all the features specified in features
are ready for use
(if they are supported at all).
It is not an error to put features in features
even if the connection
manager doesn't support them - users of this method should have a static
list of features they would like to use if possible, and use it for all
connection managers.
An array of #TpContact objects associated with self
An array of features that must be ready for use (if supported) before the callback is called
A user callback to call when the contacts are ready
Finishes tp_connection_upgrade_contacts_async().
a #GAsyncResult
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 TpConnection 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_CONNECTION.
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
a D-Bus daemon; may not be %NULL
the well-known or unique name of the connection process; if well-known, this function will make a blocking call to the bus daemon to resolve the unique name. May be %NULL if object_path
is not, in which case a well-known name will be derived from object_path
.
the object path of the connection process. May be %NULL if bus_name
is a well-known name, in which case the object path will be derived from bus_name
.
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
Compares p1
and p2
like strcmp(). p1
> p2
means p1
is more available
than p2
.
The order used is: available > busy > away > xa > hidden > offline > error > unknown > unset
a #TpConnectionPresenceType
a #TpConnectionPresenceType
A proxy object for a Telepathy connection. There are no interesting public struct fields.
(Changed in 0.7.12: the layout of the structure is visible, allowing subclassing.)