[evolution-data-server/meego-eds: 43/47] Add the dbus api from codegen.



commit 2aa84fd86f30a1075ff980f61dd8fe4d1a590b9b
Author: Srinivasa Ragavan <sragavan gnome org>
Date:   Tue Jun 7 23:21:01 2011 +0530

    Add the dbus api from codegen.

 mail/libegdbus/e-gdbus-emailfolder.c  |  134 +++++++++++++++++++++++++++++
 mail/libegdbus/e-gdbus-emailfolder.h  |   30 +++++++
 mail/libegdbus/e-gdbus-emailsession.c |  150 +++++++++++++++++++++++++++++++++
 mail/libegdbus/e-gdbus-emailsession.h |   33 +++++++
 4 files changed, 347 insertions(+), 0 deletions(-)
---
diff --git a/mail/libegdbus/e-gdbus-emailfolder.c b/mail/libegdbus/e-gdbus-emailfolder.c
index 4bf8c55..09232ec 100644
--- a/mail/libegdbus/e-gdbus-emailfolder.c
+++ b/mail/libegdbus/e-gdbus-emailfolder.c
@@ -1285,6 +1285,52 @@ static const _ExtendedGDBusMethodInfo _egdbus_folder_cf_method_info_get_message
   "handle-get-message"
 };
 
