Conn.I.CommunicationPolicy.DRAFT — Telepathy D-Bus Interface Specification

# Interface Connection.Interface.CommunicationPolicy.DRAFT

Interface Index (Compact) | Summary | Description | Methods | Signals | Properties | Types

### Methods

SetPolicy | (s: Channel_Type, (uv): Policy) | → | nothing |

### Signals

PolicyChanged | (a{s(uv)}: Changed_Policies) |

### Properties

SupportedPolicies | a(asau) (Supported_Policy_List) | Read only |  |
ActivePolicies | a{s(uv)} (Active_Policies_Map) | Read only |  |

### Types

Active_Policies_Map | Mapping | a{s(uv)} |
Supported_Policy | Struct | (asau) |

WARNING: This interface is experimental and is likely to cause havoc to your API/ABI if bindings are generated. Do not include this interface in libraries that care about compatibility.
Added in 0.21.1. (draft 1)
Objects implementing this interface must also implement:

- org.freedesktop.Telepathy.Connection.Interface.SimplePresence

### Description

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.

# Methods

(Permalink)

## SetPolicy (s: Channel_Type, (uv): Policy) → nothing

### Parameters

- Channel_Type — s (DBus_Interface)
The channel type to set the policy for.
- Policy — (uv) (Access_Control)
The policy to set for this channel.

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.

# Signals

(Permalink)

## PolicyChanged (a{s(uv)}: Changed_Policies)

### Parameters

- Changed_Policies — a{s(uv)} (Active_Policies_Map)
A subset of the active policies that have changed.

ActivePolicies has changed. This occurs when the server unilaterally changed the policy or SetPolicy has been called.

# Properties

Accessed using the org.freedesktop.DBus.Properties interface.
(Permalink)

## SupportedPolicies — a(asau) (Supported_Policy_List)

Read only
The communication policies supported by this connection.
(Permalink)

## ActivePolicies — a{s(uv)} (Active_Policies_Map)

Read only

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.

# Types

Mapping (Permalink)

## Active_Policies_Map — a{s(uv)}

A mapping of communication methods (channel types), and their associated policy.

- Channel_Type — s (DBus_Interface)
The channel interface with the policy.
- Active_Policy — (uv) (Access_Control)
The active policy for this channel type.

Struct (Permalink)

## Supported_Policy — (asau)

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.

##### Rationale:

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.

- Channel_Types — as (DBus_Interface_List)
A list of channel interfaces that support these policies.
- Supported_Policies — au (Access_Control_Type_List)
A list of supported policies.