[libsocialweb/vala: 2/9] introspection: Add g-i annotations where needed



commit 688c113d7515f7852aca1cbb12c0eef89aaa731a
Author: Marco Barisione <marco barisione org>
Date:   Wed Oct 27 11:52:37 2010 +0100

    introspection: Add g-i annotations where needed

 libsocialweb-client/sw-client-item-view.c |   17 ++++++
 libsocialweb-client/sw-client-service.c   |   87 +++++++++++++++++++++++++++++
 libsocialweb-client/sw-client-service.h   |    1 +
 libsocialweb-client/sw-client.c           |   32 +++++++++++
 libsocialweb-client/sw-item.c             |    9 +++
 5 files changed, 146 insertions(+), 0 deletions(-)
---
diff --git a/libsocialweb-client/sw-client-item-view.c b/libsocialweb-client/sw-client-item-view.c
index 271f6f2..7119b89 100644
--- a/libsocialweb-client/sw-client-item-view.c
+++ b/libsocialweb-client/sw-client-item-view.c
@@ -386,6 +386,11 @@ sw_client_item_view_class_init (SwClientItemViewClass *klass)
                                G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
   g_object_class_install_property (object_class, PROP_OBJECT_PATH, pspec);
 
+  /**
+   * SwClientItemView::items-added:
+   * @self:
+   * @items: (type GLib.List) (element-type Sw.Item):
+   */
   signals[ITEMS_ADDED_SIGNAL] =
     g_signal_new ("items-added",
                   SW_TYPE_CLIENT_ITEM_VIEW,
@@ -397,6 +402,12 @@ sw_client_item_view_class_init (SwClientItemViewClass *klass)
                   G_TYPE_NONE,
                   1,
                   G_TYPE_POINTER);
+
+  /**
+   * SwClientItemView::items-removed:
+   * @self:
+   * @items: (type GLib.List) (element-type Sw.Item):
+   */
   signals[ITEMS_REMOVED_SIGNAL] =
     g_signal_new ("items-removed",
                   SW_TYPE_CLIENT_ITEM_VIEW,
@@ -408,6 +419,12 @@ sw_client_item_view_class_init (SwClientItemViewClass *klass)
                   G_TYPE_NONE,
                   1,
                   G_TYPE_POINTER);
