[Telepathy-commits] [telepathy-gabble/master] Add spec extension Connection_Interface_Contact_Capabilities.xml

Alban Crequy alban.crequy at collabora.co.uk
Fri Dec 5 09:42:26 PST 2008


---
 .../Connection_Interface_Contact_Capabilities.xml  |  106 ++++++++++++++++++++
 extensions/Makefile.am                             |    1 +
 extensions/all.xml                                 |    1 +
 3 files changed, 108 insertions(+), 0 deletions(-)
 create mode 100644 extensions/Connection_Interface_Contact_Capabilities.xml

diff --git a/extensions/Connection_Interface_Contact_Capabilities.xml b/extensions/Connection_Interface_Contact_Capabilities.xml
new file mode 100644
index 0000000..2dc027b
--- /dev/null
+++ b/extensions/Connection_Interface_Contact_Capabilities.xml
@@ -0,0 +1,106 @@
+<?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
+        types 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 given type and handle.</p>
+
+      <p>Capabilities pertain to particular contact handles, and represent
+        activities such as having a text chat or a voice call with the user.
+        The activities are represented by the D-Bus interface name of the
+        channel type for that activity, and channel properties which can be
+        requested.</p>
+
+      <!-- Not yet spec'ed
+
+      <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 AdvertiseContactCapabilities method, and deals with
+        the interface names of channel types and the channel properties values 
+        pertaining to them which are implemented by available client
+        processes.</p>
+        -->
+
+    </tp:docstring>
+
+    <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(a{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 enhenced capabilities for the given contact handles.
+      </tp:docstring>
+      <tp:possible-errors>
+        <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
+        <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:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
+      </tp:possible-errors>
+    </method>
+
+    <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="a{sv}" tp:type="String_Variant_Map"
+                 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>
+  </interface>
+</node>
+<!-- vim:set sw=2 sts=2 et ft=xml: -->
diff --git a/extensions/Makefile.am b/extensions/Makefile.am
index a3dba5b..2991725 100644
--- a/extensions/Makefile.am
+++ b/extensions/Makefile.am
@@ -6,6 +6,7 @@ EXTRA_DIST = \
     Channel_Future.xml \
     OLPC_Activity_Properties.xml \
     OLPC_Buddy_Info.xml \
+    Connection_Interface_Contact_Capabilities.xml \
     Channel_Interface_Tube.xml \
     Channel_Type_DBus_Tube.xml \
     Channel_Type_Stream_Tube.xml
diff --git a/extensions/all.xml b/extensions/all.xml
index 4df3f83..6eacbf0 100644
--- a/extensions/all.xml
+++ b/extensions/all.xml
@@ -27,6 +27,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA</p>
 <xi:include href="Connection_Interface_Requests.xml"/>
 <xi:include href="OLPC_Buddy_Info.xml"/>
 <xi:include href="OLPC_Activity_Properties.xml"/>
+<xi:include href="Connection_Interface_Contact_Capabilities.xml"/>
 
 <xi:include href="Channel_Type_Stream_Tube.xml"/>
 <xi:include href="Channel_Type_DBus_Tube.xml"/>
-- 
1.5.6.5




More information about the Telepathy-commits mailing list