TelepathyGLib.AccountChannelRequest¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
The |
||
r |
|||
r/w/co |
A dictionary containing desirable properties for the channel |
||
r/w/co |
UserActionTime |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted when the channel created using self has been “re-handled”. |
Fields¶
- Inherited:
Class Details¶
- class TelepathyGLib.AccountChannelRequest(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Data structure representing a
TelepathyGLib.AccountChannelRequest
object.New in version 0.11.12.
- classmethod new(account, request, user_action_time)¶
- Parameters:
account (
TelepathyGLib.Account
) – aTelepathyGLib.Account
request ({
str
:GObject.Value
}) – the requested properties of the channel (seeTelepathyGLib.AccountChannelRequest
:request
)user_action_time (
int
) – the time of the user action that caused this request, or one of the special valuesTelepathyGLib.USER_ACTION_TIME_NOT_USER_ACTION
or %TP_USER_ACTION_TIME_CURRENT_TIME (seeTelepathyGLib.AccountChannelRequest
:user-action-time
)
- Returns:
a new
TelepathyGLib.AccountChannelRequest
object- Return type:
Convenience function to create a new
TelepathyGLib.AccountChannelRequest
object.New in version 0.11.12.
- classmethod new_audio_call(account, user_action_time)¶
- Parameters:
account (
TelepathyGLib.Account
) – aTelepathyGLib.Account
user_action_time (
int
) – the time of the user action that caused this request, or one of the special valuesTelepathyGLib.USER_ACTION_TIME_NOT_USER_ACTION
or %TP_USER_ACTION_TIME_CURRENT_TIME (seeTelepathyGLib.AccountChannelRequest
:user-action-time
)
- Returns:
a new
TelepathyGLib.AccountChannelRequest
object- Return type:
Convenience function to create a new
TelepathyGLib.AccountChannelRequest
object which will yield a Call channel, initially carrying audio only.After creating the request, you will usually also need to set the “target” of the channel by calling one of the following functions:
To call a contact, either use
TelepathyGLib.AccountChannelRequest.set_target_contact
() or one of the generic methods that takes a handle type argument. To check whether this is possible, useTelepathyGLib.Capabilities.supports_audio_call
() with handle_type set toTelepathyGLib.HandleType.CONTACT
.reinstate this when we have CMs that actually allow it: In some protocols it is possible to create a conference call which takes place in a named chatroom, by calling
TelepathyGLib.AccountChannelRequest.set_target_id
() with handle_type set toTelepathyGLib.HandleType.ROOM
. To test whether this is possible, useTelepathyGLib.Capabilities.supports_audio_call
() with handle_type set toTelepathyGLib.HandleType.ROOM
.In some protocols, it is possible to create a Call channel without setting a target at all, which will result in a new, empty conference call. To test whether this is possible, use
TelepathyGLib.Capabilities.supports_audio_call
() with handle_type set toTelepathyGLib.HandleType.NONE
.New in version 0.19.0.
- classmethod new_audio_video_call(account, user_action_time)¶
- Parameters:
account (
TelepathyGLib.Account
) – aTelepathyGLib.Account
user_action_time (
int
) – the time of the user action that caused this request, or one of the special valuesTelepathyGLib.USER_ACTION_TIME_NOT_USER_ACTION
or %TP_USER_ACTION_TIME_CURRENT_TIME (seeTelepathyGLib.AccountChannelRequest
:user-action-time
)
- Returns:
a new
TelepathyGLib.AccountChannelRequest
object- Return type:
Convenience function to create a new
TelepathyGLib.AccountChannelRequest
object which will yield a Call channel, initially carrying both audio and video.This is the same as
TelepathyGLib.AccountChannelRequest.new_audio_call
(), except that the channel will initially carry video as well as audio, and instead of usingTelepathyGLib.Capabilities.supports_audio_call
() you should test capabilities withTelepathyGLib.Capabilities.supports_audio_video_call
().See the documentation of
TelepathyGLib.AccountChannelRequest.new_audio_call
() for details of how to set the target (contact, chatroom etc.) for the call.New in version 0.19.0.
- classmethod new_dbus_tube(account, service_name, user_action_time)¶
- Parameters:
account (
TelepathyGLib.Account
) – aTelepathyGLib.Account
service_name (
str
) – the service name that will be used over the tube. It should beuser_action_time (
int
) – the time of the user action that caused this request, or one of the special valuesTelepathyGLib.USER_ACTION_TIME_NOT_USER_ACTION
or %TP_USER_ACTION_TIME_CURRENT_TIME (seeTelepathyGLib.AccountChannelRequest
:user-action-time
)
- Returns:
a new
TelepathyGLib.AccountChannelRequest
object- Return type:
Convenience function to create a new
TelepathyGLib.AccountChannelRequest
object, which will yield a DBusTube channel.After creating the request, you will also need to set the “target” of the channel by calling one of the following functions:
New in version 0.23.2.
- classmethod new_file_transfer(account, filename, mime_type, size, user_action_time)¶
- Parameters:
account (
TelepathyGLib.Account
) – aTelepathyGLib.Account
filename (
str
) – a suggested name for the file, which should not contain directories or directory separators (for example, if you are sending a file called /home/user/monkey.pdf, set this to monkey.pdf)mime_type (
str
orNone
) – the MIME type (content-type) of the file; aNone
value is allowed, and is treated as “application/octet-stream”size (
int
) – the file’s size in bytesuser_action_time (
int
) – the time of the user action that caused this request, or one of the special valuesTelepathyGLib.USER_ACTION_TIME_NOT_USER_ACTION
or %TP_USER_ACTION_TIME_CURRENT_TIME (seeTelepathyGLib.AccountChannelRequest
:user-action-time
)
- Returns:
a new
TelepathyGLib.AccountChannelRequest
object- Return type:
Convenience function to create a new
TelepathyGLib.AccountChannelRequest
object, which will yield a FileTransfer channel to send a file to a contact.After creating the request, you will also need to set the “target” of the channel by calling one of the following functions:
New in version 0.19.0.
- classmethod new_stream_tube(account, service, user_action_time)¶
- Parameters:
account (
TelepathyGLib.Account
) – aTelepathyGLib.Account
service (
str
) – the service name that will be used over the tube. It should be a well-known TCP service name as defined by http://www.iana.org/assignments/port-numbers or http://www.dns-sd.org/ServiceTypes.html, for instance “rsync” or “daap”.user_action_time (
int
) – the time of the user action that caused this request, or one of the special valuesTelepathyGLib.USER_ACTION_TIME_NOT_USER_ACTION
or %TP_USER_ACTION_TIME_CURRENT_TIME (seeTelepathyGLib.AccountChannelRequest
:user-action-time
)
- Returns:
a new
TelepathyGLib.AccountChannelRequest
object- Return type:
Convenience function to create a new
TelepathyGLib.AccountChannelRequest
object, which will yield a StreamTube channel.After creating the request, you will also need to set the “target” of the channel by calling one of the following functions:
New in version 0.23.2.
- classmethod new_text(account, user_action_time)¶
- Parameters:
account (
TelepathyGLib.Account
) – aTelepathyGLib.Account
user_action_time (
int
) – the time of the user action that caused this request, or one of the special valuesTelepathyGLib.USER_ACTION_TIME_NOT_USER_ACTION
or %TP_USER_ACTION_TIME_CURRENT_TIME (seeTelepathyGLib.AccountChannelRequest
:user-action-time
)
- Returns:
a new
TelepathyGLib.AccountChannelRequest
object- Return type:
Convenience function to create a new
TelepathyGLib.AccountChannelRequest
object which will yield a Text channel.After creating the request, you will also need to set the “target” of the channel by calling one of the following functions:
New in version 0.19.0.
- classmethod new_vardict(account, request, user_action_time)¶
- Parameters:
account (
TelepathyGLib.Account
) – aTelepathyGLib.Account
request (
GLib.Variant
) – the requested properties of the channel (seeTelepathyGLib.AccountChannelRequest
:request
) as a %G_VARIANT_TYPE_VARDICTuser_action_time (
int
) – the time of the user action that caused this request, or one of the special valuesTelepathyGLib.USER_ACTION_TIME_NOT_USER_ACTION
or %TP_USER_ACTION_TIME_CURRENT_TIME (seeTelepathyGLib.AccountChannelRequest
:user-action-time
)
- Returns:
a new
TelepathyGLib.AccountChannelRequest
object- Return type:
Convenience function to create a new
TelepathyGLib.AccountChannelRequest
object.If request is a floating reference, this function will take ownership of it, much like
GLib.Variant.ref_sink
(). See documentation of that function for details.New in version 0.19.10.
- create_and_handle_channel_async(cancellable, callback, *user_data)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object,None
to ignorecallback (
Gio.AsyncReadyCallback
orNone
) – a callback to call when the request is satisfied
Asynchronously calls CreateChannel on the ChannelDispatcher to create a channel with the properties defined in
TelepathyGLib.AccountChannelRequest
:request
that you are going to handle yourself. When the operation is finished, callback will be called. You can then callTelepathyGLib.AccountChannelRequest.create_and_handle_channel_finish
() to get the result of the operation.(Behind the scenes, this works by creating a temporary
TelepathyGLib.BaseClient
, then acting likeTelepathyGLib.AccountChannelRequest.create_channel_async
() with the temporaryTelepathyGLib.BaseClient
as the preferred_handler.)The caller is responsible for closing the channel with tp_cli_channel_call_close() when it has finished handling it.
New in version 0.11.12.
- create_and_handle_channel_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
a new reference on a
TelepathyGLib.Channel
if the channel was successfully created and you are handling it, otherwiseNone
.- context:
pointer used to return a reference to the context of the HandleChannels() call, or
None
- Return type:
(
TelepathyGLib.Channel
orNone
, context:TelepathyGLib.HandleChannelsContext
)
Finishes an async channel creation started using
TelepathyGLib.AccountChannelRequest.create_and_handle_channel_async
().See
TelepathyGLib.AccountChannelRequest.ensure_and_handle_channel_finish
() for details of how context can be used.The caller is responsible for closing the channel with tp_cli_channel_call_close() when it has finished handling it.
New in version 0.11.12.
- create_and_observe_channel_async(preferred_handler, cancellable, callback, *user_data)¶
- Parameters:
preferred_handler (
str
) – Either the well-known bus name (starting withTelepathyGLib.CLIENT_BUS_NAME_BASE
) of the preferred handler for the channel, orNone
to indicate that any handler would be acceptable.cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object,None
to ignorecallback (
Gio.AsyncReadyCallback
orNone
) – a callback to call when the request is satisfied
Asynchronously calls CreateChannel on the ChannelDispatcher to create a channel with the properties defined in
TelepathyGLib.AccountChannelRequest
: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 callTelepathyGLib.AccountChannelRequest.create_channel_finish
() to get the result of the operation and aTelepathyGLib.Channel
representing the channel which has been created. Note that you are not handling this channel and so should interact with the channel as an Observer. See the Telepathy book for details about how clients should interact with channels.New in version 0.13.14.
- create_and_observe_channel_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
a newly created
TelepathyGLib.Channel
if the channel was successfully created and dispatched, otherwiseNone
.- Return type:
Finishes an async channel creation started using
TelepathyGLib.AccountChannelRequest.create_and_observe_channel_async
().New in version 0.13.14.
- create_channel_async(preferred_handler, cancellable, callback, *user_data)¶
- Parameters:
preferred_handler (
str
) – Either the well-known bus name (starting withTelepathyGLib.CLIENT_BUS_NAME_BASE
) of the preferred handler for the channel, orNone
to indicate that any handler would be acceptable.cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object,None
to ignorecallback (
Gio.AsyncReadyCallback
orNone
) – a callback to call when the request is satisfied
Asynchronously calls CreateChannel on the ChannelDispatcher to create a channel with the properties defined in
TelepathyGLib.AccountChannelRequest
: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 callTelepathyGLib.AccountChannelRequest.create_channel_finish
() to get the result of the operation.New in version 0.11.12.
- create_channel_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
True
if the channel was successfully created and dispatched, otherwiseFalse
.- Return type:
Finishes an async channel creation started using
TelepathyGLib.AccountChannelRequest.create_channel_async
().New in version 0.11.12.
- dup_request()¶
- Returns:
the value of
TelepathyGLib.AccountChannelRequest
:request-vardict
- Return type:
Return the
TelepathyGLib.AccountChannelRequest
:request-vardict
construct-only property.New in version 0.19.10.
- ensure_and_handle_channel_async(cancellable, callback, *user_data)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object,None
to ignorecallback (
Gio.AsyncReadyCallback
orNone
) – a callback to call when the request is satisfied
Asynchronously calls EnsureChannel on the ChannelDispatcher to create a channel with the properties defined in
TelepathyGLib.AccountChannelRequest
:request
that you are going to handle yourself. When the operation is finished, callback will be called. You can then callTelepathyGLib.AccountChannelRequest.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
TelepathyGLib.Error.NOT_YOURS
. The other handler will be notified that the channel was requested again (for instance withTelepathyGLib.AccountChannelRequest
::re-handled
,TelepathyGLib.BaseClientClassHandleChannelsImpl
orTelepathyGLib.SimpleHandler
:callback
), and can move its window to the foreground, if applicable.(Behind the scenes, this works by creating a temporary
TelepathyGLib.BaseClient
, then acting likeTelepathyGLib.AccountChannelRequest.ensure_channel_async
() with the temporaryTelepathyGLib.BaseClient
as the preferred_handler.)New in version 0.11.12.
- ensure_and_handle_channel_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
a new reference on a
TelepathyGLib.Channel
if the channel was successfully created and you are handling it, otherwiseNone
.- context:
pointer used to return a reference to the context of the HandleChannels() call, or
None
- Return type:
(
TelepathyGLib.Channel
orNone
, context:TelepathyGLib.HandleChannelsContext
)
Finishes an async channel creation started using
TelepathyGLib.AccountChannelRequest.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
TelepathyGLib.Error.NOT_YOURS
.context can be used to obtain extensible information about the channel via
TelepathyGLib.HandleChannelsContext.get_handler_info
(), and any similar methods that are added in future. It is not valid for the caller of this method to callTelepathyGLib.HandleChannelsContext.accept
(),TelepathyGLib.HandleChannelsContext.delay
() orTelepathyGLib.HandleChannelsContext.fail
().New in version 0.11.12.
- ensure_and_observe_channel_async(preferred_handler, cancellable, callback, *user_data)¶
- Parameters:
preferred_handler (
str
) – Either the well-known bus name (starting withTelepathyGLib.CLIENT_BUS_NAME_BASE
) of the preferred handler for the channel, orNone
to indicate that any handler would be acceptable.cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object,None
to ignorecallback (
Gio.AsyncReadyCallback
orNone
) – a callback to call when the request is satisfied
Asynchronously calls EnsureChannel on the ChannelDispatcher to create a channel with the properties defined in
TelepathyGLib.AccountChannelRequest
: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 callTelepathyGLib.AccountChannelRequest.create_channel_finish
() to get the result of the operation and aTelepathyGLib.Channel
representing the channel which has been created. Note that you are not handling this channel and so should interact with the channel as an Observer. See the Telepathy book for details about how clients should interact with channels.If a suitable channel already existed, its handler will be notified that the channel was requested again (for instance with
TelepathyGLib.AccountChannelRequest
::re-handled
,TelepathyGLib.BaseClientClassHandleChannelsImpl
orTelepathyGLib.SimpleHandler
:callback
, if it is implemented using Telepathy-GLib), so that it can re-present the window to the user, for example. Otherwise, a new channel will be created and dispatched to a handler.New in version 0.13.14.
- ensure_and_observe_channel_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
a newly created
TelepathyGLib.Channel
if the channel was successfully ensure and (re-)dispatched, otherwiseNone
.- Return type:
Finishes an async channel creation started using
TelepathyGLib.AccountChannelRequest.create_and_observe_channel_async
().New in version 0.13.14.
- ensure_channel_async(preferred_handler, cancellable, callback, *user_data)¶
- Parameters:
preferred_handler (
str
) – Either the well-known bus name (starting withTelepathyGLib.CLIENT_BUS_NAME_BASE
) of the preferred handler for the channel, orNone
to indicate that any handler would be acceptable.cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object,None
to ignorecallback (
Gio.AsyncReadyCallback
orNone
) – a callback to call when the request is satisfied
Asynchronously calls EnsureChannel on the ChannelDispatcher to create a channel with the properties defined in
TelepathyGLib.AccountChannelRequest
:request
and let the ChannelDispatcher dispatch it to an handler.If a suitable channel already existed, its handler will be notified that the channel was requested again (for instance with
TelepathyGLib.AccountChannelRequest
::re-handled
,TelepathyGLib.BaseClientClassHandleChannelsImpl
orTelepathyGLib.SimpleHandler
:callback
, if it is implemented using Telepathy-GLib), so that it can re-present the window to the user, for example. Otherwise, a new channel will be created and dispatched to a 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
TelepathyGLib.AccountChannelRequest.ensure_channel_finish
() to get the result of the operation.New in version 0.11.12.
- ensure_channel_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
True
if the channel was successfully ensured and (re-)dispatched, otherwiseFalse
.- Return type:
Finishes an async channel creation started using
TelepathyGLib.AccountChannelRequest.ensure_channel_async
().New in version 0.11.12.
- get_account()¶
- Returns:
the value of
TelepathyGLib.AccountChannelRequest
:account
- Return type:
Return the
TelepathyGLib.AccountChannelRequest
:account
construct-only propertyNew in version 0.11.12.
- get_channel_request()¶
- Returns:
the value of
TelepathyGLib.AccountChannelRequest
:channel-request
- Return type:
Return the
TelepathyGLib.AccountChannelRequest
:channel-request
propertyNew in version 0.13.13.
- get_request()¶
- Returns:
the value of
TelepathyGLib.AccountChannelRequest
:request
- Return type:
Return the
TelepathyGLib.AccountChannelRequest
:request
construct-only propertyNew in version 0.11.12.
- get_user_action_time()¶
- Returns:
the value of
TelepathyGLib.AccountChannelRequest
:user-action-time
- Return type:
Return the
TelepathyGLib.AccountChannelRequest
:user-action-time
construct-only propertyNew in version 0.11.12.
- set_channel_factory(factory)¶
- Parameters:
factory (
TelepathyGLib.ClientChannelFactory
) – aTelepathyGLib.ClientChannelFactory
Set factory as the
TelepathyGLib.ClientChannelFactory
that will be used to create the channel requested by self. By defaultTelepathyGLib.AutomaticProxyFactory
is used.This function can’t be called once self has been used to request a channel.
New in version 0.13.2.
Deprecated since version ???: since 0.15.5. The factory is taken from
TelepathyGLib.AccountChannelRequest
:account
.
- set_conference_initial_channels(channels)¶
-
Indicate that the channel which is going to be requested using self is an upgrade of the channels whose object paths is listed in channels.
This function can’t be called once self has been used to request a channel.
New in version 0.23.2.
- set_delegate_to_preferred_handler(delegate)¶
-
If delegate is
True
, asks to the client currently handling the channels to delegate them to the preferred handler (passed when callingTelepathyGLib.AccountChannelRequest.ensure_channel_async
() for example).This function can’t be called once self has been used to request a channel.
New in version 0.15.3.
- set_delegated_channel_callback(callback, *user_data)¶
- Parameters:
callback (
TelepathyGLib.AccountChannelRequestDelegatedChannelCb
) – function called the channel requested using self is delegated, may not beNone
user_data (
object
orNone
) – arbitrary user-supplied data passed to callback
Turn on support for the org.freedesktop.Telepathy.ChannelRequest.DelegateToPreferredHandler hint.
When receiving a request containing this hint, self will automatically delegate the channel to the preferred handler of the request and then call callback to inform the client that it is no longer handling this channel.
callback may be called any time after (and only after) requesting and handling the channel (i.e. you have called create_and_handle or ensure_and_handle).
This function can’t be called once self has been used to request a channel.
See also:
TelepathyGLib.BaseClient.set_delegated_channels_callback
()New in version 0.15.3.
- set_file_transfer_description(description)¶
- Parameters:
description (
str
) – a description of the file
Configure this channel request to provide the recipient of the file with the given description.
If file descriptions are not supported by the protocol, or if this method is used on a request that is not actually a file transfer, the channel request will fail. Use
TelepathyGLib.Capabilities.supports_file_transfer_description
() to determine whether outgoing file transfers can have a description.This function can’t be called once self has been used to request a channel.
New in version 0.19.0.
- set_file_transfer_hash(hash_type, hash)¶
- Parameters:
hash_type (
TelepathyGLib.FileHashType
) – a type of hashhash (
str
) – hash of the contents of the file transfer
Configure this channel request to accompany the file transfer with the hash of the file.
This function can’t be called once self has been used to request a channel.
New in version 0.23.2.
- set_file_transfer_initial_offset(offset)¶
- Parameters:
offset (
int
) – the offset into the file at which the transfer will start
Configure this channel request to inform the recipient of the file that this channel will not send the first offset bytes of the file. In some protocols, this can be used to resume an interrupted transfer.
If this method is not called, the default is to start from the beginning of the file (equivalent to offset = 0).
If offsets greater than 0 are not supported by the protocol, or if this method is used on a request that is not actually a file transfer, the channel request will fail. Use
TelepathyGLib.Capabilities.supports_file_transfer_initial_offset
() to determine whether offsets greater than 0 are available.This function can’t be called once self has been used to request a channel.
New in version 0.19.0.
- set_file_transfer_timestamp(timestamp)¶
- Parameters:
timestamp (
int
) – the modification timestamp of the file, in seconds since the Unix epoch (the beginning of 1970 in the UTC time zone), as returned byGLib.DateTime.to_unix
()
Configure this channel request to accompany the file transfer with the given modification timestamp for the file.
If file timestamps are not supported by the protocol, or if this method is used on a request that is not actually a file transfer, the channel request will fail. Use tp_capabilities_supports_file_transfer_date() to determine whether outgoing file transfers can have a timestamp.
This function can’t be called once self has been used to request a channel.
New in version 0.19.0.
- set_file_transfer_uri(uri)¶
- Parameters:
uri (
str
) – the source URI for the file
Configure this channel request to provide other local Telepathy components with the URI of the file being sent. Unlike most properties on a file transfer channel, this information is not sent to the recipient of the file; instead, it is signalled on D-Bus for use by other Telepathy components.
The URI should usually be a file URI as defined by
RFC 1738 §3.10 (for instance, file:///path/to/file or file://localhost/path/to/file). If a remote resource is being transferred to a contact, it may have a different scheme, such as http.
Even if this method is used, the connection manager will not read the file from disk: the handler for the channel is still responsible for streaming the file. However, providing the URI allows a local logger to log which file was transferred, for instance.
If this functionality is not supported by the connection manager, or if this method is used on a request that is not actually a file transfer, the channel request will fail. Use
TelepathyGLib.Capabilities.supports_file_transfer_uri
() to determine whether outgoing file transfers can have a URI.This function can’t be called once self has been used to request a channel.
New in version 0.19.0.
- set_hint(key, value)¶
- Parameters:
key (
str
) – the key used for the hintvalue (
GLib.Variant
) – a variant containting the hint value
Set additional information about the channel request, which will be used in the resulting request’s
TelepathyGLib.ChannelRequest
:hints
property.This function can’t be called once self has been used to request a channel.
New in version 0.19.8.
- set_hints(hints)¶
-
Set additional information about the channel request, which will be used as the value for the resulting request’s
TelepathyGLib.ChannelRequest
:hints
property.This function can’t be called once self has been used to request a channel.
In high-level language bindings, use
TelepathyGLib.AccountChannelRequest.set_hint
() instead.New in version 0.13.14.
- set_initial_invitee_ids(ids)¶
-
Indicate that the contacts listed in ids have to be invited to the conference represented by the channel which is going to be requested using self.
This function can’t be called once self has been used to request a channel.
New in version 0.23.2.
- set_initial_invitees(contacts)¶
- Parameters:
contacts ([
TelepathyGLib.Contact
]) – aGLib.PtrArray
ofTelepathyGLib.Contact
Indicate that the contacts listed in contacts have to be invited to the conference represented by the channel which is going to be requested using self.
This function can’t be called once self has been used to request a channel.
New in version 0.23.2.
- set_request_property(name, value)¶
- Parameters:
name (
str
) – a D-Bus property namevalue (
GLib.Variant
) – an arbitrary value for the property
Configure this channel request to include the given property, as documented in the Telepathy D-Bus API Specification or an implementation-specific extension.
Using this method is not recommended, but it can be necessary for experimental or implementation-specific interfaces.
If the property is not supported by the protocol or channel type, the channel request will fail. Use
TelepathyGLib.Capabilities
and the Telepathy D-Bus API Specification to determine which properties are available.If value is a floating reference, this method takes ownership of it by using
GLib.Variant.ref_sink
(). This allows convenient inline use ofGLib.Variant
constructors:tp_account_channel_request_set_request_property (acr, "com.example.Int", g_variant_new_int32 (17)); tp_account_channel_request_set_request_property (acr, "com.example.String", g_variant_new_string ("ferret"));
It is an error to provide a value which contains types not supported by D-Bus.
This function can’t be called once self has been used to request a channel.
New in version 0.19.0.
- set_sms_channel(is_sms_channel)¶
-
If is_sms_channel is set to
True
, messages sent and received on the requested channel will be transmitted via SMS.This function can’t be called once self has been used to request a channel.
New in version 0.23.2.
- set_target_contact(contact)¶
- Parameters:
contact (
TelepathyGLib.Contact
) – the contact to be contacted
Configure this request to create a peer-to-peer channel with contact as the other peer.
This function can’t be called once self has been used to request a channel.
New in version 0.19.0.
- set_target_id(handle_type, identifier)¶
- Parameters:
handle_type (
TelepathyGLib.HandleType
) – the type of identifier, typicallyTelepathyGLib.HandleType.CONTACT
orTelepathyGLib.HandleType.ROOM
identifier (
str
) – the unique identifier of the contact, room etc. to be contacted
Configure this request to create a channel with identifier, an identifier of type handle_type.
This function can’t be called once self has been used to request a channel.
New in version 0.19.0.
Signal Details¶
- TelepathyGLib.AccountChannelRequest.signals.re_handled(account_channel_request, channel, user_action_time, context)¶
- Signal Name:
re-handled
- Flags:
- Parameters:
account_channel_request (
TelepathyGLib.AccountChannelRequest
) – The object which received the signalchannel (
TelepathyGLib.Channel
) – theTelepathyGLib.Channel
being re-handleduser_action_time (
int
) – the time at which user action occurred, or one of the special valuesTelepathyGLib.USER_ACTION_TIME_NOT_USER_ACTION
or %TP_USER_ACTION_TIME_CURRENT_TIME; seeTelepathyGLib.AccountChannelRequest
:user-action-time
context (
TelepathyGLib.HandleChannelsContext
) – aTelepathyGLib.HandleChannelsContext
representing the context of the HandleChannels() call.
Emitted when the channel created using self has been “re-handled”.
This means that a Telepathy client has made another request for a matching channel using an “ensure” API like
TelepathyGLib.AccountChannelRequest.ensure_channel_async
(), while the channel still exists. Instead of creating a new channel, the channel dispatcher notifies the existing handler of channel, resulting in this signal.Most GUI handlers should respond to this signal by checking user_action_time, and if appropriate, moving to the foreground.
context can be used to obtain extensible information about the channel via
TelepathyGLib.HandleChannelsContext.get_handler_info
(), and any similar methods that are added in future. It is not valid for the receiver of this signal to callTelepathyGLib.HandleChannelsContext.accept
(),TelepathyGLib.HandleChannelsContext.delay
() orTelepathyGLib.HandleChannelsContext.fail
().New in version 0.11.12.
Property Details¶
- TelepathyGLib.AccountChannelRequest.props.account¶
- Name:
account
- Type:
- Default Value:
- Flags:
The
TelepathyGLib.Account
used to request the channel. Read-only except during construction.This property can’t be
None
.New in version 0.11.12.
- TelepathyGLib.AccountChannelRequest.props.channel_request¶
- Name:
channel-request
- Type:
- Default Value:
- Flags:
The
TelepathyGLib.ChannelRequest
used to request the channel, orNone
if the channel has not be requested yet.This can be useful for example to compare with the
TelepathyGLib.ChannelRequest
objects received from the requests_satisfied argument ofTelepathyGLib.SimpleHandlerHandleChannelsImpl
to check if the client is asked to handle the channel it just requested.Note that the
TelepathyGLib.ChannelRequest
objects may be different while still representing the same ChannelRequest on D-Bus. You have to compare them using their object paths (TelepathyGLib.Proxy.get_object_path
()).New in version 0.13.13.
- TelepathyGLib.AccountChannelRequest.props.request_vardict¶
- Name:
request-vardict
- Type:
- Default Value:
- Flags:
The desired D-Bus properties for the channel.
When constructing a new object, one of
TelepathyGLib.AccountChannelRequest
:request
orTelepathyGLib.AccountChannelRequest
:request-vardict
must be set to a non-None
value, and the other must remain unspecified.New in version 0.19.10.
- TelepathyGLib.AccountChannelRequest.props.user_action_time¶
- Name:
user-action-time
- Type:
- Default Value:
0
- Flags:
The user action time that will be passed to the channel dispatcher when requesting the channel.
This may be the time at which user action occurred, or one of the special values
TelepathyGLib.USER_ACTION_TIME_NOT_USER_ACTION
or %TP_USER_ACTION_TIME_CURRENT_TIME.If
TelepathyGLib.USER_ACTION_TIME_NOT_USER_ACTION
, the action doesn’t involve any user action. Clients should avoid stealing focus when presenting the channel.If %TP_USER_ACTION_TIME_CURRENT_TIME, clients SHOULD behave as though the user action happened at the current time, e.g. a client may request that its window gains focus.
On X11-based systems, GDK 2, GDK 3, Clutter 1.0 etc.,
TelepathyGLib.user_action_time_from_x11
() can be used to convert an X11 timestamp to a Telepathy user action time.If the channel request succeeds, this user action time will be passed on to the channel’s handler. If the handler is a GUI, it may use
TelepathyGLib.user_action_time_should_present
() to decide whether to bring its window to the foreground.New in version 0.11.12.