+static const _ExtendedGDBusArgInfo _egdbus_folder_cf_method_info_fetch_old_messages_IN_ARG_count =
+{
+  {
+    -1,
+    "count",
+    "i",
+    NULL
+  },
+  FALSE
+};
+
+static const _ExtendedGDBusArgInfo * const _egdbus_folder_cf_method_info_fetch_old_messages_IN_ARG_pointers[] =
+{
+  &_egdbus_folder_cf_method_info_fetch_old_messages_IN_ARG_count,
+  NULL
+};
+
+static const _ExtendedGDBusArgInfo _egdbus_folder_cf_method_info_fetch_old_messages_OUT_ARG_success =
+{
+  {
+    -1,
+    "success",
+    "b",
+    NULL
+  },
+  FALSE
+};
+
+static const _ExtendedGDBusArgInfo * const _egdbus_folder_cf_method_info_fetch_old_messages_OUT_ARG_pointers[] =
+{
+  &_egdbus_folder_cf_method_info_fetch_old_messages_OUT_ARG_success,
+  NULL
+};
+
+static const _ExtendedGDBusMethodInfo _egdbus_folder_cf_method_info_fetch_old_messages =
+{
+  {
+    -1,
+    "fetchOldMessages",
+    (GDBusArgInfo **) &_egdbus_folder_cf_method_info_fetch_old_messages_IN_ARG_pointers,
+    (GDBusArgInfo **) &_egdbus_folder_cf_method_info_fetch_old_messages_OUT_ARG_pointers,
+    NULL
+  },
+  "handle-fetch-old-messages"
+};
+
 static const _ExtendedGDBusArgInfo _egdbus_folder_cf_method_info_search_by_expression_IN_ARG_expression =
 {
   {
@@ -1628,6 +1674,7 @@ static const _ExtendedGDBusMethodInfo * const _egdbus_folder_cf_method_info_poin
   &_egdbus_folder_cf_method_info_append_message,
   &_egdbus_folder_cf_method_info_get_uids,
   &_egdbus_folder_cf_method_info_get_message,
+  &_egdbus_folder_cf_method_info_fetch_old_messages,
   &_egdbus_folder_cf_method_info_search_by_expression,
   &_egdbus_folder_cf_method_info_search_sort_by_expression,
   &_egdbus_folder_cf_method_info_search_by_uids,
@@ -2019,6 +2066,17 @@ egdbus_folder_cf_default_init (EGdbusFolderCFIface *iface)
     2,
     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
 
+  g_signal_new ("handle-fetch-old-messages",
+    G_TYPE_FROM_INTERFACE (iface),
+    G_SIGNAL_RUN_LAST,
+    G_STRUCT_OFFSET (EGdbusFolderCFIface, handle_fetch_old_messages),
+    g_signal_accumulator_true_handled,
+    NULL,
+    _cclosure_marshal_generic,
+    G_TYPE_BOOLEAN,
+    2,
+    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_INT);
+
   g_signal_new ("handle-search-by-expression",
     G_TYPE_FROM_INTERFACE (iface),
     G_SIGNAL_RUN_LAST,
@@ -3708,6 +3766,71 @@ _out:
 }
 
 void
+egdbus_folder_cf_call_fetch_old_messages (
+    EGdbusFolderCF *proxy,
+    gint count,
+    GCancellable *cancellable,
+    GAsyncReadyCallback callback,
+    gpointer user_data)
+{
+  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+    "fetchOldMessages",
+    g_variant_new ("(i)",
+                   count),
+    G_DBUS_CALL_FLAGS_NONE,
+    -1,
+    cancellable,
+    callback,
+    user_data);
+}
+
+gboolean
+egdbus_folder_cf_call_fetch_old_messages_finish (
+    EGdbusFolderCF *proxy,
+    gboolean *out_success,
+    GAsyncResult *res,
+    GError **error)
+{
+  GVariant *_ret;
+  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
+  if (_ret == NULL)
+    goto _out;
+  g_variant_get (_ret,
+                 "(b)",
+                 out_success);
+  g_variant_unref (_ret);
+_out:
+  return _ret != NULL;
+}
+
+gboolean
+egdbus_folder_cf_call_fetch_old_messages_sync (
+    EGdbusFolderCF *proxy,
+    gint count,
+    gboolean *out_success,
+    GCancellable *cancellable,
+    GError **error)
+{
+  GVariant *_ret;
+  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+    "fetchOldMessages",
+    g_variant_new ("(i)",
+                   count),
+    G_DBUS_CALL_FLAGS_NONE,
+    -1,
+    cancellable,
+    error);
+  if (_ret == NULL)
+    goto _out;
+  g_variant_get (_ret,
+                 "(b)",
+                 out_success);
+  g_variant_unref (_ret);
+_out:
+  return _ret != NULL;
+}
+
+void
 egdbus_folder_cf_call_search_by_expression (
     EGdbusFolderCF *proxy,
     const gchar *expression,
@@ -4377,6 +4500,17 @@ egdbus_folder_cf_complete_get_message (
 }
 
 void
+egdbus_folder_cf_complete_fetch_old_messages (
+    EGdbusFolderCF *object,
+    GDBusMethodInvocation *invocation,
+    gboolean success)
+{
+  g_dbus_method_invocation_return_value (invocation,
+    g_variant_new ("(b)",
+                   success));
+}
+
+void
 egdbus_folder_cf_complete_search_by_expression (
     EGdbusFolderCF *object,
     GDBusMethodInvocation *invocation,
diff --git a/mail/libegdbus/e-gdbus-emailfolder.h b/mail/libegdbus/e-gdbus-emailfolder.h
index fe9548d..670126c 100644
--- a/mail/libegdbus/e-gdbus-emailfolder.h
+++ b/mail/libegdbus/e-gdbus-emailfolder.h
@@ -154,6 +154,11 @@ struct _EGdbusFolderCFIface
     GDBusMethodInvocation *invocation,
     const gchar *uid);
 
+  gboolean (*handle_fetch_old_messages) (
+    EGdbusFolderCF *object,
+    GDBusMethodInvocation *invocation,
+    gint count);
+
   gboolean (*handle_search_by_expression) (
     EGdbusFolderCF *object,
     GDBusMethodInvocation *invocation,
@@ -326,6 +331,11 @@ void egdbus_folder_cf_complete_get_message (
     GDBusMethodInvocation *invocation,
     const gchar *message);
 
+void egdbus_folder_cf_complete_fetch_old_messages (
+    EGdbusFolderCF *object,
+    GDBusMethodInvocation *invocation,
+    gboolean success);
+
 void egdbus_folder_cf_complete_search_by_expression (
     EGdbusFolderCF *object,
     GDBusMethodInvocation *invocation,
@@ -852,6 +862,26 @@ gboolean egdbus_folder_cf_call_get_message_sync (
     GCancellable *cancellable,
     GError **error);
 
+void egdbus_folder_cf_call_fetch_old_messages (
+    EGdbusFolderCF *proxy,
+    gint count,
+    GCancellable *cancellable,
+    GAsyncReadyCallback callback,
+    gpointer user_data);
+
+gboolean egdbus_folder_cf_call_fetch_old_messages_finish (
+    EGdbusFolderCF *proxy,
+    gboolean *out_success,
+    GAsyncResult *res,
+    GError **error);
+
+gboolean egdbus_folder_cf_call_fetch_old_messages_sync (
+    EGdbusFolderCF *proxy,
+    gint count,
+    gboolean *out_success,
+    GCancellable *cancellable,
+    GError **error);
+
 void egdbus_folder_cf_call_search_by_expression (
     EGdbusFolderCF *proxy,
     const gchar *expression,
diff --git a/mail/libegdbus/e-gdbus-emailsession.c b/mail/libegdbus/e-gdbus-emailsession.c
index 617e7dd..f08755f 100644
--- a/mail/libegdbus/e-gdbus-emailsession.c
+++ b/mail/libegdbus/e-gdbus-emailsession.c
@@ -591,6 +591,64 @@ static const _ExtendedGDBusMethodInfo _egdbus_session_cs_method_info_fetch_accou
   "handle-fetch-account"
 };
 
+static const _ExtendedGDBusArgInfo _egdbus_session_cs_method_info_fetch_old_messages_IN_ARG_uid =
+{
+  {
+    -1,
+    "uid",
+    "s",
+    NULL
+  },
+  FALSE
+};
+
+static const _ExtendedGDBusArgInfo _egdbus_session_cs_method_info_fetch_old_messages_IN_ARG_count =
+{
+  {
+    -1,
+    "count",
+    "i",
+    NULL
+  },
+  FALSE
+};
+
+static const _ExtendedGDBusArgInfo * const _egdbus_session_cs_method_info_fetch_old_messages_IN_ARG_pointers[] =
+{
+  &_egdbus_session_cs_method_info_fetch_old_messages_IN_ARG_uid,
+  &_egdbus_session_cs_method_info_fetch_old_messages_IN_ARG_count,
+  NULL
+};
+
+static const _ExtendedGDBusArgInfo _egdbus_session_cs_method_info_fetch_old_messages_OUT_ARG_success =
+{
+  {
+    -1,
+    "success",
+    "b",
+    NULL
+  },
+  FALSE
+};
+
+static const _ExtendedGDBusArgInfo * const _egdbus_session_cs_method_info_fetch_old_messages_OUT_ARG_pointers[] =
+{
+  &_egdbus_session_cs_method_info_fetch_old_messages_OUT_ARG_success,
+  NULL
+};
+
+static const _ExtendedGDBusMethodInfo _egdbus_session_cs_method_info_fetch_old_messages =
+{
+  {
+    -1,
+    "fetchOldMessages",
+    (GDBusArgInfo **) &_egdbus_session_cs_method_info_fetch_old_messages_IN_ARG_pointers,
+    (GDBusArgInfo **) &_egdbus_session_cs_method_info_fetch_old_messages_OUT_ARG_pointers,
+    NULL
+  },
+  "handle-fetch-old-messages"
+};
+
 static const _ExtendedGDBusMethodInfo _egdbus_session_cs_method_info_cancel_operations =
 {
   {
@@ -612,6 +670,7 @@ static const _ExtendedGDBusMethodInfo * const _egdbus_session_cs_method_info_poi
   &_egdbus_session_cs_method_info_get_folder_from_uri,
   &_egdbus_session_cs_method_info_send_receive,
   &_egdbus_session_cs_method_info_fetch_account,
+  &_egdbus_session_cs_method_info_fetch_old_messages,
   &_egdbus_session_cs_method_info_cancel_operations,
   NULL
 };
@@ -887,6 +946,17 @@ egdbus_session_cs_default_init (EGdbusSessionCSIface *iface)
     2,
     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
 
+  g_signal_new ("handle-fetch-old-messages",
+    G_TYPE_FROM_INTERFACE (iface),
+    G_SIGNAL_RUN_LAST,
+    G_STRUCT_OFFSET (EGdbusSessionCSIface, handle_fetch_old_messages),
+    g_signal_accumulator_true_handled,
+    NULL,
+    _cclosure_marshal_generic,
+    G_TYPE_BOOLEAN,
+    3,
+    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_INT);
+
   g_signal_new ("handle-cancel-operations",
     G_TYPE_FROM_INTERFACE (iface),
     G_SIGNAL_RUN_LAST,
@@ -1441,6 +1511,75 @@ _out:
 }
 
 void
+egdbus_session_cs_call_fetch_old_messages (
+    EGdbusSessionCS *proxy,
+    const gchar *uid,
+    gint count,
+    GCancellable *cancellable,
+    GAsyncReadyCallback callback,
+    gpointer user_data)
+{
+  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+    "fetchOldMessages",
+    g_variant_new ("(si)",
+                   uid,
+                   count),
+    G_DBUS_CALL_FLAGS_NONE,
+    -1,
+    cancellable,
+    callback,
+    user_data);
+}
+
+gboolean
+egdbus_session_cs_call_fetch_old_messages_finish (
+    EGdbusSessionCS *proxy,
+    gboolean *out_success,
+    GAsyncResult *res,
+    GError **error)
+{
+  GVariant *_ret;
+  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
+  if (_ret == NULL)
+    goto _out;
+  g_variant_get (_ret,
+                 "(b)",
+                 out_success);
+  g_variant_unref (_ret);
+_out:
+  return _ret != NULL;
+}
+
+gboolean
+egdbus_session_cs_call_fetch_old_messages_sync (
+    EGdbusSessionCS *proxy,
+    const gchar *uid,
+    gint count,
+    gboolean *out_success,
+    GCancellable *cancellable,
+    GError **error)
+{
+  GVariant *_ret;
+  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+    "fetchOldMessages",
+    g_variant_new ("(si)",
+                   uid,
+                   count),
+    G_DBUS_CALL_FLAGS_NONE,
+    -1,
+    cancellable,
+    error);
+  if (_ret == NULL)
+    goto _out;
+  g_variant_get (_ret,
+                 "(b)",
+                 out_success);
+  g_variant_unref (_ret);
+_out:
+  return _ret != NULL;
+}
+
+void
 egdbus_session_cs_call_cancel_operations (
     EGdbusSessionCS *proxy,
     GCancellable *cancellable,
@@ -1569,6 +1708,17 @@ egdbus_session_cs_complete_fetch_account (
 }
 
 void
+egdbus_session_cs_complete_fetch_old_messages (
+    EGdbusSessionCS *object,
+    GDBusMethodInvocation *invocation,
+    gboolean success)
+{
+  g_dbus_method_invocation_return_value (invocation,
+    g_variant_new ("(b)",
+                   success));
+}
+
+void
 egdbus_session_cs_complete_cancel_operations (
     EGdbusSessionCS *object,
     GDBusMethodInvocation *invocation)
diff --git a/mail/libegdbus/e-gdbus-emailsession.h b/mail/libegdbus/e-gdbus-emailsession.h
index 5610fbf..c2e1760 100644
--- a/mail/libegdbus/e-gdbus-emailsession.h
+++ b/mail/libegdbus/e-gdbus-emailsession.h
@@ -68,6 +68,12 @@ struct _EGdbusSessionCSIface
     GDBusMethodInvocation *invocation,
     const gchar *uid);
 
+  gboolean (*handle_fetch_old_messages) (
+    EGdbusSessionCS *object,
+    GDBusMethodInvocation *invocation,
+    const gchar *uid,
+    gint count);
+
   gboolean (*handle_cancel_operations) (
     EGdbusSessionCS *object,
     GDBusMethodInvocation *invocation);
@@ -135,6 +141,11 @@ void egdbus_session_cs_complete_fetch_account (
     EGdbusSessionCS *object,
     GDBusMethodInvocation *invocation);
 
+void egdbus_session_cs_complete_fetch_old_messages (
+    EGdbusSessionCS *object,
+    GDBusMethodInvocation *invocation,
+    gboolean success);
+
 void egdbus_session_cs_complete_cancel_operations (
     EGdbusSessionCS *object,
     GDBusMethodInvocation *invocation);
@@ -300,6 +311,28 @@ gboolean egdbus_session_cs_call_fetch_account_sync (
     GCancellable *cancellable,
     GError **error);
 
+void egdbus_session_cs_call_fetch_old_messages (
+    EGdbusSessionCS *proxy,
+    const gchar *uid,
+    gint count,
+    GCancellable *cancellable,
+    GAsyncReadyCallback callback,
+    gpointer user_data);
+
+gboolean egdbus_session_cs_call_fetch_old_messages_finish (
+    EGdbusSessionCS *proxy,
+    gboolean *out_success,
+    GAsyncResult *res,
+    GError **error);
+
+gboolean egdbus_session_cs_call_fetch_old_messages_sync (
+    EGdbusSessionCS *proxy,
+    const gchar *uid,
+    gint count,
+    gboolean *out_success,
+    GCancellable *cancellable,
+    GError **error);
+
 void egdbus_session_cs_call_cancel_operations (
     EGdbusSessionCS *proxy,
     GCancellable *cancellable,



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