[libsocialweb] facebook: implemented Collections.GetCreatableTypes()



commit 62ec1aff353e196c2f0639fd32bfe149d2a43509
Author: Eitan Isaacson <eitan isaacson collabora co uk>
Date:   Tue Mar 15 16:06:50 2011 -0700

    facebook: implemented Collections.GetCreatableTypes()

 services/facebook/facebook.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/services/facebook/facebook.c b/services/facebook/facebook.c
index 0261493..433dbf8 100644
--- a/services/facebook/facebook.c
+++ b/services/facebook/facebook.c
@@ -1086,6 +1086,21 @@ _facebook_collections_get_details (SwCollectionsIface    *self,
 }
 
 static void
+_facebook_collections_get_creatable_types (SwCollectionsIface    *self,
+                                           DBusGMethodInvocation *context)
+{
+  GArray *creatable_types = g_array_sized_new (TRUE, TRUE,
+                                               sizeof (guint), 1);
+  guint v = PHOTO;
+
+  g_array_append_val (creatable_types, v);
+
+  sw_collections_iface_return_from_get_creatable_types (context,
+                                                        creatable_types);
+
+  g_array_free (creatable_types, TRUE);
+}
+static void
 collections_iface_init (gpointer g_iface,
                         gpointer iface_data)
 {
@@ -1099,4 +1114,7 @@ collections_iface_init (gpointer g_iface,
 
   sw_collections_iface_implement_get_details (klass,
                                               _facebook_collections_get_details);
+
+  sw_collections_iface_implement_get_creatable_types (klass,
+                                                      _facebook_collections_get_creatable_types);
 }



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