Copyright © 2010 Collabora Limited 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 Library 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. (draft 1)

This interface supports controlling which contacts are allowed to initiate text chats, incoming calls, and other forms of communication as supported by the underlying protocol. The policies supported for different communication methods on this connection are listed in the SupportedPolicies property. The current configuration is held in ActivePolicies; it can be modified using SetPolicy, and changes are signalled by PolicyChanged.

A mapping of communication methods (channel types), and their associated policy. The channel interface with the policy. The active policy for this channel type. The communication policies supported by this connection.

The active communication policies on this connection. Communication methods that are not in this mapping are considered open.

For example, to allow incoming calls only from contacts buddy list, and to allow text messages from anyone, the policy would look like this:

{
    'org.freedesktop.Telepathy.Channel.Type.Text' : Access_Control_Type_Open,
    'org.freedesktop.Telepathy.Channel.Type.Call' : Access_Control_Type_Publish_List
}
        

Changes to this property are signalled by PolicyChanged.

Set a policy for a communication method (channel type). Depending on the server or protocol, more than one communication method could be bound to the same policy, if calling this method on one channel type changes the policy on another channel type, the PolicyChanged signal that would follow would include all the channel types that have an altered policy. The channel type to set the policy for. The policy to set for this channel. ActivePolicies has changed. This occurs when the server unilaterally changed the policy or SetPolicy has been called. A subset of the active policies that have changed.

The communication methods (channel types), and the policies that can be applied to them. This is server and protocol dependant.

Grouped channel types will always have the same policy applied to them.

Different protocols have different limitations to the granularity of communication policies. One protocol might be able to set a different policy for VoIP calls and text chat, while another protocol might only be able to set one policy to both VoIP and text chat.
A list of channel interfaces that support these policies. A list of supported policies.