summaryrefslogtreecommitdiff
path: root/extensions/Connection_Interface_Contact_Capabilities.xml
blob: 55b3256ce178947cc539fa642283dba7afb3de8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<?xml version="1.0" ?>
<node name="/Connection_Interface_Contact_Capabilities" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
  <tp:copyright> Copyright (C) 2005, 2006 Collabora Limited </tp:copyright>
  <tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
  <tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
  <tp:license xmlns="http://www.w3.org/1999/xhtml">
    <p>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.</p>

<p>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.</p>

<p>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.</p>
  </tp:license>
  <interface name="org.freedesktop.Telepathy.Connection.Interface.ContactCapabilities.DRAFT">
    <tp:requires interface="org.freedesktop.Telepathy.Connection"/>

    <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
      <p>An interface for connections where it is possible to know what channel
        classes may be created before the request is made to the connection
        object. Each capability represents a commitment by the connection
        manager that it will ordinarily be able to create a channel when given
        a request with the properties defined by the channel class.</p>

      <p>Capabilities pertain to particular contact handles, and represent
        activities such as having a text chat, a voice call with the user or a
        stream tube of a defined type.</p>

      <p>This interface also provides for user interfaces notifying the
        connection manager of what capabilities to advertise for the user. This
        is done by using the SetSelfCapabilities method, and deals with
        channel properties values pertaining to them which are implemented by
        available client processes.</p>

    </tp:docstring>

    <method name="SetSelfCapabilities">
      <arg direction="in" name="caps" type="aa{sv}"
           tp:type="String_Variant_Map[]">
        <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
          An array of channel classes to replace to the list of what the
          connection can handle
        </tp:docstring>
      </arg>
      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
        <p>Used by user interfaces to indicate which channel classes they are
        able to handle on this connection. It replaces the previous advertised
        channel classes by the set given as parameter.</p>

        <p>If a channel class is unknown by the connection manager, it is just
        ignored. No error are returned in this case, and other known channel
        class are added.</p>

        <p>Upon a successful invocation of this method, the
        ContactCapabilitiesChanged signal will be emitted for the user's own
        handle (as returned by GetSelfHandle) by the connection manager to
        indicate the changes that have been made.</p>
      </tp:docstring>
      <tp:possible-errors>
        <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
        <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
      </tp:possible-errors>
    </method>

    <method name="GetContactCapabilities">
      <arg direction="in" name="handles" type="au" tp:type="Contact_Handle[]">
        <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
          <p>An array of contact handles for this connection.</p>

          <p>The handle zero MUST NOT be included in the request.</p>
        </tp:docstring>
      </arg>
      <arg direction="out" type="a(ua{sv}as)"
           tp:type="Enhanced_Contact_Capability[]">
        <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
          An array of structures containing:
          <ul>
            <li>a dictionary mapping the channel properties to their values.</li>
            <li>an array of additional allowed properties</li>
          </ul>
        </tp:docstring>
      </arg>
      <tp:docstring>
        Returns an array of enhanced capabilities for the given contact handles.
      </tp:docstring>
      <tp:possible-errors>
        <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
        <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle">
          <tp:docstring>
            The handle does not represent a contact. Zero is always invalid.
          </tp:docstring>
        </tp:error>
      </tp:possible-errors>
    </method>

    <signal name="ContactCapabilitiesChanged">
      <arg name="caps" type="a(ua{sv}as)" tp:type="Enhanced_Contact_Capability[]">
        <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
          All the capabilities of the contact
        </tp:docstring>
      </arg>
      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
        <p>Announce that there has been a change of capabilities on the
          given handle.</p>
      </tp:docstring>
    </signal>

    <tp:struct name="Enhanced_Contact_Capability" array-name="Enhanced_Contact_Capability_List">
      <tp:docstring>
        A struct representing a capability posessed by a contact,
        as returned by GetContactCapabilities on the ContactCapabilities
        interface. The channel creation will succeed if the request contains
        all the Fixed_Properties will the values specified in this struct. The
        request can contain additional properties from Allowed_Properties. If
        the request contains a property which does not belong to
        Fixed_Properties nor to Allowed_Properties, the request will fail.
      </tp:docstring>
      <tp:member type="u" tp:type="Contact_Handle" name="Handle"/>
      <tp:member type="a{sv}" tp:type="Channel_Class"
                 name="Fixed_Properties">
        <tp:docstring>
          A dictionary mapping the channel properties to their values.
        </tp:docstring>
      </tp:member>
      <tp:member type="as" name="Allowed_Properties">
        <tp:docstring>
          An array of additional allowed properties.
        </tp:docstring>
      </tp:member>
    </tp:struct>

    <tp:struct name="Contact_Capability_Change" array-name="Contact_Capability_Change_List">
      <tp:docstring>A struct representing a change to one of a contact's capabilities, as
        seen in the ContactCapabilitiesChanged signal on the ContactCapabilities
        interface.</tp:docstring>
      <tp:member type="a(ua{sv}as)" tp:type="Enhanced_Contact_Capability[]"
                 name="Removed_Capabilities"/>
      <tp:member type="a(ua{sv}as)" tp:type="Enhanced_Contact_Capability[]"
                 name="Added_Capabilities"/>
    </tp:struct>

  </interface>
</node>
<!-- vim:set sw=2 sts=2 et ft=xml: -->