The D-Bus bus name for this object. Read-only except during construction.
Initially %FALSE; changes to %TRUE when tp_proxy_prepare_async() has finished preparing %TP_CHANNEL_FEATURE_CORE, and if the channel is a group, %TP_CHANNEL_FEATURE_GROUP.
This is a less general form of tp_proxy_is_prepared(), which should be used in new code.
One important difference is that after #TpProxy::invalidated is signalled, #TpChannel:channel-ready keeps its current value - which might be %TRUE, if the channel was successfully prepared before it became invalidated - but tp_proxy_is_prepared() returns %FALSE for all features.
Change notification is via notify::channel-ready.
The #TpConnection to which this #TpChannel belongs. Used for e.g. handle manipulation.
#GPtrArray of #TpCallContent objects. The list of content objects that are part of this call.
It is NOT guaranteed that %TP_CALL_CONTENT_FEATURE_CORE is prepared on those objects.
The D-Bus daemon for this object (this object itself, if it is a TpDBusDaemon). Read-only except during construction.
The #TpSimpleClientFactory used to create this proxy, or %NULL if this proxy was not created through a factory.
A #TpCallFlags specifying the flags of the call state.
If the %TP_CHANNEL_FEATURE_GROUP feature has been prepared successfully, #TpChannelGroupFlags indicating the capabilities and behaviour of that group.
Otherwise, this may be 0.
Change notification is via notify::group-flags or TpChannel::group-flags-changed.
If this channel is a group and %TP_CHANNEL_FEATURE_CONTACTS has been prepared, and the user is a member of the group, the #TpContact representing them in this group.
Otherwise, the result may be either a contact representing the user, or %NULL.
Change notification is via notify::group-self-contact.
If this channel is a group and %TP_CHANNEL_FEATURE_GROUP has been prepared, and the user is a member of the group, the #TpHandle representing them in this group.
Otherwise, the result may be either a handle representing the user, or 0.
Change notification is via notify::group-self-handle.
Whether or not the streaming is done by dedicated hardware.
A #TpLocalHoldState specifying if the Call is currently held
A #TpLocalHoldStateReason specifying why the Call is currently held.
This channel's associated identifier, or the empty string if it has handle type %TP_HANDLE_TYPE_NONE.
For channels where #TpChannelIface:handle is non-zero, this is the result of inspecting #TpChannelIface:handle.
This is not guaranteed to be set until tp_proxy_prepare_async() has finished preparing %TP_CHANNEL_FEATURE_CORE; until then, it may be the empty string.
Changed in 0.11.4: this property is never %NULL. Previously, it was %NULL before an identifier was known, or when a channel with no TargetID D-Bus property had TargetHandleType %TP_HANDLE_TYPE_NONE.
Whether or not the Call was started with audio.
If #TpCallChannel:initial-audio is set to %TRUE, then this property will is the name of the intial audio content, %NULL otherwise.
Whether or not the Call was started with video.
If #TpCallChannel:initial-video is set to %TRUE, then this property will is the name of the intial video content, %NULL otherwise.
The #TpContact of the initiator of this channel, or %NULL if there is no particular initiator.
If the channel was initiated by a remote contact, this represents that contact, and #TpChannel:requested will be %FALSE. For instance, for an incoming call this property indicates the caller, and for a chatroom invitation this property indicates who sent the invitation.
If the channel was requested by the local user, #TpChannel:requested will be %TRUE, and this property may be the #TpChannel:group-self-contact or #TpConnection:self-contact.
If the channel appeared for some other reason (for instance as a side-effect of connecting to the server), this property may be %NULL.
This is not guaranteed to be set until tp_proxy_prepare_async() has finished preparing %TP_CHANNEL_FEATURE_CONTACTS; until then, it may be %NULL.
The %TP_HANDLE_TYPE_CONTACT #TpHandle of the initiator of this channel, or 0 if there is no particular initiator.
If the channel was initiated by a remote contact, this handle represents that contact, and #TpChannel:requested will be %FALSE. For instance, for an incoming call this property indicates the caller, and for a chatroom invitation this property indicates who sent the invitation.
If the channel was requested by the local user, #TpChannel:requested will be %TRUE, and this property may be the #TpChannel:group-self-handle or #TpConnection:self-handle.
If the channel appeared for some other reason (for instance as a side-effect of connecting to the server), this property may be 0.
This is not guaranteed to be set until tp_proxy_prepare_async() has finished preparing %TP_CHANNEL_FEATURE_CORE; until then, it may be 0.
If #TpChannel:initiator-handle is 0, this will always be "". Otherwise, this will be the #TpContact:identifier of the contact with that handle.
This is not guaranteed to be set until tp_proxy_prepare_async() has finished preparing %TP_CHANNEL_FEATURE_CORE; until then, it may be the empty string.
Known D-Bus interface names for this object.
Whether or not call contents can be added or removed.
The D-Bus object path for this object. Read-only except during construction.
If %TRUE, tp_channel_provide_password_async() has to be called to be able to join the channel.
This is not guaranteed to be meaningful until tp_proxy_prepare_async() has finished preparing %TP_CHANNEL_FEATURE_PASSWORD; until then, it may return %FALSE even if the channel is actually protected by a password. Preparing %TP_CHANNEL_FEATURE_PASSWORD also ensures that the notify::password-needed signal will be fired when this property changes.
%TRUE if this channel was created in response to a local request, such as a call to tp_account_channel_request_create_channel_async(). %FALSE if this channel was initiated by a remote contact (the #TpChannel:initiator-handle), or if it appeared as a side-effect of some other action.
For instance, this is %FALSE on incoming calls and file transfers, remotely-initiated 1-1 text conversations, and invitations to chatrooms, and %TRUE on outgoing calls and file transfers, locally-initiated 1-1 text conversations, and chatrooms joined by local user action.
This is not guaranteed to be meaningful until tp_proxy_prepare_async() has finished preparing %TP_CHANNEL_FEATURE_CORE; until then, it may return %FALSE even if the channel was actually requested.
A #TpCallState specifying the state of the call.
Detailed infoermation about #TpCallChannel:state. It is a #GHashTable mapping gchar*->GValue, it can be accessed using the tp_asv_* functions.
Reason why #TpCallChannel:state last changed.
If this channel is for communication with a single contact (that is, #TpChannelIface:handle-type is %TP_HANDLE_TYPE_CONTACT), then a #TpContact representing the remote contact. For chat rooms, contact search channels and other channels without a single remote contact, %NULL.
This is not guaranteed to be set until tp_proxy_prepare_async() has finished preparing %TP_CHANNEL_FEATURE_CONTACTS; until then, it may be %NULL.
For incoming calls with #TpCallChannel:state set to %TP_CALL_STATE_INITIALISED, accept the incoming call. This changes #TpCallChannel:state to %TP_CALL_STATE_ACCEPTED.
For outgoing calls with #TpCallChannel:state set to %TP_CALL_STATE_PENDING_INITIATOR, actually call the remote contact; this changes #TpCallChannel:state to %TP_CALL_STATE_INITIALISING.
a callback to call when the operation finishes
Finishes tp_call_channel_accept_async().
a #GAsyncResult
Request that a new Content of type type
is added to self
. Callers should
check the value of the #TpCallChannel:mutable-contents property before trying
to add another content as it might not be allowed.
the suggested name of the content to add
the media stream type of the content to be added to the call, from #TpMediaStreamType
The initial direction of the content
a callback to call when the operation finishes
Finishes tp_call_channel_add_content_async().
The returned #TpCallContent is NOT guaranteed to have %TP_CALL_CONTENT_FEATURE_CORE prepared.
a #GAsyncResult
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
Returns the connection for this channel. The returned pointer is only valid while this channel is valid - reference it with g_object_ref() if needed.
Returns the immutable D-Bus properties of this channel, the same as #TpChannel:channel-properties.
The returned hash table should not be altered, and is not necessarily valid after the main loop is next re-entered. Copy it with g_boxed_copy() (its type is %TP_HASH_TYPE_QUALIFIED_PROPERTY_VALUE_MAP) if a copy that remains valid must be kept.
If the #TpChannel:channel-properties property was not set during construction (e.g. by calling tp_channel_new_from_properties()), a reasonable but possibly incomplete version will be made up from the values of individual properties; reading this property repeatedly may yield progressively more complete values until the %TP_CHANNEL_FEATURE_CORE feature is prepared.
Close channel self
. In most cases, it's generally cleaner to use
tp_channel_leave_async() instead to properly leave and close the channel.
When the channel has been closed, callback
will be called.
You can then call tp_channel_close_finish() to get the result of
the operation.
a callback to call when we closed the channel, or %NULL to ignore any reply
Finishes a call to tp_channel_leave_async().
a #GAsyncResult passed to the callback for tp_channel_close_async().
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
Destroy channel self
.
If self
doesn't implement #TP_IFACE_QUARK_CHANNEL_INTERFACE_DESTROYABLE
or if for any reason we can't destroy the channel, we close it.
When the channel has been destroyed or closed, callback
will be called.
You can then call tp_channel_destroy_finish() to get the result of
the operation.
a callback to call when we left the channel
Completes a call to tp_channel_destroy_async().
a #GAsyncResult passed to the callback for tp_channel_destroy_async().
Returns the immutable D-Bus properties of this channel, in a variant of type %G_VARIANT_TYPE_VARDICT where the keys are strings, D-Bus interface name + "." + property name. Use g_variant_lookup() or g_variant_lookup_value() for convenient access to the values.
If the #TpChannel:channel-properties property was not set during construction (e.g. by calling tp_channel_new_from_properties()), a reasonable but possibly incomplete version will be made up from the values of individual properties; reading this property repeatedly may yield progressively more complete values until the %TP_CHANNEL_FEATURE_CORE feature is prepared.
This function should be used only by #TpChannel subclasses, otherwise it is recommended to use individual property getters instead.
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.
Get the D-Bus interface name representing this channel's type, if it has been discovered.
This is the same as the #TpChannelIface:channel-type property; it isn't guaranteed to be non-%NULL until the %TP_CHANNEL_FEATURE_CORE feature has been prepared.
Get the D-Bus interface name representing this channel's type, as a GQuark, if it has been discovered.
This is the same as the #TpChannelIface:channel-type property, except that it is a GQuark rather than a string. It isn't guaranteed to be nonzero until the %TP_CHANNEL_FEATURE_CORE property is ready.
Return the chat state for the given contact. If tp_proxy_is_prepared() would return %FALSE for the feature %TP_CHANNEL_FEATURE_CHAT_STATES, the result will always be %TP_CHANNEL_CHAT_STATE_INACTIVE.
a contact handle
Returns the connection for this channel. The returned pointer is only valid while this channel is valid - reference it with g_object_ref() if needed.
Gets a named field from the objects table of associations (see g_object_set_data()).
name of the key for that association
Get the handle representing the contact, chatroom, etc. with which this channel communicates for its whole lifetime, or 0 if there is no such handle or it has not yet been discovered.
This is the same as the #TpChannelIface:handle property. It isn't guaranteed to have its final value until the %TP_CHANNEL_FEATURE_CORE feature is ready.
If handle_type
is not %NULL, the type of handle is written into it.
This will be %TP_UNKNOWN_HANDLE_TYPE if the handle has not yet been
discovered, or %TP_HANDLE_TYPE_NONE if there is no handle with which this
channel will always communicate. This is the same as the
#TpChannelIface:handle-type property.
This channel's associated identifier, or the empty string if no identifier or unknown.
This is the same as the #TpChannel:identifier property, and isn't guaranteed to be set until the %TP_CHANNEL_FEATURE_CORE property is ready.
Changed in 0.11.4: as with #TpChannel:identifier, this could previously either be %NULL or the empty string if there was no suitable value. It is now non-%NULL in all cases.
Get the members of this call.
The #TpContact objects are guaranteed to have all of the features previously passed to tp_simple_client_factory_add_contact_features() prepared.
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 the #TpChannel:requested 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
If self
is a group and the %TP_CHANNEL_FEATURE_CONTACTS feature has been
prepared, return a #GPtrArray containing its local-pending members.
If self
is a group but %TP_CHANNEL_FEATURE_CONTACTS has not been prepared,
the result may either be a set of local-pending members, or %NULL.
If self
is not a group, return %NULL.
If self
is a group and the %TP_CHANNEL_FEATURE_CONTACTS feature has been
prepared, return a #GPtrArray containing its members.
If self
is a group but %TP_CHANNEL_FEATURE_CONTACTS has not been prepared,
the result may either be a set of members, or %NULL.
If self
is not a group, return %NULL.
If self
is a group and the %TP_CHANNEL_FEATURE_CONTACTS feature has been
prepared, return a #GPtrArray containing its remote-pending members.
If self
is a group but %TP_CHANNEL_FEATURE_CONTACTS has not been prepared,
the result may either be a set of remote-pending members, or %NULL.
If self
is not a group, return %NULL.
Synopsis (see below for further explanation):
self
is not a group or contact
is not a member of this channel,
result is undefined;self
does not have flags that include
%TP_CHANNEL_GROUP_FLAG_PROPERTIES,
result is undefined;contact
is channel-specific and its globally valid "owner" is known,
return that owner;contact
is channel-specific and its globally valid "owner" is unknown,
return %NULL;contact
is globally valid, return contact
itselfSome channels (those with flags that include %TP_CHANNEL_GROUP_FLAG_CHANNEL_SPECIFIC_HANDLES) have a concept of "channel-specific contacts". These are contacts that only have meaning within the context of the channel - for instance, in XMPP Multi-User Chat, participants in a chatroom are identified by an in-room JID consisting of the JID of the chatroom plus a local nickname.
Depending on the protocol and configuration, it might be possible to find out what globally valid contact (i.e. a contact that you could add to your contact list) "owns" a channel-specific contact. For instance, in most XMPP MUC chatrooms, normal users cannot see what global JID corresponds to an in-room JID, but moderators can.
This is further complicated by the fact that channels with channel-specific contacts can sometimes have members with globally valid contacts (for instance, if you invite someone to an XMPP MUC using their globally valid JID, you would expect to see the contact representing that JID in the Group's remote-pending set).
a contact which is a member of this channel
Return the #TpChannel:group-flags property (see the description of that property for notes on validity).
Synopsis (see below for further explanation):
self
is not a group or handle
is not a member of this channel,
result is undefined;self
does not have flags that include
%TP_CHANNEL_GROUP_FLAG_PROPERTIES,
result is undefined;handle
is channel-specific and its globally valid "owner" is known,
return that owner;handle
is channel-specific and its globally valid "owner" is unknown,
return zero;handle
is globally valid, return handle
itselfSome channels (those with flags that include %TP_CHANNEL_GROUP_FLAG_CHANNEL_SPECIFIC_HANDLES) have a concept of "channel-specific handles". These are handles that only have meaning within the context of the channel - for instance, in XMPP Multi-User Chat, participants in a chatroom are identified by an in-room JID consisting of the JID of the chatroom plus a local nickname.
Depending on the protocol and configuration, it might be possible to find out what globally valid handle (i.e. an identifier that you could add to your contact list) "owns" a channel-specific handle. For instance, in most XMPP MUC chatrooms, normal users cannot see what global JID corresponds to an in-room JID, but moderators can.
This is further complicated by the fact that channels with channel-specific handles can sometimes have members with globally valid handles (for instance, if you invite someone to an XMPP MUC using their globally valid JID, you would expect to see the handle representing that JID in the Group's remote-pending set).
This function's result is undefined unless the channel is ready and its flags include %TP_CHANNEL_GROUP_FLAG_PROPERTIES (an implementation without extra D-Bus round trips is not possible using the older API).
a handle which is a member of this channel
If self
is a group and the %TP_CHANNEL_FEATURE_GROUP feature has been
prepared, return a #TpIntset containing its local-pending members.
If self
is a group but %TP_CHANNEL_FEATURE_GROUP has not been prepared,
the result may either be a set of local-pending members, or %NULL.
If self
is not a group, return %NULL.
If local_pending
is actually a local-pending contact,
write additional information into actor,
reason
and message
and return
%TRUE. The contact and message are not referenced or copied, and can only be
assumed to remain valid until the main loop is re-entered.
If local_pending
is not the handle of a local-pending contact,
write %NULL into actor,
%TP_CHANNEL_GROUP_CHANGE_REASON_NONE into reason
and "" into message,
and return %FALSE.
the #TpContact of a local-pending contact about whom more information is needed
If local_pending
is actually the handle of a local-pending contact,
write additional information into actor,
reason
and message
and return
%TRUE. The handle and message are not referenced or copied, and can only be
assumed to remain valid until the main loop is re-entered.
If local_pending
is not the handle of a local-pending contact,
write 0 into actor,
%TP_CHANNEL_GROUP_CHANGE_REASON_NONE into reason
and "" into message,
and return %FALSE.
the handle of a local-pending contact about whom more information is needed
If self
is a group and the %TP_CHANNEL_FEATURE_GROUP feature has been
prepared, return a #TpIntset containing its members.
If self
is a group but %TP_CHANNEL_FEATURE_GROUP has not been prepared,
the result may either be a set of members, or %NULL.
If self
is not a group, return %NULL.
If self
is a group and the %TP_CHANNEL_FEATURE_GROUP feature has been
prepared, return a #TpIntset containing its remote-pending members.
If self
is a group but %TP_CHANNEL_FEATURE_GROUP has not been prepared,
the result may either be a set of remote-pending members, or %NULL.
If self
is not a group, return %NULL.
Return the #TpChannel:group-self-handle property (see the description of that property for notes on validity).
Request that the call is ended. All contents will be removed from self
so
that the #TpCallChannel:contents property will be the empty list.
a TpCallStateChangeReason
a more specific reason for the call hangup, if one is available, or an empty or %NULL string otherwise
a human-readable message to be sent to the remote contact(s)
a callback to call when the operation finishes
Finishes tp_call_channel_hangup_async().
a #GAsyncResult
Whether or not self
can send DTMF tones using
tp_call_channel_send_tones_async(). To be able to send DTMF tones, at least
one of self'
s #TpCallChannel:contents must implement
%TP_IFACE_CALL_CONTENT_INTERFACE_DTMF interface.
Whether or not self
has the %TP_IFACE_CHANNEL_INTERFACE_HOLD
interfaces
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
Join channel self
with message
as join message.
When we joined the channel, callback
will be called.
You can then call tp_channel_join_finish() to get the result of
the operation.
Note that unlike tp_channel_leave_async(), %TP_CHANNEL_FEATURE_GROUP feature must be prepared before calling this function.
the join message
a callback to call when we joined the channel
Completes a call to tp_channel_join_async().
a #GAsyncResult passed to the callback for tp_channel_join_async().
Leave channel self
with reason
as reason and message
as leave message.
If self
doesn't implement #TP_IFACE_QUARK_CHANNEL_INTERFACE_GROUP or if
for any reason we can't properly leave the channel, we close it.
When we left the channel, callback
will be called.
You can then call tp_channel_leave_finish() to get the result of
the operation.
Note that unlike tp_channel_join_async(), %TP_CHANNEL_FEATURE_GROUP feature does not have to be prepared and will be prepared for you. But this is a deprecated behaviour.
the leave reason
the leave message
a callback to call when we left the channel
Completes a call to tp_channel_leave_async().
a #GAsyncResult passed to the callback for tp_channel_leave_async().
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()
Provide password
so that self
can be joined.
This function must be called with the correct password in order for
channel joining to proceed if the TpChannel:password-needed property
is set.
Once the password has been provided, callback
will be
called. You can then call tp_channel_provide_password_finish()
to get the result of the operation.
the password
a callback to call when password
has been provided
Completes a call to tp_channel_provide_password_async(). If the password was rejected, the operation fails with #TP_ERROR_AUTHENTICATION_FAILED.
a #GAsyncResult passed to the callback for tp_channel_provide_password_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 that the connection manager holds or unholds the call. Watch #TpCallChannel:hold-state property to know when the channel goes on hold or is unheld. Unholding may fail if the streaming implementation can not obtain all the resources needed to restart the call.
Whether to request a hold or a unhold
a callback to call when the operation finishes
Finishes tp_call_channel_request_hold_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.
Send tones
on every of self'
s contents which have the
%TP_IFACE_CALL_CONTENT_INTERFACE_DTMF interface.
For more details, see tp_call_content_send_tones_async().
a string representation of one or more DTMF events.
optional #GCancellable object, %NULL to ignore
a callback to call when the operation finishes
Finishes tp_call_channel_send_tones_async().
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
Sets a property on an object.
the name of the property to set
the value
Notifies the CM that the local user is already in a call, so this call has been put in a call-waiting style queue.
a callback to call when the operation finishes
Finishes tp_call_channel_set_queued_async().
a #GAsyncResult
Indicate that the local user has been alerted about the incoming call.
a callback to call when the operation finishes
Finishes tp_call_channel_set_ringing_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.
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 TpChannel 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_CHANNEL.
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 connection; may not be %NULL
the object path of the channel; may not be %NULL
the channel type if already known, or %NULL if not
the handle type if already known, or %TP_UNKNOWN_HANDLE_TYPE if not
the handle if already known, or 0 if not (if optional_handle_type
is %TP_UNKNOWN_HANDLE_TYPE or %TP_HANDLE_TYPE_NONE, this must be 0)
a connection; may not be %NULL
the object path of the channel; may not be %NULL
the immutable properties of the channel, as signalled by the NewChannel D-Bus signal or returned by the CreateChannel and EnsureChannel D-Bus methods: a mapping from strings (D-Bus interface name + "." + property name) to #GValue instances
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
Data structure representing a #TpCallChannel.