[telepathy-spec/master] Contacts: distribute contact attributes into the defining interfaces

Simon McVittie simon.mcvittie at collabora.co.uk
Wed Aug 5 10:20:32 PDT 2009


---
 spec/Connection.xml                                |   10 +++
 spec/Connection_Interface_Aliasing.xml             |   12 ++++
 spec/Connection_Interface_Avatars.xml              |   15 +++++
 spec/Connection_Interface_Capabilities.xml         |   12 ++++
 spec/Connection_Interface_Contact_Capabilities.xml |   11 ++++
 spec/Connection_Interface_Contacts.xml             |   64 --------------------
 spec/Connection_Interface_Location.xml             |   11 ++++
 spec/Connection_Interface_Simple_Presence.xml      |   10 +++
 8 files changed, 81 insertions(+), 64 deletions(-)

diff --git a/spec/Connection.xml b/spec/Connection.xml
index 2b03f96..e0231d6 100644
--- a/spec/Connection.xml
+++ b/spec/Connection.xml
@@ -954,6 +954,16 @@ USA.</p>
       </tp:docstring>
     </signal>
 
+    <tp:contact-attribute name="contact-id" type="s">
+      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+        <p>The same string that would be returned by
+          <tp:member-ref>InspectHandles</tp:member-ref>. As a special case,
+          this is always present in the result of <tp:dbus-ref
+            namespace="org.freedesktop.Telepathy.Connection.Interface.Contacts">GetContactAttributes</tp:dbus-ref>,
+          whether it was explicitly requested or not.</p>
+      </tp:docstring>
+    </tp:contact-attribute>
+
     <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
diff --git a/spec/Connection_Interface_Aliasing.xml b/spec/Connection_Interface_Aliasing.xml
index a599436..3c99b62 100644
--- a/spec/Connection_Interface_Aliasing.xml
+++ b/spec/Connection_Interface_Aliasing.xml
@@ -152,6 +152,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
         <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
       </tp:possible-errors>
     </method>
+
+    <tp:contact-attribute name="alias" type="s">
+      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+        <p>The same string that would be returned by
+          <tp:member-ref>GetAliases</tp:member-ref>
+          (always present with some value, possibly the
+          same as Connection/contact-id, if information from the
+          Aliasing interface was requested)
+        </p>
+      </tp:docstring>
+    </tp:contact-attribute>
+
     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
       <p>An interface on connections to support protocols where contacts have an
     alias which they can change at will. Provides a method for the user to set
diff --git a/spec/Connection_Interface_Avatars.xml b/spec/Connection_Interface_Avatars.xml
index e6f7ac5..3b9290e 100644
--- a/spec/Connection_Interface_Avatars.xml
+++ b/spec/Connection_Interface_Avatars.xml
@@ -450,6 +450,21 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
       </tp:possible-errors>
     </method>
 
+    <tp:contact-attribute name="token" type="s" tp:type="Avatar_Token">
+      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+        <p>The same string that would be returned by
+          <tp:member-ref>GetKnownAvatarTokens</tp:member-ref>
+          (omitted from the result if the contact's avatar token is not known,
+          present as an empty string if the contact is known not to have
+          an avatar). Unlike in the
+          <tp:member-ref>GetKnownAvatarTokens</tp:member-ref>
+          method, the avatar tokens for the self handle aren't required to be
+          present. This attribute should not be used to determine whether or
+          not the Avatar needs to be set.
+        </p>
+      </tp:docstring>
+    </tp:contact-attribute>
+
     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
       <p>An interface for requesting avatars for contacts on a given connection,
     receiving notification when avatars are changed, and publishing your own
diff --git a/spec/Connection_Interface_Capabilities.xml b/spec/Connection_Interface_Capabilities.xml
index 95dd038..10d8102 100644
--- a/spec/Connection_Interface_Capabilities.xml
+++ b/spec/Connection_Interface_Capabilities.xml
@@ -230,6 +230,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
       </tp:possible-errors>
     </method>
 
+    <tp:contact-attribute name="caps"
+      type="a(usuu)" tp:type="Contact_Capability">
+      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+        <p>The same structs that would be returned by
+          <tp:member-ref>GetCapabilities</tp:member-ref>
+          (all of them will redundantly have the contact's handle as the
+          first member). Omitted from the result if the contact's capabilities
+          are not known; present in the result as an empty array if the
+          contact is known to have no capabilities at all.</p>
+      </tp:docstring>
+    </tp:contact-attribute>
+
   </interface>
 </node>
 <!-- vim:set sw=2 sts=2 et ft=xml: -->
diff --git a/spec/Connection_Interface_Contact_Capabilities.xml b/spec/Connection_Interface_Contact_Capabilities.xml
index a5c68b3..ef8a196 100644
--- a/spec/Connection_Interface_Contact_Capabilities.xml
+++ b/spec/Connection_Interface_Contact_Capabilities.xml
@@ -230,6 +230,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
     </tp:member>
   </tp:mapping>
 
+    <tp:contact-attribute name="capabilities"
+      type="a(a{sv}as)" tp:type="Requestable_Channel_Class[]">
+      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+        <p>The same structs that would be returned by
+          <tp:member-ref>GetContactCapabilities</tp:member-ref>.
+          Omitted from the result if the contact's capabilities
+          are not known; present in the result as an empty array if the
+          contact is known to have no capabilities at all.</p>
+      </tp:docstring>
+    </tp:contact-attribute>
+
   </interface>
 </node>
 <!-- vim:set sw=2 sts=2 et ft=xml: -->
