TpChannel

TpChannel — proxy object for a Telepathy channel

Synopsis

#include <telepathy-glib/channel.h>

                    TpChannel;
struct              TpChannelClass;
void                tp_channel_init_known_interfaces    (void);

#define             TP_CHANNEL_FEATURE_CORE
TpConnection *      tp_channel_get_connection           (TpChannel *self);
GVariant *          tp_channel_dup_immutable_properties (TpChannel *self);
const gchar *       tp_channel_get_channel_type         (TpChannel *self);
GQuark              tp_channel_get_channel_type_id      (TpChannel *self);
TpHandle            tp_channel_get_handle               (TpChannel *self,
                                                         TpHandleType *handle_type);
const gchar *       tp_channel_get_identifier           (TpChannel *self);
TpContact *         tp_channel_get_target_contact       (TpChannel *self);
gboolean            tp_channel_get_requested            (TpChannel *self);
TpContact *         tp_channel_get_initiator_contact    (TpChannel *self);
void                tp_channel_join_async               (TpChannel *self,
                                                         const gchar *message,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            tp_channel_join_finish              (TpChannel *self,
                                                         GAsyncResult *result,
                                                         GError **error);
void                tp_channel_leave_async              (TpChannel *self,
                                                         TpChannelGroupChangeReason reason,
                                                         const gchar *message,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            tp_channel_leave_finish             (TpChannel *self,
                                                         GAsyncResult *result,
                                                         GError **error);
void                tp_channel_close_async              (TpChannel *self,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            tp_channel_close_finish             (TpChannel *self,
                                                         GAsyncResult *result,
                                                         GError **error);
void                tp_channel_destroy_async            (TpChannel *self,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            tp_channel_destroy_finish           (TpChannel *self,
                                                         GAsyncResult *result,
                                                         GError **error);


#define             TP_CHANNEL_FEATURE_GROUP
TpChannelGroupFlags tp_channel_group_get_flags          (TpChannel *self);
TpContact *         tp_channel_group_get_self_contact   (TpChannel *self);
GPtrArray *         tp_channel_group_dup_members        (TpChannel *self);
GPtrArray *         tp_channel_group_dup_local_pending  (TpChannel *self);
gboolean            tp_channel_group_get_local_pending_info
                                                        (TpChannel *self,
                                                         TpContact *local_pending,
                                                         TpContact **actor,
                                                         TpChannelGroupChangeReason *reason,
                                                         const gchar **message);
GPtrArray *         tp_channel_group_dup_remote_pending (TpChannel *self);
TpContact *         tp_channel_group_get_contact_owner  (TpChannel *self,
                                                         TpContact *contact);
#define             TP_ERRORS_REMOVED_FROM_GROUP

#define             TP_CHANNEL_FEATURE_PASSWORD
gboolean            tp_channel_password_needed          (TpChannel *self);
void                tp_channel_provide_password_async   (TpChannel *self,
                                                         const gchar *password,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            tp_channel_provide_password_finish  (TpChannel *self,
                                                         GAsyncResult *result,
                                                         GError **error);

Object Hierarchy

  GObject
   +----TpProxy
         +----TpChannel
               +----TpCallChannel
               +----TpDBusTubeChannel
               +----TpFileTransferChannel
               +----TpStreamTubeChannel
               +----TpTextChannel

Implemented Interfaces

TpChannel implements TpChannelIface.

Properties

  "channel-properties"       GHashTable_gchararray+GValue_*  : Read / Write / Construct Only
  "connection"               TpConnection*         : Read / Write / Construct Only
  "group-flags"              guint                 : Read
  "group-self-contact"       TpContact*            : Read
  "identifier"               gchar*                : Read
  "initiator-contact"        TpContact*            : Read
  "password-needed"          gboolean              : Read
  "requested"                gboolean              : Read
  "target-contact"           TpContact*            : Read

Signals

  "group-flags-changed"                            : Has Details
  "group-members-changed"                          : Has Details

Description

TpChannel objects provide convenient access to Telepathy channels.

Compared with a simple proxy for method calls, they add the following features:

* calling GetChannelType(), GetInterfaces(), GetHandles() automatically

Details

TpChannel

typedef struct _TpChannel TpChannel;

A proxy object for a Telepathy channel. A proxy object for a Telepathy channel. There are no interesting public struct fields.

(Changed in 0.7.12: the layout of the structure is visible, allowing subclassing.)

Since 0.7.1


struct TpChannelClass

struct TpChannelClass {
    TpProxyClass parent_class;
};

The class of a TpChannel. In addition to parent_class there are four pointers reserved for possible future use.

(Changed in 0.7.12: the layout of the structure is visible, allowing subclassing.)

TpProxyClass parent_class;

parent class

Since 0.7.1


tp_channel_init_known_interfaces ()

void                tp_channel_init_known_interfaces    (void);

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.

Since 0.7.6


TP_CHANNEL_FEATURE_CORE

#define             TP_CHANNEL_FEATURE_CORE

Expands to a call to a function that returns a quark for the "core" feature on a TpChannel.

When this feature is prepared, the basic Channel properties of the Channel have been retrieved and are available for use.

Specifically, this implies that:

One can ask for a feature to be prepared using the tp_proxy_prepare_async() function, and waiting for it to callback.

Since 0.11.3


tp_channel_get_connection ()

TpConnection *      tp_channel_get_connection           (TpChannel *self);

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.

self :

a channel

Returns :

the value of "connection". [transfer none]

Since 0.19.9


tp_channel_dup_immutable_properties ()

GVariant *          tp_channel_dup_immutable_properties (TpChannel *self);

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 "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.

self :

a channel

Returns :

a dictionary where the keys are strings, D-Bus interface name + "." + property name. [transfer full]

Since 0.19.9


tp_channel_get_channel_type ()

const gchar *       tp_channel_get_channel_type         (TpChannel *self);

Get the D-Bus interface name representing this channel's type, if it has been discovered.

This is the same as the "channel-type" property; it isn't guaranteed to be non-NULL until the TP_CHANNEL_FEATURE_CORE feature has been prepared.

self :

a channel

Returns :

the channel type, if the channel is ready; either the channel type or NULL, if the channel is not yet ready.

Since 0.7.12


tp_channel_get_channel_type_id ()

GQuark              tp_channel_get_channel_type_id      (TpChannel *self);

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 "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.

self :

a channel

Returns :

the channel type, if the channel is ready; either the channel type or 0, if the channel is not yet ready.

Since 0.7.12


tp_channel_get_handle ()

TpHandle            tp_channel_get_handle               (TpChannel *self,
                                                         TpHandleType *handle_type);

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 "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 "handle-type" property.

self :

a channel

handle_type :

if not NULL, used to return the type of this handle. [out]

Returns :

the handle

Since 0.7.12


tp_channel_get_identifier ()

const gchar *       tp_channel_get_identifier           (TpChannel *self);

This channel's associated identifier, or the empty string if no identifier or unknown.

This is the same as the "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 "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.

self :

a channel

Returns :

the identifier

Since 0.7.21


tp_channel_get_target_contact ()

TpContact *         tp_channel_get_target_contact       (TpChannel *self);

self :

a channel

Returns :

the value of "target-contact". [transfer none]

Since 0.15.6


tp_channel_get_requested ()

gboolean            tp_channel_get_requested            (TpChannel *self);

Return the "requested" property

self :

a TpChannel

Returns :

the value of "requested"

Since 0.11.15


tp_channel_get_initiator_contact ()

TpContact *         tp_channel_get_initiator_contact    (TpChannel *self);

self :

a channel

Returns :

the value of "initiator-contact". [transfer none]

Since 0.15.6


tp_channel_join_async ()

void                tp_channel_join_async               (TpChannel *self,
                                                         const gchar *message,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

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.

TP_CHANNEL_FEATURE_GROUP feature must be prepared before calling this function.

self :

a TpChannel

message :

the join message

callback :

a callback to call when we joined the channel

user_data :

data to pass to callback

Since 0.99.1


tp_channel_join_finish ()

gboolean            tp_channel_join_finish              (TpChannel *self,
                                                         GAsyncResult *result,
                                                         GError **error);

Completes a call to tp_channel_join_async().

self :

a TpChannel

result :

a GAsyncResult passed to the callback for tp_channel_join_async().

error :

a GError to fill

Returns :

TRUE if the channel was successfully joined; FALSE otherwise

Since 0.99.1


tp_channel_leave_async ()

void                tp_channel_leave_async              (TpChannel *self,
                                                         TpChannelGroupChangeReason reason,
                                                         const gchar *message,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Leave channel self with reason as reason and message as leave message. If TP_CHANNEL_FEATURE_GROUP feature is not prepared, 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.

self :

a TpChannel

reason :

the leave reason

message :

the leave message

callback :

a callback to call when we left the channel

user_data :

data to pass to callback

Since 0.99.1


tp_channel_leave_finish ()

gboolean            tp_channel_leave_finish             (TpChannel *self,
                                                         GAsyncResult *result,
                                                         GError **error);

Completes a call to tp_channel_leave_async().

self :

a TpChannel

result :

a GAsyncResult passed to the callback for tp_channel_leave_async().

error :

a GError to fill

Returns :

TRUE if the channel has been left; FALSE otherwise

Since 0.13.10


tp_channel_close_async ()

void                tp_channel_close_async              (TpChannel *self,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

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.

self :

a TpChannel

callback :

a callback to call when we closed the channel, or NULL to ignore any reply

user_data :

data to pass to callback

Since 0.13.10


tp_channel_close_finish ()

gboolean            tp_channel_close_finish             (TpChannel *self,
                                                         GAsyncResult *result,
                                                         GError **error);

Finishes a call to tp_channel_leave_async().

self :

a TpChannel

result :

a GAsyncResult passed to the callback for tp_channel_close_async().

error :

a GError to fill

Returns :

TRUE if the channel has been closed; FALSE otherwise

Since 0.13.10


tp_channel_destroy_async ()

void                tp_channel_destroy_async            (TpChannel *self,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

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.

self :

a TpChannel

callback :

a callback to call when we left the channel

user_data :

data to pass to callback

Since 0.15.2


tp_channel_destroy_finish ()

gboolean            tp_channel_destroy_finish           (TpChannel *self,
                                                         GAsyncResult *result,
                                                         GError **error);

Completes a call to tp_channel_destroy_async().

self :

a TpChannel

result :

a GAsyncResult passed to the callback for tp_channel_destroy_async().

error :

a GError to fill

Returns :

TRUE if the channel has been destroyed or closed; FALSE otherwise

Since 0.15.2


TP_CHANNEL_FEATURE_GROUP

#define             TP_CHANNEL_FEATURE_GROUP

Expands to a call to a function that returns a quark representing the group features of a TpChannel.

When this feature is prepared, the Group properties of the Channel have been retrieved and are available for use, and change-notification has been set up for those that can change:

  • the initial value of the "group-self-contact" property will have been fetched and change notification will have been set up

  • the initial value of the "group-flags" property will have been fetched and change notification will have been set up

All TpContact objects are guaranteed to have all of the features previously passed to tp_client_factory_add_contact_features() prepared.

One can ask for a feature to be prepared using the tp_proxy_prepare_async() function, and waiting for it to callback.

Since 0.99.1


tp_channel_group_get_flags ()

TpChannelGroupFlags tp_channel_group_get_flags          (TpChannel *self);

self :

a channel

Returns :

the value of "group-flags"

Since 0.99.1


tp_channel_group_get_self_contact ()

TpContact *         tp_channel_group_get_self_contact   (TpChannel *self);

self :

a channel

Returns :

the value of "group-self-contact". [transfer none]

Since 0.99.1


tp_channel_group_dup_members ()

GPtrArray *         tp_channel_group_dup_members        (TpChannel *self);

If self is a group and the TP_CHANNEL_FEATURE_GROUP feature has been prepared, return a GPtrArray 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.

self :

a channel

Returns :

a new GPtrArray of TpContact, free it with g_ptr_array_unref(), or NULL. [transfer container][type GLib.PtrArray][element-type TelepathyGLib.Contact]

Since 0.99.1


tp_channel_group_dup_local_pending ()

GPtrArray *         tp_channel_group_dup_local_pending  (TpChannel *self);

If self is a group and the TP_CHANNEL_FEATURE_GROUP feature has been prepared, return a GPtrArray 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.

self :

a channel

Returns :

a new GPtrArray of TpContact, free it with g_ptr_array_unref(), or NULL. [transfer container][type GLib.PtrArray][element-type TelepathyGLib.Contact]

Since 0.99.1


tp_channel_group_get_local_pending_info ()

gboolean            tp_channel_group_get_local_pending_info
                                                        (TpChannel *self,
                                                         TpContact *local_pending,
                                                         TpContact **actor,
                                                         TpChannelGroupChangeReason *reason,
                                                         const gchar **message);

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.

self :

a channel

local_pending :

the TpContact of a local-pending contact about whom more information is needed

actor :

either NULL or a location to return the contact who requested the change. [out][allow-none][transfer none]

reason :

either NULL or a location to return the reason for the change. [out][allow-none]

message :

either NULL or a location to return the user-supplied message. [out][allow-none][transfer none]

Returns :

TRUE if the contact is in fact local-pending

Since 0.99.1


tp_channel_group_dup_remote_pending ()

GPtrArray *         tp_channel_group_dup_remote_pending (TpChannel *self);

If self is a group and the TP_CHANNEL_FEATURE_GROUP feature has been prepared, return a GPtrArray 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.

self :

a channel

Returns :

a new GPtrArray of TpContact, free it with g_ptr_array_unref(), or NULL. [transfer container][type GLib.PtrArray][element-type TelepathyGLib.Contact]

Since 0.99.1


tp_channel_group_get_contact_owner ()

TpContact *         tp_channel_group_get_contact_owner  (TpChannel *self,
                                                         TpContact *contact);

Synopsis (see below for further explanation):

  • if self is not a group or contact is not a member of this channel, result is undefined;

  • if TP_CHANNEL_FEATURE_GROUP has not yet been prepared, result is undefined;

  • if self does not have flags that include TP_CHANNEL_GROUP_FLAG_PROPERTIES, result is undefined;

  • if contact is channel-specific and its globally valid "owner" is known, return that owner;

  • if contact is channel-specific and its globally valid "owner" is unknown, return NULL;

  • if contact is globally valid, return contact itself

Some 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).

self :

a channel

contact :

a contact which is a member of this channel

Returns :

the global contact that owns the given contact, or NULL. [transfer none]

Since 0.99.1


TP_ERRORS_REMOVED_FROM_GROUP

#define TP_ERRORS_REMOVED_FROM_GROUP (tp_errors_removed_from_group_quark ())

GError domain representing the local user being removed from a channel with the Group interface. The code in a GError with this domain must be a member of TpChannelGroupChangeReason.

This error may be raised on non-Group channels with certain reason codes if there's no better error code to use (mainly TP_CHANNEL_GROUP_CHANGE_REASON_NONE).

This macro expands to a function call returning a GQuark.

Since 0.7.1


TP_CHANNEL_FEATURE_PASSWORD

#define             TP_CHANNEL_FEATURE_PASSWORD

Expands to a call to a function that returns a quark representing the password feature on a TpChannel.

When this feature is prepared, tp_channel_password_needed() and the "password-needed" property become useful.

One can ask for a feature to be prepared using the tp_proxy_prepare_async() function, and waiting for it to callback.

Since 0.15.2


tp_channel_password_needed ()

gboolean            tp_channel_password_needed          (TpChannel *self);

Return the "password-needed" property

self :

a TpChannel

Returns :

the value of "password-needed"

Since 0.15.2


tp_channel_provide_password_async ()

void                tp_channel_provide_password_async   (TpChannel *self,
                                                         const gchar *password,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

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.

self :

a TpChannel

password :

the password

callback :

a callback to call when password has been provided

user_data :

data to pass to callback

Since 0.15.2


tp_channel_provide_password_finish ()

gboolean            tp_channel_provide_password_finish  (TpChannel *self,
                                                         GAsyncResult *result,
                                                         GError **error);

Completes a call to tp_channel_provide_password_async(). If the password was rejected, the operation fails with TP_ERROR_AUTHENTICATION_FAILED.

self :

a TpChannel

result :

a GAsyncResult passed to the callback for tp_channel_provide_password_async().

error :

a GError to fill

Returns :

TRUE if the password has been provided and accepted, FALSE otherwise.

Since 0.15.2

Property Details

The "channel-properties" property

  "channel-properties"       GHashTable_gchararray+GValue_*  : Read / Write / Construct Only

The immutable D-Bus properties of this channel, represented by a GHashTable where the keys are D-Bus interface name + "." + property name, and the values are GValue instances.

Read-only except during construction. If this is not provided during construction, 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 tp_proxy_prepare_async() has finished preparing TP_CHANNEL_FEATURE_CORE.


The "connection" property

  "connection"               TpConnection*         : Read / Write / Construct Only

The TpConnection to which this TpChannel belongs. Used for e.g. handle manipulation.


The "group-flags" property

  "group-flags"              guint                 : Read

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.

Default value: 0

Since 0.99.1


The "group-self-contact" property

  "group-self-contact"       TpContact*            : Read

If this channel is a group and TP_CHANNEL_FEATURE_GROUP 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.

Since 0.99.1


The "identifier" property

  "identifier"               gchar*                : Read

This channel's associated identifier, or the empty string if it has handle type TP_HANDLE_TYPE_NONE.

For channels where "handle" is non-zero, this is the result of inspecting "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.

Default value: ""


The "initiator-contact" property

  "initiator-contact"        TpContact*            : Read

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 "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, "requested" will be TRUE, and this property may be the "group-self-contact" or "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_CORE; until then, it may be NULL.

The TpContact object is guaranteed to have all of the features previously passed to tp_client_factory_add_contact_features() prepared.

Since 0.15.6


The "password-needed" property

  "password-needed"          gboolean              : Read

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.

Default value: FALSE

Since 0.15.2


The "requested" property

  "requested"                gboolean              : Read

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 "initiator-contact"), 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.

Default value: FALSE

Since 0.11.15


The "target-contact" property

  "target-contact"           TpContact*            : Read

If this channel is for communication with a single contact (that is, "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_CORE; until then, it may be NULL.

The TpContact object is guaranteed to have all of the features previously passed to tp_client_factory_add_contact_features() prepared.

Since 0.15.6

Signal Details

The "group-flags-changed" signal

void                user_function                      (TpChannel *self,
                                                        guint      added,
                                                        guint      removed,
                                                        gpointer   user_data)      : Has Details

Emitted when the "group-flags" property changes while the channel is ready.

self :

a channel

added :

TpChannelGroupFlags which are newly set

removed :

TpChannelGroupFlags which are no longer set

user_data :

user data set when the signal handler was connected.

Since 0.7.12


The "group-members-changed" signal

void                user_function                      (TpChannel *self,
                                                        GPtrArray *added,
                                                        GPtrArray *removed,
                                                        GPtrArray *local_pending,
                                                        GPtrArray *remote_pending,
                                                        TpContact *actor,
                                                        gpointer   user_data)           : Has Details

Emitted when the group members change in a Group channel.

This is not guaranteed to be emitted until tp_proxy_prepare_async() has finished preparing TP_CHANNEL_FEATURE_GROUP; until then, it may be omitted.

self :

a channel

added :

a GPtrArray of TpContact containing the full members added. [type GLib.PtrArray][element-type TelepathyGLib.Contact]

removed :

a GPtrArray of TpContact containing the members (full, local-pending or remote-pending) removed. [type GLib.PtrArray][element-type TelepathyGLib.Contact]

local_pending :

a GPtrArray of TpContact containing the local-pending members added. [type GLib.PtrArray][element-type TelepathyGLib.Contact]

remote_pending :

a GPtrArray of TpContact containing the remote-pending members added. [type GLib.PtrArray][element-type TelepathyGLib.Contact]

actor :

a TpContact for the "actor" handle in details

details :

a GHashTable mapping (gchar *) to GValue containing details about the change, as described in the specification of the MembersChanged signal. [type GLib.HashTable][element-type utf8 GObject.Value]

user_data :

user data set when the signal handler was connected.

Since 0.99.1

See Also

TpConnection, channel-group, channel-text, channel-media