This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Channel handlers are the eventual handler for a channel or a channel bundle; a typical channel handler is a user interface process handling channels of a particular type.
When a new incoming channel (one with
When a new outgoing channel (one with
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
If true, channels destined for this handler are automatically handled, without invoking approvers.
The intended usage is to allow a client handling one channel to
pick up closely related channels. Suppose a client capable of
handling both Text and StreamedMedia,
org.freedesktop.Telepathy.Client.Empathy
, is
handling a StreamedMedia channel. That client can take a second
well-known bus name, say
org.freedesktop.Telepathy.Client.Empathy._1._42.Bundle1
,
and configure an object at
/org/freedesktop/Telepathy/Client/Empathy/_1/_42/Bundle1
with BypassApproval = TRUE,
whose
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).
Clients are expected to know what channels they're already handling, and which channel object path corresponds to which window or tab. This can easily be done using a hash table keyed by channels' object paths.
This method can raise any D-Bus error. If it does, or if the handler loses its bus name before all the channels have closed, the handler is assumed to have failed or crashed, and the channel dispatcher MUST recover in an implementation-specific way.
It is RECOMMENDED that the channel dispatcher attempts to
close the channels using
Called by the ChannelDispatcher to indicate that channels have been requested, and that if the request is successful, they will be handled by this Handler.
This allows the UI to start preparing to handle the channels in advance (e.g. render a window with an "in progress" message), improving perceived responsiveness.
(FIXME: how do we know the returned channels will be handled by this handler? Do we just assume that they'll match the HandlerChannelFilter iff the request does?)
Some of the properties of the ChannelRequest. To avoid race conditions, this dictionary MUST NOT include properties whose values could subsequently change. It SHOULD include as many properties as possible, given that constraint.
In particular, the properties
Called by the ChannelDispatcher to indicate that a request
previously passed to
The name of the D-Bus error with which the request failed.
If this is org.freedesktop.Telepathy.Errors.NotYours
,
this indicates that the request succeeded, but all the resulting
channels were given to some other handler.
A list of the channels that this Handler is currently handling.
There is no change notification.
This property exists for state recovery - it makes it possible for channel handling to survive a ChannelDispatcher crash.
If the channel dispatcher is automatically replaced, the replacement can discover all Handlers by looking for the Client well-known bus names, and discover which channels they are currently handling. Once this has been done, all unhandled channels can be re-dispatched, and the only issue visible to the user is that unhandled channels that they have already approved might be sent back to Approvers.