diff --git a/spec/Connection_Interface_Contacts.xml b/spec/Connection_Interface_Contacts.xml
index 867a4d7..92c80c8 100644
--- a/spec/Connection_Interface_Contacts.xml
+++ b/spec/Connection_Interface_Contacts.xml
@@ -29,70 +29,6 @@
       <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>
-
-      <p>An initial set of contact attributes is defined here:</p>
-
-      <dl>
-        <dt>org.freedesktop.Telepathy.Connection/contact-id
-          (type s)</dt>
-        <dd>The same string that would be returned by
-          <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection">InspectHandles</tp:dbus-ref>
-          (always present in the result)
-        </dd>
-        <dt>org.freedesktop.Telepathy.Connection.Interface.Aliasing/alias
-          (type s)</dt>
-        <dd>The same string that would be returned by <tp:dbus-ref
-            namespace="org.freedesktop.Telepathy.Connection.Interface.Aliasing">GetAliases</tp:dbus-ref>
-          (always present with some value, possibly the
-          same as Connection/contact-id, if information from the
-          Aliasing interface was requested)
-        </dd>
-        <dt>org.freedesktop.Telepathy.Connection.Interface.Avatars/token
-          (type s, <tp:type>Avatar_Token</tp:type>)</dt>
-        <dd>The same string that would be returned by <tp:dbus-ref
-            namespace="org.freedesktop.Telepathy.Connection.Interface.Avatars">GetKnownAvatarTokens</tp:dbus-ref>
-          (omitted from the result if the contact's avatar token is not known,
-          present as an empty string if the contact is known not to have
-          an avatar). Unlike in the <tp:dbus-ref
-            namespace="org.freedesktop.Telepathy.Connection.Interface.Avatars">GetKnownAvatarTokens</tp:dbus-ref>
-            method, the avatar tokens for the self handle aren't required to be
-            present. This attribute should not be used to determine whether or
-            not the Avatar needs to be set.
-        </dd>
-        <dt>org.freedesktop.Telepathy.Connection.Interface.SimplePresence/presence
-          (type (uss), <tp:type>Simple_Presence</tp:type>)</dt>
-        <dd> The same struct that would be returned by
-            <tp:dbus-ref
-              namespace="org.freedesktop.Telepathy.Connection.Interface.SimplePresence">GetPresences</tp:dbus-ref>
-          (always present with some value if information from the
-          SimplePresence interface was requested)
-          </dd>
-        <dt>org.freedesktop.Telepathy.Connection.Interface.Capabilities/caps
-          (type a(usuu), <tp:type>Contact_Capability</tp:type>)</dt>
-        <dd>The same structs that would be returned by
-          <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface.Capabilities">GetCapabilities</tp:dbus-ref>
-          (all of them will redundantly have the contact's handle as the
-          first member). Omitted from the result if the contact's capabilities
-          are not known; present in the result as an empty array if the
-          contact is known to have no capabilities at all.</dd>
-
-        <dt>org.freedesktop.Telepathy.Connection.Interface.ContactCapabilities.DRAFT2/capabilities
-          (type a(a{sv}as),
-          <tp:type>Requestable_Channel_Class</tp:type>[])</dt>
-        <dd>The same structs that would be returned by
-          <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface.ContactCapabilities.DRAFT2">GetContactCapabilities</tp:dbus-ref>
-          Omitted from the result if the contact's capabilities
-          are not known; present in the result as an empty array if the
-          contact is known to have no capabilities at all.</dd>
-
-        <dt>org.freedesktop.Telepathy.Connection.Interface.Location.DRAFT/location
-          (type a{sv}, <tp:type>Location</tp:type>)</dt>
-        <dd>The same struct used by
-          <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface.Location.DRAFT">GetLocations</tp:dbus-ref>
-          Omitted from the result if the contact's location
-          is not known.</dd>
-
-      </dl>
     </tp:docstring>
 
     <tp:simple-type name="Contact_Attribute" type="s">
diff --git a/spec/Connection_Interface_Location.xml b/spec/Connection_Interface_Location.xml
index 8821ec0..2497c7c 100644
--- a/spec/Connection_Interface_Location.xml
+++ b/spec/Connection_Interface_Location.xml
@@ -389,6 +389,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
         set it to be as restrictive as possible (an empty whitelist, if
         supported).</tp:docstring>
     </property>
+
+    <tp:contact-attribute name="location"
+      type="a{sv}" tp:type="Location">
+      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+        <p>The same mapping that would be returned by
+          <tp:member-ref>GetLocations</tp:member-ref> for this contact.
+          Omitted from the result if the contact's location
+          is not known.</p>
+      </tp:docstring>
+    </tp:contact-attribute>
+
   </interface>
 </node>
 <!-- vim:set sw=2 sts=2 et ft=xml: -->
diff --git a/spec/Connection_Interface_Simple_Presence.xml b/spec/Connection_Interface_Simple_Presence.xml
index 8446050..c06a038 100644
--- a/spec/Connection_Interface_Simple_Presence.xml
+++ b/spec/Connection_Interface_Simple_Presence.xml
@@ -412,6 +412,16 @@
       </tp:member>
     </tp:struct>
 
+    <tp:contact-attribute name="presence"
+      type="(uss)" tp:type="Simple_Presence">
+      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+        <p>The same struct that would be returned by
+          <tp:member-ref>GetPresences</tp:member-ref>
+          (always present with some value if information from the
+          SimplePresence interface was requested)</p>
+      </tp:docstring>
+    </tp:contact-attribute>
+
     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
       <p>This interface is for services which have a concept of presence which
         can be published for yourself and monitored on your contacts.</p>
-- 
1.5.6.5




More information about the telepathy-commits mailing list