TpChannelRequest

TpChannelRequest — proxy object for a request to the Telepathy channel dispatcher

Synopsis

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

struct              TpChannelRequest;
struct              TpChannelRequestClass;
void                tp_channel_request_init_known_interfaces
                                                        (void);
const GHashTable *  tp_channel_request_get_immutable_properties
                                                        (TpChannelRequest *self);
GVariant *          tp_channel_request_dup_immutable_properties
                                                        (TpChannelRequest *self);
TpAccount *         tp_channel_request_get_account      (TpChannelRequest *self);
gint64              tp_channel_request_get_user_action_time
                                                        (TpChannelRequest *self);
const gchar *       tp_channel_request_get_preferred_handler
                                                        (TpChannelRequest *self);
const GHashTable *  tp_channel_request_get_hints        (TpChannelRequest *self);
GVariant *          tp_channel_request_dup_hints        (TpChannelRequest *self);

Object Hierarchy

  GObject
   +----TpProxy
         +----TpChannelRequest

Properties

  "account"                  TpAccount*            : Read
  "hints"                    GHashTable_gchararray+GValue_*  : Read
  "hints-vardict"            GVariant*             : Read
  "immutable-properties"     GHashTable_gchararray+GValue_*  : Read / Write / Construct Only
  "immutable-properties-vardict" GVariant*             : Read
  "preferred-handler"        gchar*                : Read
  "user-action-time"         gint64                : Read

Signals

  "succeeded"                                      : Has Details

Description

Requesting a channel from the channel dispatcher can take some time, so an object is created in the channel dispatcher to represent each request. Objects of the TpChannelRequest class provide access to one of those objects.

Details

struct TpChannelRequest

struct TpChannelRequest;

Requesting a channel from the channel dispatcher can take some time, so an object is created in the channel dispatcher to represent each request. This proxy represents one of those objects.

Any client can call tp_cli_channel_request_call_cancel() at any time to attempt to cancel the request.

On success, the "succeeded" signal will be emitted. Immediately after that, the "invalidated" signal will be emitted, with the domain TP_DBUS_ERRORS and the error code TP_DBUS_ERROR_OBJECT_REMOVED (this is not an error condition, it merely indicates that the channel request no longer exists).

On failure, the "invalidated" signal will be emitted with some other suitable error, usually from the TP_ERROR domain.

If the channel dispatcher crashes or exits, the "invalidated" signal will be emitted with the domain TP_DBUS_ERRORS and the error code TP_DBUS_ERROR_NAME_OWNER_LOST.

Creating a TpChannelRequest directly is deprecated: it should only be created via a TpAccountChannelRequest or a TpBaseClient.

Since 0.16, TpChannelRequest always has a non-NULL "factory", and its "factory" will be propagated to the TpAccount, TpConnection and TpChannel.

Since 0.7.32


struct TpChannelRequestClass

struct TpChannelRequestClass {
};

The class of a TpChannelRequest.


tp_channel_request_init_known_interfaces ()

void                tp_channel_request_init_known_interfaces
                                                        (void);

Ensure that the known interfaces for TpChannelRequest 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_REQUEST.

Since 0.7.32


tp_channel_request_get_immutable_properties ()

const GHashTable *  tp_channel_request_get_immutable_properties
                                                        (TpChannelRequest *self);

Return the "immutable-properties" construct-only property

self :

a TpChannelRequest

Returns :

the value of "immutable-properties". [transfer none]

Since 0.13.14


tp_channel_request_dup_immutable_properties ()

GVariant *          tp_channel_request_dup_immutable_properties
                                                        (TpChannelRequest *self);

Return the "immutable-properties-vardict" property.

self :

a TpChannelRequest

Returns :

the value of "immutable-properties-vardict". [transfer full]

Since 0.19.10


tp_channel_request_get_account ()

TpAccount *         tp_channel_request_get_account      (TpChannelRequest *self);

Return the value of the "account" construct-only property

self :

a tpchannelrequest

