[evolution-data-server/openismus-work: 1/5] Changed signature of org.gnome.evolution.dataserver.addressbook.Book.getBookView gdbus method.
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/openismus-work: 1/5] Changed signature of org.gnome.evolution.dataserver.addressbook.Book.getBookView gdbus method.
- Date: Thu, 16 Jun 2011 16:17:31 +0000 (UTC)
commit cde66b5f65a2c15de77624be7654f0d356aff214
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Wed Jun 15 20:40:20 2011 +0900
Changed signature of org.gnome.evolution.dataserver.addressbook.Book.getBookView gdbus method.
Now include the 'requested_fields' array in the dbus api.
addressbook/libegdbus/e-gdbus-egdbusbook.c | 35 +++++++++++++++++---
addressbook/libegdbus/e-gdbus-egdbusbook.h | 3 ++
addressbook/libegdbus/e-gdbus-marshallers.c | 40 +++++++++++++-----------
addressbook/libegdbus/e-gdbus-marshallers.h | 14 ++++----
addressbook/libegdbus/e-gdbus-marshallers.list | 2 +-
5 files changed, 62 insertions(+), 32 deletions(-)
---
diff --git a/addressbook/libegdbus/e-gdbus-egdbusbook.c b/addressbook/libegdbus/e-gdbus-egdbusbook.c
index 43c5248..5674298 100644
--- a/addressbook/libegdbus/e-gdbus-egdbusbook.c
+++ b/addressbook/libegdbus/e-gdbus-egdbusbook.c
@@ -696,11 +696,12 @@ e_gdbus_book_default_init (EGdbusBookIface *iface)
G_STRUCT_OFFSET (EGdbusBookIface, handle_get_book_view),
g_signal_accumulator_true_handled,
NULL,
- _e_gdbus_gdbus_cclosure_marshaller_BOOLEAN__OBJECT_STRING_UINT,
+ _e_gdbus_gdbus_cclosure_marshaller_BOOLEAN__OBJECT_STRING_BOXED_UINT,
G_TYPE_BOOLEAN,
- 3,
+ 4,
G_TYPE_DBUS_METHOD_INVOCATION,
G_TYPE_STRING,
+ G_TYPE_STRV,
G_TYPE_UINT);
/**
* EGdbusBook::handle-get-changes:
@@ -2138,6 +2139,7 @@ _out:
* e_gdbus_book_call_get_book_view:
* @proxy: A #EGdbusBook.
* @in_query: Method parameter.
+ * @in_requested_fields: The requested vcard fields for the new view
* @in_max_results: Method parameter.
* @cancellable: A #GCancellable or %NULL.
* @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
@@ -2156,14 +2158,18 @@ _out:
void e_gdbus_book_call_get_book_view (
EGdbusBook *proxy,
const gchar *in_query,
+ const gchar * const *in_requested_fields,
guint in_max_results,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
{
GVariant *_params;
- _params = g_variant_new ("(su)",
+ gchar *empty[1] = { NULL };
+
+ _params = g_variant_new ("(s^asu)",
in_query,
+ (gchar **)in_requested_fields ? (gchar **)in_requested_fields : empty,
in_max_results);
g_dbus_proxy_call (G_DBUS_PROXY (proxy),
"getBookView",
@@ -2213,6 +2219,7 @@ _out:
* e_gdbus_book_call_get_book_view_sync:
* @proxy: A #EGdbusBook.
* @in_query: Method parameter.
+ * @in_requested_fields: The requested vcard fields for the new view
* @in_max_results: Method parameter.
* @out_view: Return location for out parameter or %NULL. Free with g_free().
* @cancellable: A #GCancellable or %NULL.
@@ -2229,6 +2236,7 @@ _out:
gboolean e_gdbus_book_call_get_book_view_sync (
EGdbusBook *proxy,
const gchar *in_query,
+ const gchar * const *in_requested_fields,
guint in_max_results,
gchar **out_view,
GCancellable *cancellable,
@@ -2237,8 +2245,11 @@ gboolean e_gdbus_book_call_get_book_view_sync (
gboolean _ret = FALSE;
GVariant *_params;
GVariant *_result;
- _params = g_variant_new ("(su)",
+ gchar *empty[1] = { NULL };
+
+ _params = g_variant_new ("(s^asu)",
in_query,
+ (gchar **)in_requested_fields ? (gchar **)in_requested_fields : empty,
in_max_results);
_result = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
"getBookView",
@@ -3359,6 +3370,13 @@ static const GDBusArgInfo e_gdbus_book_method_in_getBookView_query =
(gchar *) "s",
(GDBusAnnotationInfo **) NULL,
};
+static const GDBusArgInfo e_gdbus_book_method_in_getBookView_requested_fields =
+{
+ -1,
+ (gchar *) "requested_fields",
+ (gchar *) "as",
+ (GDBusAnnotationInfo **) NULL,
+};
static const GDBusArgInfo e_gdbus_book_method_in_getBookView_max_results =
{
-1,
@@ -3369,6 +3387,7 @@ static const GDBusArgInfo e_gdbus_book_method_in_getBookView_max_results =
static const GDBusArgInfo * const e_gdbus_book_method_in_getBookView_arg_pointers[] =
{
&e_gdbus_book_method_in_getBookView_query,
+ &e_gdbus_book_method_in_getBookView_requested_fields,
&e_gdbus_book_method_in_getBookView_max_results,
NULL
};
@@ -3674,14 +3693,18 @@ handle_method_call (GDBusConnection *connection,
EGdbusBook *object = E_GDBUS_BOOK (user_data);
gboolean handled;
const gchar *arg_query;
+ gchar **arg_req_fields;
guint arg_max_results;
g_variant_get (parameters,
- "(&su)",
+ "(&s^a&su)",
&arg_query,
+ &arg_req_fields,
&arg_max_results);
g_signal_emit (object,
signals[method_id],
- 0, invocation, arg_query, arg_max_results, &handled);
+ 0, invocation, arg_query, arg_req_fields, arg_max_results, &handled);
+
+ g_free (arg_req_fields);
if (!handled)
goto not_implemented;
}
diff --git a/addressbook/libegdbus/e-gdbus-egdbusbook.h b/addressbook/libegdbus/e-gdbus-egdbusbook.h
index 767dbea..ad119c2 100644
--- a/addressbook/libegdbus/e-gdbus-egdbusbook.h
+++ b/addressbook/libegdbus/e-gdbus-egdbusbook.h
@@ -235,6 +235,7 @@ struct _EGdbusBookIface
EGdbusBook *object,
GDBusMethodInvocation *invocation,
const gchar *in_query,
+ const gchar * const *in_requested_fields,
guint in_max_results);
gboolean (*handle_get_changes) (
EGdbusBook *object,
@@ -478,6 +479,7 @@ gboolean e_gdbus_book_call_get_supported_auth_methods_sync (
void e_gdbus_book_call_get_book_view (
EGdbusBook *proxy,
const gchar *in_query,
+ const gchar * const *in_requested_fields,
guint in_max_results,
GCancellable *cancellable,
GAsyncReadyCallback callback,
@@ -492,6 +494,7 @@ gboolean e_gdbus_book_call_get_book_view_finish (
gboolean e_gdbus_book_call_get_book_view_sync (
EGdbusBook *proxy,
const gchar *in_query,
+ const gchar * const *in_requested_fields,
guint in_max_results,
gchar **out_view,
GCancellable *cancellable,
diff --git a/addressbook/libegdbus/e-gdbus-marshallers.c b/addressbook/libegdbus/e-gdbus-marshallers.c
index cb9a4fa..ab88d33 100644
--- a/addressbook/libegdbus/e-gdbus-marshallers.c
+++ b/addressbook/libegdbus/e-gdbus-marshallers.c
@@ -1,7 +1,8 @@
-#include "e-gdbus-marshallers.h"
+#include "e-gdbus-marshallers.h"
#include <glib-object.h>
+
#ifdef G_ENABLE_DEBUG
#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v)
#define g_marshal_value_peek_char(v) g_value_get_char (v)
@@ -46,7 +47,8 @@
#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer
#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer
#define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer
-#endif /* G_ENABLE_DEBUG */
+#endif /* !G_ENABLE_DEBUG */
+
/* BOOLEAN:OBJECT,STRING (e-gdbus-marshallers.list:1) */
void
@@ -298,27 +300,28 @@ _e_gdbus_gdbus_cclosure_marshaller_BOOLEAN__OBJECT_BOXED (GClosure *closure,
g_value_set_boolean (return_value, v_return);
}
-/* BOOLEAN:OBJECT,STRING,UINT (e-gdbus-marshallers.list:10) */
+/* BOOLEAN:OBJECT,STRING,BOXED,UINT (e-gdbus-marshallers.list:10) */
void
-_e_gdbus_gdbus_cclosure_marshaller_BOOLEAN__OBJECT_STRING_UINT (GClosure *closure,
- GValue *return_value G_GNUC_UNUSED,
- guint n_param_values,
- const GValue *param_values,
- gpointer invocation_hint G_GNUC_UNUSED,
- gpointer marshal_data)
+_e_gdbus_gdbus_cclosure_marshaller_BOOLEAN__OBJECT_STRING_BOXED_UINT (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
{
- typedef gboolean (*GMarshalFunc_BOOLEAN__OBJECT_STRING_UINT) (gpointer data1,
- gpointer arg_1,
- gpointer arg_2,
- guint arg_3,
- gpointer data2);
- register GMarshalFunc_BOOLEAN__OBJECT_STRING_UINT callback;
+ typedef gboolean (*GMarshalFunc_BOOLEAN__OBJECT_STRING_BOXED_UINT) (gpointer data1,
+ gpointer arg_1,
+ gpointer arg_2,
+ gpointer arg_3,
+ guint arg_4,
+ gpointer data2);
+ register GMarshalFunc_BOOLEAN__OBJECT_STRING_BOXED_UINT callback;
register GCClosure *cc = (GCClosure*) closure;
register gpointer data1, data2;
gboolean v_return;
g_return_if_fail (return_value != NULL);
- g_return_if_fail (n_param_values == 4);
+ g_return_if_fail (n_param_values == 5);
if (G_CCLOSURE_SWAP_DATA (closure))
{
@@ -330,12 +333,13 @@ _e_gdbus_gdbus_cclosure_marshaller_BOOLEAN__OBJECT_STRING_UINT (GClosure *cl
data1 = g_value_peek_pointer (param_values + 0);
data2 = closure->data;
}
- callback = (GMarshalFunc_BOOLEAN__OBJECT_STRING_UINT) (marshal_data ? marshal_data : cc->callback);
+ callback = (GMarshalFunc_BOOLEAN__OBJECT_STRING_BOXED_UINT) (marshal_data ? marshal_data : cc->callback);
v_return = callback (data1,
g_marshal_value_peek_object (param_values + 1),
g_marshal_value_peek_string (param_values + 2),
- g_marshal_value_peek_uint (param_values + 3),
+ g_marshal_value_peek_boxed (param_values + 3),
+ g_marshal_value_peek_uint (param_values + 4),
data2);
g_value_set_boolean (return_value, v_return);
diff --git a/addressbook/libegdbus/e-gdbus-marshallers.h b/addressbook/libegdbus/e-gdbus-marshallers.h
index d477e91..6598ae6 100644
--- a/addressbook/libegdbus/e-gdbus-marshallers.h
+++ b/addressbook/libegdbus/e-gdbus-marshallers.h
@@ -63,13 +63,13 @@ extern void _e_gdbus_gdbus_cclosure_marshaller_BOOLEAN__OBJECT_BOXED (GClosure
gpointer invocation_hint,
gpointer marshal_data);
-/* BOOLEAN:OBJECT,STRING,UINT (e-gdbus-marshallers.list:10) */
-extern void _e_gdbus_gdbus_cclosure_marshaller_BOOLEAN__OBJECT_STRING_UINT (GClosure *closure,
- GValue *return_value,
- guint n_param_values,
- const GValue *param_values,
- gpointer invocation_hint,
- gpointer marshal_data);
+/* BOOLEAN:OBJECT,STRING,BOXED,UINT (e-gdbus-marshallers.list:10) */
+extern void _e_gdbus_gdbus_cclosure_marshaller_BOOLEAN__OBJECT_STRING_BOXED_UINT (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
G_END_DECLS
diff --git a/addressbook/libegdbus/e-gdbus-marshallers.list b/addressbook/libegdbus/e-gdbus-marshallers.list
index 46f24d4..20e3a5d 100644
--- a/addressbook/libegdbus/e-gdbus-marshallers.list
+++ b/addressbook/libegdbus/e-gdbus-marshallers.list
@@ -7,4 +7,4 @@ VOID:BOOLEAN
BOOLEAN:OBJECT,BOOLEAN
BOOLEAN:OBJECT,STRING,STRING,STRING
BOOLEAN:OBJECT,BOXED
-BOOLEAN:OBJECT,STRING,UINT
+BOOLEAN:OBJECT,STRING,BOXED,UINT
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]