Methods
HandleChannels | (o: Account, o: Connection, a(oa{sv}): Channels, ao: Requests_Satisfied, t: User_Action_Time, a{sv}: Handler_Info) | → | nothing |
Properties
HandlerChannelFilter | aa{sv} ( Channel_Class_List) | Read only | ||
BypassApproval | b | Read only | ||
Capabilities | as ( Handler_Capability_Token_List) | Read only | ||
HandledChannels | ao | Read only |
Types
Handler_Capability_Token | Simple Type | s |
Description
Handlers are the user interface for a channel. They turn an abstract Telepathy channel into something the user wants to see, like a text message stream or an audio and/or video call.
For its entire lifetime, each channel on a connection known to the channel dispatcher is either being processed by the channel dispatcher, or being handled by precisely one Handler.
Because each channel is only handled by one Handler, handlers may perform actions that only make sense to do once, such as acknowledging Text messages, doing the actual streaming for StreamedMedia channels with the MediaSignalling interface, or transferring the file in FileTransfer channels.
When a new incoming channel (one with Requested = FALSE) is offered to Approvers by the channel dispatcher, it also offers the Approvers a list of all the running or activatable handlers whose HandlerChannelFilter property (possibly as cached in the .client file) indicates that they are able to handle the channel. The Approvers can choose one of those channel handlers to handle the channel.
When a new outgoing channel (one with Requested = TRUE) appears, the channel dispatcher passes it to an appropriate channel handler automatically.
Methods
HandleChannels (o: Account, o: Connection, a(oa{sv}): Channels, ao: Requests_Satisfied, t: User_Action_Time, a{sv}: Handler_Info) → nothing
Parameters
- Account — o
- Connection — o
- Channels — a(oa{sv}) (Channel_Details_List)
- Requests_Satisfied — ao
- User_Action_Time — t
- Handler_Info — a{sv}
request-properties
- a{oa{sv}}- A map from ChannelRequest paths listed in Requests_Satisfied to Qualified_Property_Value_Maps containing namespaced immutable properties of each request.
The requests satisfied by these channels.
Rationale:
Additional information about these channels. Currently defined keys are:
When more keys are defined for this dictionary, all will be optional; handlers MAY safely ignore any entry in this dictionary.
Called by the channel dispatcher when this client should handle these channels, or when this client should present channels that it is already handling to the user (e.g. bring them into the foreground).
Rationale:
This method can raise any D-Bus error. If it does, the handler is assumed to have failed or crashed, and the channel dispatcher MUST recover in an implementation-specific way; it MAY attempt to dispatch the channels to another handler, or close the channels.
If closing the channels, it is RECOMMENDED that the channel dispatcher attempts to close the channels using Channel.Close, but resorts to calling Channel.Interface.Destroyable.Destroy (if available) or ignoring the channel (if not) if the same handler repeatedly fails to handle channels.
After HandleChannels returns successfully, the client process is considered to be responsible for the channel until it its unique name disappears from the bus.
Rationale:
Properties
HandlerChannelFilter — aa{sv} (Channel_Class_List)
A specification of the channels that this channel handler can deal with. It will be offered to approvers as a potential channel handler for bundles that contain only suitable channels, or for suitable channels that must be handled separately.
This property works in exactly the same way as the Client.Observer.ObserverChannelFilter property. In particular, it cannot change while the handler process continues to own the corresponding Client bus name.
In the .client file, it is represented in the same way as ObserverChannelFilter, but the group has the same name as this interface and the keys start with HandlerChannelFilter instead of ObserverChannelFilter.
BypassApproval — b
If true, channels destined for this handler are automatically handled, without invoking approvers.
Rationale:
For service-activatable handlers, this property should be specified in the handler's .client file as follows:
[org.freedesktop.Telepathy.Client.Handler] BypassApproval=true
Capabilities — as (Handler_Capability_Token_List)
The set of additional capabilities supported by this handler. This describes things like support for streamed media codecs and NAT traversal mechanisms: see the Contact Capabilities interface for more details.
For handlers that have a .client
file, the
channel dispatcher may discover this property from the
org.freedesktop.Telepathy.Client.Handler.Capabilities
group; for each capability, that group contains a key
whose name is the capability, with value true
.
Keys with other values SHOULD NOT appear in this group.
For instance, the .client
file for a streamed media
handler that supports ICE-UDP NAT traversal, Speex audio,
and Theora and H264 video might contain this group:
[org.freedesktop.Telepathy.Client.Handler.Capabilities] org.freedesktop.Telepathy.Channel.Interface.MediaSignalling/ice-udp=true org.freedesktop.Telepathy.Channel.Interface.MediaSignalling/audio/speex=true org.freedesktop.Telepathy.Channel.Interface.MediaSignalling/video/theora=true org.freedesktop.Telepathy.Channel.Interface.MediaSignalling/video/h264=true
Like the HandlerChannelFilter
property, this property cannot change while the Handler owns its
Client bus name. However, the .client
file, if any,
can change (due to upgrades or installation of pluggable codecs),
and the capabilities really supported by the handler might not
exactly match what is cached in the .client
file.
Rationale:
HandledChannels — ao
A list of the channels that this process is currently handling.
There is no change notification.
Rationale:
The value of this property SHOULD be the same for all Client instances that share a unique bus name, and SHOULD include all channels that are being handled, even if they were conceptually handled by a different Client instance.
Rationale:
Types
Handler_Capability_Token — s
Rationale:
So far, all client capabilities are defined by the MediaSignalling interface.