diff options
author | Alban Crequy <alban.crequy@collabora.co.uk> | 2008-10-08 15:15:19 +0100 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2009-02-09 22:12:31 +0100 |
commit | 3e66c3c5651ba14f0efe274727c3d09de7eb0b1f (patch) | |
tree | abf72e1b57245bc006328fc8a3124a309747f28d /extensions | |
parent | 5790c345eabd1a434b43b33b8670f0491ab8f36d (diff) | |
download | telepathy-salut-3e66c3c5651ba14f0efe274727c3d09de7eb0b1f.tar.gz |
Stop using the workaround for bug #17329
- Update the spec in extensions/:
There was a bug in dbus-glib that prevent to use the right type:
Instead of a{ua(a{sv}as)}, we used a(ua{sv}as) as a workaround.
See http://bugs.freedesktop.org/show_bug.cgi?id=17329
Now there is a fix, so we don't use the workaround anymore.
- Update the implementation for the new spec
- Update the unit test
This commit is similar to the following commit in telepathy-gabble:
|commit 6971f458ad0816e40807549202d8a4ffe58b72aa
|Author: Alban Crequy <alban.crequy@collabora.co.uk>
|Date: Wed Oct 8 11:30:59 2008 +0100
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/Connection_Interface_Contact_Capabilities.xml | 76 |
1 files changed, 49 insertions, 27 deletions
diff --git a/extensions/Connection_Interface_Contact_Capabilities.xml b/extensions/Connection_Interface_Contact_Capabilities.xml index 55b3256c..4d1d6320 100644 --- a/extensions/Connection_Interface_Contact_Capabilities.xml +++ b/extensions/Connection_Interface_Contact_Capabilities.xml @@ -1,7 +1,7 @@ <?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) 2005, 2006, 2008 Collabora Limited </tp:copyright> + <tp:copyright> Copyright (C) 2005, 2006, 2008 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 @@ -22,25 +22,27 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</ <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>An interface to get contact capabilities in order to know what channel + classes may be created with a contact 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 + with a contact 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 + <p>This interface also enables user interfaces to notify the connection + manager what capabilities to advertise for the user to other contacts. + 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"> + <method name="SetSelfCapabilities" + tp:name-for-bindings="Set_Self_Capabilities"> <arg direction="in" name="caps" type="aa{sv}" tp:type="String_Variant_Map[]"> <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> @@ -68,7 +70,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</ </tp:possible-errors> </method> - <method name="GetContactCapabilities"> + <method name="GetContactCapabilities" + tp:name-for-bindings="Get_Contact_Capabilities"> <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> @@ -76,8 +79,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</ <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[]"> + <!-- There was a bug in dbus-glib that prevent to use the right type: + Instead of a{ua(a{sv}as)}, we used a(ua{sv}as) as a workaround. + See http://bugs.freedesktop.org/show_bug.cgi?id=17329 + Now there is a fix, so we don't use the workaround anymore. + --> + <arg direction="out" type="a{ua(a{sv}as)}" + tp:type="Contact_Handle_Enhanced_Contact_Capability_Map"> <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> An array of structures containing: <ul> @@ -99,8 +107,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</ </tp:possible-errors> </method> - <signal name="ContactCapabilitiesChanged"> - <arg name="caps" type="a(ua{sv}as)" tp:type="Enhanced_Contact_Capability[]"> + <signal name="ContactCapabilitiesChanged" + tp:name-for-bindings="Contact_Capabilities_Changed"> + <arg name="handle" type="u" tp:type="Contact_Handle"> + <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> + <p>A contact handle.</p> + </tp:docstring> + </arg> + <arg name="caps" type="a(a{sv}as)" + tp:type="Enhanced_Contact_Capability[]"> <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> All the capabilities of the contact </tp:docstring> @@ -111,7 +126,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</ </tp:docstring> </signal> - <tp:struct name="Enhanced_Contact_Capability" array-name="Enhanced_Contact_Capability_List"> + <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 @@ -121,7 +137,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</ 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> @@ -135,15 +150,22 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</ </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> + <tp:mapping name="Contact_Handle_Enhanced_Contact_Capability_Map" + array-name="Contact_Handle_Enhanced_Contact_Capability_Map_List"> + <tp:docstring>A mapping from contact handle to their capabilities. + </tp:docstring> + <tp:member type="u" name="Key" tp:type="Contact_Handle"> + <tp:docstring> + A contact handle. + </tp:docstring> + </tp:member> + <tp:member type="a(a{sv}as)" name="Value" + tp:type="Enhanced_Contact_Capability[]"> + <tp:docstring> + The contact capabilities. + </tp:docstring> + </tp:member> + </tp:mapping> </interface> </node> |