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.
Approvers notify the user that new channels have been created, and allow the user to accept or reject those channels.
They can also select which channel handler will be used for the channel, for instance by offering the user a list of possible handlers rather than just an accept/reject choice.
However, the Channel Dispatcher must be able to prioritize possible handlers on its own using some reasonable heuristic, probably based on user configuration.
It is possible (and useful) to have an approver and a channel handler in the same process; this is particularly useful if a channel handler wants to claim responsibility for particular channels itself.
All approvers are notified simultaneously. For instance, in a desktop system, there might be one approver that displays a notification-area icon, one that is part of a contact list window and highlights contacts there, and one that is part of a full-screen media player.
Any approver can approve the handling of a channel with a particular channel handler. Approvers can also request that the channel is rejected. The first approver to reply gets its decision acted on; any other approvers that reply at the same time will get a D-Bus error, indicating that the channel has already been dealt with.
Approvers should usually prompt the user and ask for confirmation, rather than dispatching the channel to a handler straight away.
A specification of the channels in which this approver is
interested. The
(FIXME: what happens if some but not all of the channels match this?)
This property works in exactly the same way as the
Called by the channel dispatcher when a ChannelDispatchOperation in which the approver has registered an interest is created, or when the approver starts up while such channel dispatch operations already exist.
The channel dispatcher SHOULD call this method on all approvers at the same time. If no approvers return from this method successfully (including situations where there are no matching approvers at all), the channel dispatcher SHOULD consider this to be an error, and recover by dispatching the channel to the most preferred handler.
The