[libsocialweb] Added collections interface.



commit 6ba6f4db3cf40830e71d6c30e0a72ca701e8cdbe
Author: Eitan Isaacson <eitan monotonous org>
Date:   Mon Feb 7 08:35:51 2011 -0500

    Added collections interface.

 docs/libsocialweb-dbus/Makefile.am                 |    2 +-
 docs/libsocialweb-dbus/libsocialweb-dbus-docs.sgml |    1 +
 interfaces/Makefile.am                             |    3 +-
 interfaces/sw-collections.xml                      |   56 ++++++++++++++++++++
 interfaces/sw-service.xml                          |    4 ++
 5 files changed, 64 insertions(+), 2 deletions(-)
---
diff --git a/docs/libsocialweb-dbus/Makefile.am b/docs/libsocialweb-dbus/Makefile.am
index 10db2b2..9a16f5b 100644
--- a/docs/libsocialweb-dbus/Makefile.am
+++ b/docs/libsocialweb-dbus/Makefile.am
@@ -19,7 +19,7 @@ DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
 # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
 HTML_IMAGES=
 
-DBUS=lastfm.xml sw-avatar.xml sw-banishable.xml sw-core.xml sw-item-view.xml sw-photo-upload.xml sw-query.xml sw-service.xml sw-status-update.xml sw-video-upload.xml
+DBUS=lastfm.xml sw-avatar.xml sw-banishable.xml sw-core.xml sw-item-view.xml sw-photo-upload.xml sw-query.xml sw-service.xml sw-status-update.xml sw-video-upload.xml sw-collections.xml
 
 # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
 # e.g. content_files=running.sgml building.sgml changes-2.0.sgml
diff --git a/docs/libsocialweb-dbus/libsocialweb-dbus-docs.sgml b/docs/libsocialweb-dbus/libsocialweb-dbus-docs.sgml
index f9201fd..f65e465 100644
--- a/docs/libsocialweb-dbus/libsocialweb-dbus-docs.sgml
+++ b/docs/libsocialweb-dbus/libsocialweb-dbus-docs.sgml
@@ -25,6 +25,7 @@
       <xi:include href="xml/ref-sw-video-upload.xml"/>
       <xi:include href="xml/ref-sw-query.xml"/>
       <xi:include href="xml/ref-sw-status-update.xml"/>
+      <xi:include href="xml/ref-sw-collections.xml"/>
     </section>
     <section>
       <title>Service-specific Interfaces</title>
diff --git a/interfaces/Makefile.am b/interfaces/Makefile.am
index 24e1f37..bd05b46 100644
--- a/interfaces/Makefile.am
+++ b/interfaces/Makefile.am
@@ -15,7 +15,8 @@ DBUS_SPECS = sw-core.xml sw-service.xml \
 	     sw-item-view.xml sw-query.xml \
 	     sw-avatar.xml sw-status-update.xml \
 	     sw-photo-upload.xml sw-banishable.xml \
-	     sw-video-upload.xml lastfm.xml
+	     sw-video-upload.xml lastfm.xml \
+	     sw-collections.xml
 
 %-ginterface.h %-ginterface.c: %.xml Makefile.am
 	$(AM_V_GEN)python $(top_srcdir)/tools/glib-ginterface-gen.py --include='"sw-marshals.h"' --filename=$(basename $@) $< Sw_
diff --git a/interfaces/sw-collections.xml b/interfaces/sw-collections.xml
new file mode 100644
index 0000000..d77cc4e
--- /dev/null
+++ b/interfaces/sw-collections.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<node name="/Collections_Iface"
+      xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0";
+      xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd";>
+  <interface name="com.meego.libsocialweb.Collections">
+    <doc:doc>
+      <doc:summary>An interface representing named collections of
+      photos (eg. albums), videos (eg. channels) or both (eg. Flickr sets).
+      </doc:summary>
+    </doc:doc>
+
+    <method name="GetList" tp:name-for-bindings="Get_List">
+      <doc:doc>
+        <doc:description>
+          <doc:para>
+            Retrieve a list of photo/video collections the user has on the service.
+          </doc:para>
+        </doc:description>
+      </doc:doc>
+
+      <arg name="collection_list" type="a(ssuia{ss})"
+           tp:type="Collection_Details[]" direction="out">
+        <doc:doc>
+          <doc:summary>A list of <tp:member-ref>Collection_Details</tp:member-ref>
+            representing remote collections on the service.</doc:summary>
+        </doc:doc>
+      </arg>
+    </method>
+
+    <tp:struct name="Collection_Details" array-name="Collection_Details_List">
+      <tp:member type="s" name="Collection_Id">
+        <doc:doc>A service-specific identifier for the collection.</doc:doc>
+      </tp:member>
+      <tp:member type="s" name="Collection_Name">
+        <doc:doc>The human readable name of the collection.</doc:doc>
+      </tp:member>
+      <tp:member type="u" tp:name="Collection_Media_Types"
+                 name="Supported_Media_Types">
+        <doc:doc>Supported types of media in this collection.</doc:doc>
+      </tp:member>
+      <tp:member type="i" name="Item_Count">
+        <doc:doc>The number of items currently in the collection, or -1 if unknown.</doc:doc></tp:member>
+      <tp:member type="a{ss}" name="Attributes">
+        <doc:doc>Additional collection attributes.</doc:doc>
+      </tp:member>        
+    </tp:struct>
+
+    <tp:flags name="Collection_Media_Types"
+              value-prefix="Collection_Media_Type">
+      <tp:flag name="Photos" value="1"/>
+      <tp:flag name="Videos" value="2"/>
+    </tp:flags>
+
+  </interface>
+</node>
diff --git a/interfaces/sw-service.xml b/interfaces/sw-service.xml
index 7a35edd..cfd2372 100644
--- a/interfaces/sw-service.xml
+++ b/interfaces/sw-service.xml
@@ -39,6 +39,10 @@
               <doc:definition>The service supports the #Query interface.</doc:definition>
             </doc:item>
             <doc:item>
+              <doc:term>has-collections-iface</doc:term>
+              <doc:definition>The service supports the #Collections interface.</doc:definition>
+            </doc:item>
+            <doc:item>
               <doc:term>can-verify-credentials</doc:term>
               <doc:definition>The credentials-invalid and credentials-valid dynamic capabilities are available.</doc:definition>
             </doc:item>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]