Returns :

the value of "account". [transfer none]

Since 0.15.3


tp_channel_request_get_user_action_time ()

gint64              tp_channel_request_get_user_action_time
                                                        (TpChannelRequest *self);

return the "user-action-time" construct-only property

self :

a tpchannelrequest

Returns :

the value of "user-action-time"

Since 0.15.3


tp_channel_request_get_preferred_handler ()

const gchar *       tp_channel_request_get_preferred_handler
                                                        (TpChannelRequest *self);

return the "preferred-handler" construct-only property

self :

a tpchannelrequest

Returns :

the value of "preferred-handler"

Since 0.15.3


tp_channel_request_get_hints ()

const GHashTable *  tp_channel_request_get_hints        (TpChannelRequest *self);

Return the "hints" property

self :

a TpChannelRequest

Returns :

the value of "hints". [transfer none]

Since 0.13.14


tp_channel_request_dup_hints ()

GVariant *          tp_channel_request_dup_hints        (TpChannelRequest *self);

Return the "hints-vardict" property

self :

a TpChannelRequest

Returns :

the value of "hints-vardict". [transfer full]

Since 0.19.10

Property Details

The "account" property

  "account"                  TpAccount*            : Read

The TpAccount on which this request was made, not guaranteed to be prepared.

Read-only.

Since 0.15.3


The "hints" property

  "hints"                    GHashTable_gchararray+GValue_*  : Read

A TP_HASH_TYPE_STRING_VARIANT_MAP of metadata provided by the channel requester; or NULL if "immutable-properties" is not defined or if no hints has been defined.

Read-only.

Since 0.13.14


The "hints-vardict" property

  "hints-vardict"            GVariant*             : Read

A G_VARIANT_TYPE_VARDICT of metadata provided by the channel requester; or NULL if "immutable-properties" is not defined or if no hints have been defined.

Read-only.

Allowed values: GVariant<a{sv}>

Default value: NULL

Since 0.19.10


The "immutable-properties" property

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

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

Note that this property is set only if the immutable properties have been set during the construction of the TpChannelRequest.

Read-only except during construction.

Since 0.13.14


The "immutable-properties-vardict" property

  "immutable-properties-vardict" GVariant*             : Read

The immutable D-Bus properties of this channel request, represented by a G_VARIANT_TYPE_VARDICT where the keys are D-Bus interface name + "." + property name.

Note that this property is set only if the immutable properties have been set during the construction of the TpChannelRequest.

Read-only except during construction.

Allowed values: GVariant<a{sv}>

Default value: NULL

Since 0.19.10


The "preferred-handler" property

  "preferred-handler"        gchar*                : Read

Either the well-known bus name (starting with TP_CLIENT_BUS_NAME_BASE) of the preferred handler for this channel request, or NULL to indicate that any handler would be acceptable.

Read-only.

Default value: NULL

Since 0.15.3


The "user-action-time" property

  "user-action-time"         gint64                : Read

The time at which user action occurred, or TP_USER_ACTION_TIME_NOT_USER_ACTION if this channel request is for some reason not involving user action.

Read-only.

Allowed values: >= 0

Default value: 0

Since 0.15.3

Signal Details

The "succeeded" signal

void                user_function                      (TpChannelRequest *self,
                                                        TpConnection     *connection,
                                                        TpChannel        *channel,
                                                        gpointer          user_data)       : Has Details

Emitted when the channel request succeeds.

With telepathy-mission-control version 5.7.1 and earlier, connection and channel will be NULL. When using newer versions, they will be correctly set to the newly-created channel, and the connection which owns it.

The TpChannel is created using "factory" but the features of the factory are NOT prepared. It's up to the user to prepare the features returned by tp_client_factory_dup_channel_features() himself.

self :

the channel request proxy

connection :

the TpConnection of channel, or NULL

channel :

the TpChannel created, or NULL

user_data :

user data set when the signal handler was connected.

Since 0.13.14

See Also

TpChannelDispatcher