summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorAlban Crequy <alban.crequy@collabora.co.uk>2008-09-09 11:33:02 +0100
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-02-09 22:05:01 +0100
commita93f4d824d1328bd3ab09be744f316df622c3eb7 (patch)
tree7fc6b4d476a9d5c5237559e59351a6794ecaf28e /extensions
parent94cfc605aff7eeb4842386f6ac85190505d18259 (diff)
downloadtelepathy-salut-a93f4d824d1328bd3ab09be744f316df622c3eb7.tar.gz
Add the new capabilities interface in extensions/
Diffstat (limited to 'extensions')
-rw-r--r--extensions/Connection_Interface_Contact_Capabilities.xml150
-rw-r--r--extensions/Makefile.am1
-rw-r--r--extensions/all.xml1
3 files changed, 152 insertions, 0 deletions
diff --git a/extensions/Connection_Interface_Contact_Capabilities.xml b/extensions/Connection_Interface_Contact_Capabilities.xml
new file mode 100644
index 00000000..55b3256c
--- /dev/null
+++ b/extensions/Connection_Interface_Contact_Capabilities.xml
@@ -0,0 +1,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: -->
diff --git a/extensions/Makefile.am b/extensions/Makefile.am
index b3bd24b2..c6c0de91 100644
--- a/extensions/Makefile.am
+++ b/extensions/Makefile.am
@@ -1,6 +1,7 @@
tools_dir = $(top_srcdir)/tools
EXTRA_DIST = \
+ Connection_Interface_Contact_Capabilities.xml \
Channel_Type_File_Transfer.xml \
Channel_Type_Stream_Tube.xml \
Channel_Type_DBus_Tube.xml \
diff --git a/extensions/all.xml b/extensions/all.xml
index a4abbff8..2b7e5413 100644
--- a/extensions/all.xml
+++ b/extensions/all.xml
@@ -24,6 +24,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA</p>
<xi:include href="channel.xml"/>
<xi:include href="connection.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"/>