+
+  /**
+   * SwClientItemView::items-changed:
+   * @self:
+   * @items: (type GLib.List) (element-type Sw.Item):
+   */
   signals[ITEMS_CHANGED_SIGNAL] =
     g_signal_new ("items-changed",
                   SW_TYPE_CLIENT_ITEM_VIEW,
diff --git a/libsocialweb-client/sw-client-service.c b/libsocialweb-client/sw-client-service.c
index fd77f86..28cdecf 100644
--- a/libsocialweb-client/sw-client-service.c
+++ b/libsocialweb-client/sw-client-service.c
@@ -428,6 +428,20 @@ _get_capabilities_cb (DBusGProxy *proxy,
   g_slice_free (SwClientServiceCallClosure, closure);
 }
 
+/**
+ * SwClientServiceGetCapabilitiesCallback:
+ * @service:
+ * @caps:
+ * @error:
+ * @userdata: (closure):
+ */
+
+/**
+ * sw_client_service_get_static_capabilities:
+ * @service:
+ * @cb: (scope async):
+ * @userdata: (closure):
+ */
 void
 sw_client_service_get_static_capabilities (SwClientService                        *service,
                                            SwClientServiceGetCapabilitiesCallback  cb,
@@ -446,6 +460,12 @@ sw_client_service_get_static_capabilities (SwClientService
                                                                  closure);
 }
 
+/**
+ * sw_client_service_get_dynamic_capabilities:
+ * @service:
+ * @cb: (scope async):
+ * @userdata: (closure):
+ */
 void
 sw_client_service_get_dynamic_capabilities (SwClientService                        *service,
                                             SwClientServiceGetCapabilitiesCallback  cb,
@@ -490,6 +510,20 @@ _update_status_cb (DBusGProxy *proxy,
   g_slice_free (SwClientServiceCallClosure, closure);
 }
 
+/**
+ * SwClientServiceUpdateStatusCallback:
+ * @service:
+ * @error:
+ * @userdata: (closure):
+ */
+
+/**
+ * sw_client_service_update_status:
+ * @service:
+ * @cb: (scope async):
+ * @status_msg:
+ * @userdata: (closure):
+ */
 void
 sw_client_service_update_status (SwClientService                     *service,
                                  SwClientServiceUpdateStatusCallback  cb,
@@ -509,6 +543,14 @@ sw_client_service_update_status (SwClientService                     *service,
   g_hash_table_unref (fields);
 }
 
+/**
+ * sw_client_service_update_status_with_fields:
+ * @service:
+ * @cb: (scope async):
+ * @status_msg:
+ * @fields: (element-type gchar* gchar*):
+ * @userdata: (closure):
+ */
 void
 sw_client_service_update_status_with_fields (SwClientService                     *service,
                                              SwClientServiceUpdateStatusCallback  cb,
@@ -703,6 +745,21 @@ _sw_client_service_upload (SwClientService                      *service,
   return TRUE;
 }
 
+/* FIXME: This function cannot be used by gobject-introspection because of
+ * the progress calback.
+ * It needs a GDestroyNotify argument or a _with_closures() variant that
+ * uses a GClosure *. */
+/**
+ * sw_client_service_upload_photo: (skip)
+ * @service:
+ * @filename:
+ * @fields:
+ * @cancellable:
+ * @progress_callback:
+ * @progress_callback_data:
+ * @callback: (scope async):
+ * @userdata: (closure):
+ */
 gboolean
 sw_client_service_upload_photo (SwClientService                      *service,
                                 const char                           *filename,
@@ -724,6 +781,21 @@ sw_client_service_upload_photo (SwClientService                      *service,
                                           userdata);
 }
 
+/* FIXME: This function cannot be used by gobject-introspection because of
+ * the progress calback.
+ * It needs a GDestroyNotify argument or a _with_closures() variant that
+ * uses a GClosure *. */
+/**
+ * sw_client_service_upload_video: (skip)
+ * @service:
+ * @filename:
+ * @fields:
+ * @cancellable:
+ * @progress_callback:
+ * @progress_callback_data:
+ * @callback: (scope async):
+ * @userdata: (closure):
+ */
 gboolean
 sw_client_service_upload_video (SwClientService                      *service,
                                 const char                           *filename,
@@ -854,6 +926,21 @@ _query_open_view_cb (DBusGProxy *proxy,
   g_slice_free (SwClientServiceCallClosure, closure);
 }
 
+/**
+ * SwClientServiceQueryOpenViewCallback:
+ * @query:
+ * @item_view:
+ * @userdata: (closure):
+ */
+
+/**
+ * sw_client_service_query_open_view:
+ * @service:
+ * @query:
+ * @params: (element-type gchar* gchar*):
+ * @cb: (scope async):
+ * @userdata: (closure):
+ */
 void
 sw_client_service_query_open_view (SwClientService                      *service,
                                    const gchar                          *query,
diff --git a/libsocialweb-client/sw-client-service.h b/libsocialweb-client/sw-client-service.h
index c0b76f3..aa20d05 100644
--- a/libsocialweb-client/sw-client-service.h
+++ b/libsocialweb-client/sw-client-service.h
@@ -58,6 +58,7 @@ typedef struct {
 GType sw_client_service_get_type (void);
 
 /* Keep in sync with sw-service.h */
+/* FIXME: These defines without namespace make the g-i scanner complain */
 #define IS_CONFIGURED "is-configured"
 #define CAN_VERIFY_CREDENTIALS "can-verify-credentials"
 #define CREDENTIALS_VALID "credentials-valid"
diff --git a/libsocialweb-client/sw-client.c b/libsocialweb-client/sw-client.c
index b04d9f4..6ce32e1 100644
--- a/libsocialweb-client/sw-client.c
+++ b/libsocialweb-client/sw-client.c
@@ -188,6 +188,19 @@ _sw_client_get_services_cb (DBusGProxy  *proxy,
   g_free (closure);
 }
 
+/**
+ * SwClientGetServicesCallback:
+ * @client:
+ * @services: (element-type gchar*):
+ * @userdata: (closure):
+ */
+
+/**
+ * sw_client_get_services:
+ * @client:
+ * @cb: (scope async):
+ * @userdata: (closure):
+ */
 void
 sw_client_get_services (SwClient                    *client,
                         SwClientGetServicesCallback  cb,
@@ -206,6 +219,13 @@ sw_client_get_services (SwClient                    *client,
                                               closure);
 }
 
+/**
+ * sw_client_get_service:
+ * @client:
+ * @service_name:
+ *
+ * Returns: (transfer full):
+ */
 SwClientService *
 sw_client_get_service (SwClient    *client,
                        const gchar *service_name)
@@ -257,7 +277,19 @@ _sw_client_is_online_cb (DBusGProxy *proxy,
   g_free (closure);
 }
 
+/**
+ * SwClientIsOnlineCallback:
+ * @client:
+ * @online:
+ * @userdata: (closure):
+ */
 
+/**
+ * sw_client_is_online:
+ * @client:
+ * @cb: (scope async):
+ * @userdata: (closure):
+ */
 void
 sw_client_is_online (SwClient                 *client,
                      SwClientIsOnlineCallback  cb,
diff --git a/libsocialweb-client/sw-item.c b/libsocialweb-client/sw-item.c
index 3ffe1fb..f5904d8 100644
--- a/libsocialweb-client/sw-item.c
+++ b/libsocialweb-client/sw-item.c
@@ -18,6 +18,15 @@
 
 #include "sw-item.h"
 
+/**
+ * SwItem:
+ * @refcount:
+ * @service:
+ * @uuid:
+ * @date:
+ * @props: (element-type gchar* gchar*):
+ */
+
 SwItem *
 sw_item_new (void)
 {



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