![]() |
![]() |
![]() |
telepathy-glib Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
TpAccountChannelRequestTpAccountChannelRequest — Object used to request a channel from a TpAccount |
#include <telepathy-glib/account-channel-request.h> TpAccountChannelRequest; TpAccountChannelRequest * tp_account_channel_request_new (TpAccount *account
,GHashTable *request
,gint64 user_action_time
); GHashTable * tp_account_channel_request_get_request (TpAccountChannelRequest *self
); gint64 tp_account_channel_request_get_user_action_time (TpAccountChannelRequest *self
); TpAccount * tp_account_channel_request_get_account (TpAccountChannelRequest *self
); void tp_account_channel_request_create_and_handle_channel_async (TpAccountChannelRequest *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); TpChannel * tp_account_channel_request_create_and_handle_channel_finish (TpAccountChannelRequest *self
,GAsyncResult *result
,TpHandleChannelsContext **context
,GError **error
); void tp_account_channel_request_ensure_and_handle_channel_async (TpAccountChannelRequest *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); TpChannel * tp_account_channel_request_ensure_and_handle_channel_finish (TpAccountChannelRequest *self
,GAsyncResult *result
,TpHandleChannelsContext **context
,GError **error
); void tp_account_channel_request_create_channel_async (TpAccountChannelRequest *self
,const gchar *preferred_handler
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); gboolean tp_account_channel_request_create_channel_finish (TpAccountChannelRequest *self
,GAsyncResult *result
,GError **error
); void tp_account_channel_request_ensure_channel_async (TpAccountChannelRequest *self
,const gchar *preferred_handler
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); gboolean tp_account_channel_request_ensure_channel_finish (TpAccountChannelRequest *self
,GAsyncResult *result
,GError **error
);
"account" TpAccount* : Read / Write / Construct Only "request" GHashTable_gchararray+GValue_* : Read / Write / Construct Only "user-action-time" gint64 : Read / Write / Construct Only
A TpAccountChannelRequest object is used to request a channel using the ChannelDispatcher. Once created, use one of the create or ensure async method to actually request the channel.
Note that each TpAccountChannelRequest object can only be used to create one channel. You can't call a create or ensure method more than once on the same TpAccountChannelRequest.
Once the channel has been created you can use the TpAccountChannelRequest::re-handled: signal to be notified when the channel has to be re-handled. This can be useful for example to move its window to the foreground, if applicable.
typedef struct _TpAccountChannelRequest TpAccountChannelRequest;
Data structure representing a TpAccountChannelRequest object.
Since 0.11.UNRELEASED
TpAccountChannelRequest * tp_account_channel_request_new (TpAccount *account
,GHashTable *request
,gint64 user_action_time
);
Convenience function to create a new TpAccountChannelRequest object.
|
a TpAccount |
|
the requested properties of the channel. [transfer none][element-type utf8 GObject.Value] |
|
the user action time to pass to the channel dispatcher when requesting the channel |
Returns : |
a new TpAccountChannelRequest object |
Since 0.11.UNRELEASED
GHashTable * tp_account_channel_request_get_request
(TpAccountChannelRequest *self
);
Return the "request" construct-only property
|
a TpAccountChannelRequest |
Returns : |
the value of "request". [transfer none] |
Since 0.11.UNRELEASED
gint64 tp_account_channel_request_get_user_action_time
(TpAccountChannelRequest *self
);
Return the "user-action-time" construct-only property
|
a TpAccountChannelRequest |
Returns : |
the value of "user-action-time" |
Since 0.11.UNRELEASED
TpAccount * tp_account_channel_request_get_account
(TpAccountChannelRequest *self
);
Return the "account" construct-only property
|
a TpAccountChannelRequest |
Returns : |
the value of "account". [transfer none] |
Since 0.11.UNRELEASED
void tp_account_channel_request_create_and_handle_channel_async (TpAccountChannelRequest *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously calls CreateChannel on the ChannelDispatcher to create a
channel with the properties defined in "request"
that you are going to handle yourself.
When the operation is finished, callback
will be called. You can then call
tp_account_channel_request_create_and_handle_channel_finish()
to get the
result of the operation.
|
a TpAccountChannelRequest |
|
optional GCancellable object, NULL to ignore
|
|
a callback to call when the request is satisfied |
|
data to pass to callback
|
Since 0.11.UNRELEASED
TpChannel * tp_account_channel_request_create_and_handle_channel_finish (TpAccountChannelRequest *self
,GAsyncResult *result
,TpHandleChannelsContext **context
,GError **error
);
Finishes an async channel creation started using
tp_account_channel_request_create_and_handle_channel_async()
.
|
a TpAccountChannelRequest |
|
a GAsyncResult |
|
pointer used to return a
on the context of the HandleChannels() call, or NULL . [out][allow-none][transfer full]
|
|
a GError to fill |
Returns : |
a new reference on a TpChannel if the
channel was successfully created and you are handling it, otherwise NULL . [transfer full][allow-none]
|
Since 0.11.UNRELEASED
void tp_account_channel_request_ensure_and_handle_channel_async (TpAccountChannelRequest *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously calls EnsureChannel on the ChannelDispatcher to create a
channel with the properties defined in "request"
that you are going to handle yourself.
When the operation is finished, callback
will be called. You can then call
tp_account_channel_request_ensure_and_handle_channel_finish()
to get the
result of the operation.
If the channel already exists and is already being handled, or if a
newly created channel is sent to a different handler, this operation
will fail with the error TP_ERROR_NOT_YOURS
. The other handler
will be notified that the channel was requested again, and can
move its window to the foreground, if applicable.
|
a TpAccountChannelRequest |
|
optional GCancellable object, NULL to ignore
|
|
a callback to call when the request is satisfied |
|
data to pass to callback
|
Since 0.11.UNRELEASED
TpChannel * tp_account_channel_request_ensure_and_handle_channel_finish (TpAccountChannelRequest *self
,GAsyncResult *result
,TpHandleChannelsContext **context
,GError **error
);
Finishes an async channel creation started using
tp_account_channel_request_ensure_and_handle_channel_async()
.
If the channel already exists and is already being handled, or if a
newly created channel is sent to a different handler, this operation
will fail with the error TP_ERROR_NOT_YOURS
.
|
a TpAccountChannelRequest |
|
a GAsyncResult |
|
pointer used to return a
on the context of the HandleChannels() call, or NULL . [out][allow-none][transfer full]
|
|
a GError to fill |
Returns : |
a new reference on a TpChannel if the
channel was successfully created and you are handling it, otherwise NULL . [transfer full][allow-none]
|
Since 0.11.UNRELEASED
void tp_account_channel_request_create_channel_async (TpAccountChannelRequest *self
,const gchar *preferred_handler
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously calls CreateChannel on the ChannelDispatcher to create a
channel with the properties defined in "request"
and let the ChannelDispatcher dispatch it to an handler.
callback
will be called when the channel has been created and dispatched,
or the request has failed.
You can then call tp_account_channel_request_create_channel_finish()
to
get the result of the operation.
|
a TpAccountChannelRequest |
|
Either the well-known bus name (starting with
TP_CLIENT_BUS_NAME_BASE ) of the preferred handler for the channel,
or NULL to indicate that any handler would be acceptable.
|
|
optional GCancellable object, NULL to ignore
|
|
a callback to call when the request is satisfied |
|
data to pass to callback
|
Since 0.11.UNRELEASED
gboolean tp_account_channel_request_create_channel_finish (TpAccountChannelRequest *self
,GAsyncResult *result
,GError **error
);
Finishes an async channel creation started using
tp_account_channel_request_create_channel_async()
.
|
a TpAccountChannelRequest |
|
a GAsyncResult |
|
a GError to fill |
Returns : |
TRUE if the channel was successfully created and dispatched,
otherwise FALSE .
|
Since 0.11.UNRELEASED
void tp_account_channel_request_ensure_channel_async (TpAccountChannelRequest *self
,const gchar *preferred_handler
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously calls EnsureChannel on the ChannelDispatcher to create a
channel with the properties defined in "request"
and let the ChannelDispatcher dispatch it to an handler.
callback
will be called when an existing channel's handler has been
notified, a new channel has been created and dispatched, or the request
has failed.
You can then call tp_account_channel_request_ensure_channel_finish()
to
get the result of the operation.
|
a TpAccountChannelRequest |
|
Either the well-known bus name (starting with
TP_CLIENT_BUS_NAME_BASE ) of the preferred handler for the channel,
or NULL to indicate that any handler would be acceptable.
|
|
optional GCancellable object, NULL to ignore
|
|
a callback to call when the request is satisfied |
|
data to pass to callback
|
Since 0.11.UNRELEASED
gboolean tp_account_channel_request_ensure_channel_finish (TpAccountChannelRequest *self
,GAsyncResult *result
,GError **error
);
Finishes an async channel creation started using
tp_account_channel_request_ensure_channel_async()
.
|
a TpAccountChannelRequest |
|
a GAsyncResult |
|
a GError to fill |
Returns : |
TRUE if the channel was successfully ensured and (re-)dispatched,
otherwise FALSE .
|
Since 0.11.UNRELEASED
"account"
property"account" TpAccount* : Read / Write / Construct Only
The TpAccount used to request the channel. Read-only except during construction.
This property can't be NULL
.
Since 0.11.UNRELEASED
"request"
property "request" GHashTable_gchararray+GValue_* : Read / Write / Construct Only
The TpAccount used to request the channel. Read-only except during construction.
This property can't be NULL
.
Since 0.11.UNRELEASED
"user-action-time"
property"user-action-time" gint64 : Read / Write / Construct Only
The user action time that will be passed to mission-control when requesting the channel.
Default value: 0
Since 0.11.UNRELEASED
"re-handled"
signalvoid user_function (TpAccountChannelRequest *self, TpChannel *channel, gint64 user_action_time, TpHandleChannelsContext *context, gpointer user_data) : Run Last / Has Details
Emitted when channel which has been created using self
has be re-handled.
|
a TpAccountChannelRequest |
|
the TpChannel being re-handled |
|
the time at which user action occurred, or 0 if this channel is to be handled for some reason not involving user action. |
|
a TpHandleChannelsContext representing the context of
the HandleChannels() call.
|
|
user data set when the signal handler was connected. |
Since 0.11.UNRELEASED