summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2013-11-04 16:36:51 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2013-11-04 18:19:43 +0000
commitb515c1d1e4cbc17a94f709b0ca8f3ec92482ec56 (patch)
treea5daa38259a1d75c983742bd19dfcb1981404f01
parent768fd24a2e8baf8283879887e26c6d189fb7384c (diff)
Flatten Connection.I.Contacts into Connection
-rw-r--r--spec/Connection.xml181
-rw-r--r--spec/Connection_Interface_Addressing1.xml5
-rw-r--r--spec/Connection_Interface_Contact_List1.xml4
-rw-r--r--spec/Connection_Interface_Contacts.xml203
-rw-r--r--spec/Connection_Interface_Resources1.xml4
-rw-r--r--spec/Protocol.xml2
-rw-r--r--spec/all.xml1
7 files changed, 181 insertions, 219 deletions
diff --git a/spec/Connection.xml b/spec/Connection.xml
index 1a40ea1c..8c72d5f9 100644
--- a/spec/Connection.xml
+++ b/spec/Connection.xml
@@ -22,7 +22,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA.</p>
</tp:license>
<interface name="im.telepathy.v1.Connection">
- <tp:requires interface="im.telepathy.v1.Connection.Interface.Contacts"/>
<method name="Connect" tp:name-for-bindings="Connect">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
@@ -540,10 +539,10 @@ USA.</p>
<tp:contact-attribute name="contact-id" type="s">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The normalized contact's identifier. Not necessarily the same string
- as passed to <tp:dbus-ref
- namespace="imt1.Connection.Interface.Contacts">GetContactByID</tp:dbus-ref>.
- As a special case, this is always present in the result of <tp:dbus-ref
- namespace="im.telepathy.v1.Connection.Interface.Contacts">GetContactAttributes</tp:dbus-ref>,
+ as passed to <tp:member-ref>GetContactByID</tp:member-ref>.
+ As a special case, this is always present in the result of
+ <tp:member-ref>GetContactAttributes</tp:member-ref> and
+ <tp:member-ref>GetContactByID</tp:member-ref>,
whether it was explicitly requested or not.</p>
</tp:docstring>
</tp:contact-attribute>
@@ -1210,6 +1209,174 @@ USA.</p>
</tp:docstring>
</property>
+ <tp:simple-type name="Contact_Attribute" type="s">
+ <tp:docstring>
+ A <tp:type>DBus_Interface</tp:type>, followed by a slash '/' character
+ and an identifier for an attribute defined by that interface. The
+ attribute identifier SHOULD be in lower case.
+
+ <tp:rationale>
+ These aren't D-Bus core Properties, and we want them to look visibly
+ different.
+ </tp:rationale>
+ </tp:docstring>
+ </tp:simple-type>
+
+ <tp:mapping name="Single_Contact_Attributes_Map">
+ <tp:docstring>
+ Some of the attributes of a single contact.
+ </tp:docstring>
+
+ <tp:member type="s" tp:type="Contact_Attribute" name="Attribute">
+ <tp:docstring>
+ The name of the attribute
+ </tp:docstring>
+ </tp:member>
+
+ <tp:member type="v" name="Value">
+ <tp:docstring>
+ The value of the attribute
+ </tp:docstring>
+ </tp:member>
+ </tp:mapping>
+
+ <tp:mapping name="Contact_Attributes_Map">
+ <tp:docstring>Mapping returned by
+ <tp:member-ref>GetContactAttributes</tp:member-ref>, representing a
+ collection of Contacts and their requested attributes.</tp:docstring>
+
+ <tp:member type="u" tp:type="Contact_Handle" name="Contact">
+ <tp:docstring>
+ A contact
+ </tp:docstring>
+ </tp:member>
+
+ <tp:member type="a{sv}" tp:type="Single_Contact_Attributes_Map"
+ name="Attributes">
+ <tp:docstring>
+ Attributes of that contact
+ </tp:docstring>
+ </tp:member>
+ </tp:mapping>
+
+ <method name="GetContactAttributes"
+ tp:name-for-bindings="Get_Contact_Attributes">
+ <tp:docstring>
+ Return any number of contact attributes for the given handles.
+ </tp:docstring>
+
+ <arg direction="in" name="Handles" type="au" tp:type="Contact_Handle[]">
+ <tp:docstring>
+ An array of handles representing contacts.
+ </tp:docstring>
+ </arg>
+
+ <arg direction="in" name="Interfaces" type="as"
+ tp:type="DBus_Interface[]">
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>A list of strings indicating which D-Bus interfaces the calling
+ process is interested in. All supported attributes from these
+ interfaces, whose values can be obtained without additional network
+ activity, will be in the reply.</p>
+
+ <p>Attributes from the interface
+ <tp:dbus-ref>im.telepathy.v1.Connection</tp:dbus-ref>
+ are always returned, and need not be requested explicitly.</p>
+
+ <p>As well as returning cached information immediately, the
+ connection MAY start asynchronous requests to obtain better
+ values for the contact attributes. If better values are later
+ obtained by this process, they will be indicated with the usual
+ signals (such as <tp:dbus-ref
+ namespace="im.telepathy.v1.Connection.Interface.Aliasing1">AliasesChanged</tp:dbus-ref>).</p>
+
+ <tp:rationale>
+ For instance, an XMPP connection manager could download vCards
+ in response to a request for <tp:dbus-ref
+ namespace="im.telepathy.v1.Connection.Interface">Aliasing1</tp:dbus-ref>
+ attributes.
+ </tp:rationale>
+ </tp:docstring>
+ </arg>
+
+ <arg direction="out" type="a{ua{sv}}" name="Attributes"
+ tp:type="Contact_Attributes_Map">
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>A dictionary mapping the contact handles to contact attributes.
+ If any of the requested handles are in fact invalid, they are
+ simply omitted from this mapping. If contact attributes are not
+ immediately known, the behaviour is defined by the interface;
+ the attribute should either be omitted from the result or
+ replaced with a default value.</p>
+
+ <p>Each contact's attributes will always include at least the
+ identifier that would be obtained by inspecting the handle
+ (<code>im.telepathy.v1.Connection/contact-id</code>).</p>
+ </tp:docstring>
+ </arg>
+
+ <tp:possible-errors>
+ <tp:error name="im.telepathy.v1.Error.Disconnected"/>
+ </tp:possible-errors>
+ </method>
+
+ <method name="GetContactByID"
+ tp:name-for-bindings="Get_Contact_By_ID">
+ <tp:added version="0.27.0"/>
+ <tp:docstring>
+ Return any number of contact attributes for the given identifier.
+ <tp:rationale>
+ This is for a single identifier to make it simpler to use for the most
+ common use case. For multiple contacts case,
+ <tp:member-ref>GetContactAttributes</tp:member-ref> should be used.
+ </tp:rationale>
+ </tp:docstring>
+
+ <arg direction="in" name="Identifier" type="s">
+ <tp:docstring>
+ An identifier representing a contact.
+ </tp:docstring>
+ </arg>
+
+ <arg direction="in" name="Interfaces" type="as"
+ tp:type="DBus_Interface[]">
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>A list of strings indicating which D-Bus interfaces the calling
+ process is interested in. All supported attributes from these
+ interfaces, whose values can be obtained without additional network
+ activity, will be in the reply.</p>
+ <p>See <tp:member-ref>GetContactAttributes</tp:member-ref> for
+ details.</p>
+ </tp:docstring>
+ </arg>
+
+ <arg direction="out" name="Handle" type="u" tp:type="Contact_Handle">
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>The contact's handle</p>
+ </tp:docstring>
+ </arg>
+
+ <arg direction="out" type="a{sv}" name="Attributes"
+ tp:type="Single_Contact_Attributes_Map">
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>All supported attributes of the contact on
+ the given interfaces that can be returned without network
+ round-trips. If contact attributes are not immediately known, the
+ behaviour is defined by the interface; the attribute should either
+ be omitted from the result or replaced with a default value.</p>
+
+ <p>The contact's attributes will always include at least the
+ identifier that would be obtained by inspecting the handle
+ (<code>org.freedesktop.Telepathy.Connection/contact-id</code>).</p>
+ </tp:docstring>
+ </arg>
+
+ <tp:possible-errors>
+ <tp:error name="im.telepathy.v1.Error.Disconnected"/>
+ <tp:error name="im.telepathy.v1.Error.InvalidHandle"/>
+ </tp:possible-errors>
+ </method>
+
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>This models a connection to a single user account on a communication
service. Its basic capability is to provide the facility to request and
@@ -1289,8 +1456,8 @@ USA.</p>
and signals have been removed from this interface including
anything to do with handle reference counting.</tp:changed>
- <tp:changed version="0.99.UNRELEASED">The Requests interface
- is now part of Connection.</tp:changed>
+ <tp:changed version="0.99.UNRELEASED">The Requests and
+ Contacts interfaces are now part of Connection.</tp:changed>
</interface>
</node>
diff --git a/spec/Connection_Interface_Addressing1.xml b/spec/Connection_Interface_Addressing1.xml
index 84aacfd7..c1e9e79c 100644
--- a/spec/Connection_Interface_Addressing1.xml
+++ b/spec/Connection_Interface_Addressing1.xml
@@ -18,7 +18,6 @@
</tp:license>
<interface name="im.telepathy.v1.Connection.Interface.Addressing1">
<tp:requires interface="im.telepathy.v1.Connection"/>
- <tp:requires interface="im.telepathy.v1.Connection.Interface.Contacts"/>
<tp:added version="0.25.2">(as stable API)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>This interface deals with the multiple address types that can
@@ -71,7 +70,7 @@
<p>The behavior of this parameter is similar to the same
parameter in
- <tp:dbus-ref namespace="im.telepathy.v1.Connection.Interface">Contacts.GetContactAttributes</tp:dbus-ref>.</p>
+ <tp:dbus-ref namespace="im.telepathy.v1.Connection">GetContactAttributes</tp:dbus-ref>.</p>
</tp:docstring>
</arg>
@@ -140,7 +139,7 @@
<p>The behavior of this parameter is similar to the same
parameter in
- <tp:dbus-ref namespace="im.telepathy.v1.Connection.Interface">Contacts.GetContactAttributes</tp:dbus-ref>.</p>
+ <tp:dbus-ref namespace="im.telepathy.v1.Connection">GetContactAttributes</tp:dbus-ref>.</p>
</tp:docstring>
</arg>
diff --git a/spec/Connection_Interface_Contact_List1.xml b/spec/Connection_Interface_Contact_List1.xml
index d70da6c0..eff1f151 100644
--- a/spec/Connection_Interface_Contact_List1.xml
+++ b/spec/Connection_Interface_Contact_List1.xml
@@ -164,7 +164,7 @@
<p>A list of strings indicating which D-Bus interfaces the calling
process is interested in. Equivalent to the corresponding argument
to <tp:dbus-ref
- namespace="im.telepathy.v1.Connection.Interface.Contacts"
+ namespace="im.telepathy.v1.Connection"
>GetContactAttributes</tp:dbus-ref>,
except that if this list does not contain the ContactList
interface itself, it is treated as though that interface was also
@@ -177,7 +177,7 @@
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A dictionary mapping the contact handles to contact attributes,
equivalent to the result of <tp:dbus-ref
- namespace="im.telepathy.v1.Connection.Interface.Contacts"
+ namespace="im.telepathy.v1.Connection"
>GetContactAttributes</tp:dbus-ref>.</p>
</tp:docstring>
diff --git a/spec/Connection_Interface_Contacts.xml b/spec/Connection_Interface_Contacts.xml
deleted file mode 100644
index 7471cc65..00000000
--- a/spec/Connection_Interface_Contacts.xml
+++ /dev/null
@@ -1,203 +0,0 @@
-<?xml version="1.0" ?>
-<node name="/Connection_Interface_Contacts" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
- <tp:copyright> Copyright (C) 2005-2008 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="im.telepathy.v1.Connection.Interface.Contacts">
- <tp:requires interface="im.telepathy.v1.Connection"/>
- <tp:added version="0.17.9"/>
-
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>This interface allows many attributes of many contacts to be
- obtained in a single D-Bus round trip.</p>
-
- <p>Each contact attribute has an string identifier
- (<tp:type>Contact_Attribute</tp:type>), which is namespaced
- by the D-Bus interface which defines it.</p>
- </tp:docstring>
-
- <tp:simple-type name="Contact_Attribute" type="s">
- <tp:docstring>
- A <tp:type>DBus_Interface</tp:type>, followed by a slash '/' character
- and an identifier for an attribute defined by that interface. The
- attribute identifier SHOULD be in lower case.
-
- <tp:rationale>
- These aren't D-Bus core Properties, and we want them to look visibly
- different.
- </tp:rationale>
- </tp:docstring>
- </tp:simple-type>
-
- <tp:mapping name="Single_Contact_Attributes_Map">
- <tp:docstring>
- Some of the attributes of a single contact.
- </tp:docstring>
-
- <tp:member type="s" tp:type="Contact_Attribute" name="Attribute">
- <tp:docstring>
- The name of the attribute
- </tp:docstring>
- </tp:member>
-
- <tp:member type="v" name="Value">
- <tp:docstring>
- The value of the attribute
- </tp:docstring>
- </tp:member>
- </tp:mapping>
-
- <tp:mapping name="Contact_Attributes_Map">
- <tp:docstring>Mapping returned by
- <tp:member-ref>GetContactAttributes</tp:member-ref>, representing a
- collection of Contacts and their requested attributes.</tp:docstring>
-
- <tp:member type="u" tp:type="Contact_Handle" name="Contact">
- <tp:docstring>
- A contact
- </tp:docstring>
- </tp:member>
-
- <tp:member type="a{sv}" tp:type="Single_Contact_Attributes_Map"
- name="Attributes">
- <tp:docstring>
- Attributes of that contact
- </tp:docstring>
- </tp:member>
- </tp:mapping>
-
- <method name="GetContactAttributes"
- tp:name-for-bindings="Get_Contact_Attributes">
- <tp:docstring>
- Return any number of contact attributes for the given handles.
- </tp:docstring>
-
- <arg direction="in" name="Handles" type="au" tp:type="Contact_Handle[]">
- <tp:docstring>
- An array of handles representing contacts.
- </tp:docstring>
- </arg>
-
- <arg direction="in" name="Interfaces" type="as"
- tp:type="DBus_Interface[]">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>A list of strings indicating which D-Bus interfaces the calling
- process is interested in. All supported attributes from these
- interfaces, whose values can be obtained without additional network
- activity, will be in the reply.</p>
-
- <p>Attributes from the interface
- <tp:dbus-ref>im.telepathy.v1.Connection</tp:dbus-ref>
- are always returned, and need not be requested explicitly.</p>
-
- <p>As well as returning cached information immediately, the
- connection MAY start asynchronous requests to obtain better
- values for the contact attributes. If better values are later
- obtained by this process, they will be indicated with the usual
- signals (such as <tp:dbus-ref
- namespace="im.telepathy.v1.Connection.Interface.Aliasing1">AliasesChanged</tp:dbus-ref>).</p>
-
- <tp:rationale>
- For instance, an XMPP connection manager could download vCards
- in response to a request for <tp:dbus-ref
- namespace="im.telepathy.v1.Connection.Interface">Aliasing1</tp:dbus-ref>
- attributes.
- </tp:rationale>
- </tp:docstring>
- </arg>
-
- <arg direction="out" type="a{ua{sv}}" name="Attributes"
- tp:type="Contact_Attributes_Map">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>A dictionary mapping the contact handles to contact attributes.
- If any of the requested handles are in fact invalid, they are
- simply omitted from this mapping. If contact attributes are not
- immediately known, the behaviour is defined by the interface;
- the attribute should either be omitted from the result or
- replaced with a default value.</p>
-
- <p>Each contact's attributes will always include at least the
- identifier that would be obtained by inspecting the handle
- (<code>im.telepathy.v1.Connection/contact-id</code>).</p>
- </tp:docstring>
- </arg>
-
- <tp:possible-errors>
- <tp:error name="im.telepathy.v1.Error.Disconnected"/>
- </tp:possible-errors>
- </method>
-
- <method name="GetContactByID"
- tp:name-for-bindings="Get_Contact_By_ID">
- <tp:added version="0.27.0"/>
- <tp:docstring>
- Return any number of contact attributes for the given identifier.
- <tp:rationale>
- This is for a single identifier to make it simpler to use for the most
- common use case. For multiple contacts case,
- <tp:member-ref>GetContactAttributes</tp:member-ref> should be used.
- </tp:rationale>
- </tp:docstring>
-
- <arg direction="in" name="Identifier" type="s">
- <tp:docstring>
- An identifier representing a contact.
- </tp:docstring>
- </arg>
-
- <arg direction="in" name="Interfaces" type="as"
- tp:type="DBus_Interface[]">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>A list of strings indicating which D-Bus interfaces the calling
- process is interested in. All supported attributes from these
- interfaces, whose values can be obtained without additional network
- activity, will be in the reply.</p>
- <p>See <tp:member-ref>GetContactAttributes</tp:member-ref> for
- details.</p>
- </tp:docstring>
- </arg>
-
- <arg direction="out" name="Handle" type="u" tp:type="Contact_Handle">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>The contact's handle</p>
- </tp:docstring>
- </arg>
-
- <arg direction="out" type="a{sv}" name="Attributes"
- tp:type="Single_Contact_Attributes_Map">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>All supported attributes of the contact on
- the given interfaces that can be returned without network
- round-trips. If contact attributes are not immediately known, the
- behaviour is defined by the interface; the attribute should either
- be omitted from the result or replaced with a default value.</p>
-
- <p>The contact's attributes will always include at least the
- identifier that would be obtained by inspecting the handle
- (<code>org.freedesktop.Telepathy.Connection/contact-id</code>).</p>
- </tp:docstring>
- </arg>
-
- <tp:possible-errors>
- <tp:error name="im.telepathy.v1.Error.Disconnected"/>
- <tp:error name="im.telepathy.v1.Error.InvalidHandle"/>
- </tp:possible-errors>
- </method>
- </interface>
-</node>
-<!-- vim:set sw=2 sts=2 et ft=xml: -->
diff --git a/spec/Connection_Interface_Resources1.xml b/spec/Connection_Interface_Resources1.xml
index 170e61f4..ad5e4b0d 100644
--- a/spec/Connection_Interface_Resources1.xml
+++ b/spec/Connection_Interface_Resources1.xml
@@ -45,8 +45,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
attempts to change this.</p>
<p>When using this interface, it is a little like using the
- <tp:dbus-ref namespace="im.telepathy.v1.Connection.Interface"
- >Contacts</tp:dbus-ref> interface, but only resource-specific
+ <tp:dbus-ref namespace="im.telepathy.v1.Connection"
+ >GetContactAttributes</tp:dbus-ref> method, but only resource-specific
attributes are ever returned. The resource-specific contact
attributes are decided on by the CM, but XMPP's are listed
below:</p>
diff --git a/spec/Protocol.xml b/spec/Protocol.xml
index 0cd07861..b70ecfb2 100644
--- a/spec/Protocol.xml
+++ b/spec/Protocol.xml
@@ -373,7 +373,7 @@ allowed=im.telepathy.v1.Channel.TargetHandle;im.telepathy.v1.Channel.TargetID;im
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Attempt to normalize the given contact ID. Where possible, this
SHOULD return the same thing that would be returned by <tp:dbus-ref
- namespace="imt1.Connection.Interface.Contacts">GetContactByID</tp:dbus-ref>
+ namespace="imt1.Connection">GetContactByID</tp:dbus-ref>
on a connected <tp:dbus-ref namespace="im.telepathy.v1"
>Connection</tp:dbus-ref>.</p>
diff --git a/spec/all.xml b/spec/all.xml
index 1273e5d7..ef3cf28d 100644
--- a/spec/all.xml
+++ b/spec/all.xml
@@ -48,7 +48,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</p>
</tp:docstring>
<xi:include href="Connection.xml"/>
- <xi:include href="Connection_Interface_Contacts.xml"/>
<tp:section name="Contact list interfaces">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">