[evolution-data-server/meego-eds: 19/47] Fix the AddPassword API



commit 58a478c415fdb093a71f178be6a86dc0ad872699
Author: Srinivasa Ragavan <sragavan gnome org>
Date:   Fri Apr 29 12:23:06 2011 +0530

    Fix the AddPassword API

 mail/daemon/e-mail-data-session.xml   |    1 +
 mail/libegdbus/e-gdbus-emailsession.c |   24 ++++++++++++++++++++----
 mail/libegdbus/e-gdbus-emailsession.h |    3 +++
 3 files changed, 24 insertions(+), 4 deletions(-)
---
diff --git a/mail/daemon/e-mail-data-session.xml b/mail/daemon/e-mail-data-session.xml
index ddd02a4..d963bf6 100644
--- a/mail/daemon/e-mail-data-session.xml
+++ b/mail/daemon/e-mail-data-session.xml
@@ -23,6 +23,7 @@
     </method>
 
     <method name="addPassword">
+      <arg name="key" type="s" direction="in"/>	    
       <arg name="password" type="s" direction="in"/>
       <arg name="remember" type="b" direction="in"/>      
     </method>
diff --git a/mail/libegdbus/e-gdbus-emailsession.c b/mail/libegdbus/e-gdbus-emailsession.c
index c3403b4..57b4c47 100644
--- a/mail/libegdbus/e-gdbus-emailsession.c
+++ b/mail/libegdbus/e-gdbus-emailsession.c
@@ -405,6 +405,17 @@ static const _ExtendedGDBusMethodInfo _egdbus_session_cs_method_info_get_local_s
   "handle-get-local-store"
 };
 
+static const _ExtendedGDBusArgInfo _egdbus_session_cs_method_info_add_password_IN_ARG_key =
+{
+  {
+    -1,
+    "key",
+    "s",
+    NULL
+  },
+  FALSE
+};
+
 static const _ExtendedGDBusArgInfo _egdbus_session_cs_method_info_add_password_IN_ARG_password =
 {
   {
@@ -429,6 +440,7 @@ static const _ExtendedGDBusArgInfo _egdbus_session_cs_method_info_add_password_I
 
 static const _ExtendedGDBusArgInfo * const _egdbus_session_cs_method_info_add_password_IN_ARG_pointers[] =
 {
+  &_egdbus_session_cs_method_info_add_password_IN_ARG_key,
   &_egdbus_session_cs_method_info_add_password_IN_ARG_password,
   &_egdbus_session_cs_method_info_add_password_IN_ARG_remember,
   NULL
@@ -673,8 +685,8 @@ egdbus_session_cs_default_init (EGdbusSessionCSIface *iface)
     NULL,
     _cclosure_marshal_generic,
     G_TYPE_BOOLEAN,
-    3,
-    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_BOOLEAN);
+    4,
+    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN);
 
   g_signal_new ("handle-get-local-folder",
     G_TYPE_FROM_INTERFACE (iface),
@@ -855,6 +867,7 @@ _out:
 void
 egdbus_session_cs_call_add_password (
     EGdbusSessionCS *proxy,
+    const gchar *key,
     const gchar *password,
     gboolean remember,
     GCancellable *cancellable,
@@ -863,7 +876,8 @@ egdbus_session_cs_call_add_password (
 {
   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
     "addPassword",
-    g_variant_new ("(sb)",
+    g_variant_new ("(ssb)",
+                   key,
                    password,
                    remember),
     G_DBUS_CALL_FLAGS_NONE,
@@ -893,6 +907,7 @@ _out:
 gboolean
 egdbus_session_cs_call_add_password_sync (
     EGdbusSessionCS *proxy,
+    const gchar *key,
     const gchar *password,
     gboolean remember,
     GCancellable *cancellable,
@@ -901,7 +916,8 @@ egdbus_session_cs_call_add_password_sync (
   GVariant *_ret;
   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
     "addPassword",
-    g_variant_new ("(sb)",
+    g_variant_new ("(ssb)",
+                   key,
                    password,
                    remember),
     G_DBUS_CALL_FLAGS_NONE,
diff --git a/mail/libegdbus/e-gdbus-emailsession.h b/mail/libegdbus/e-gdbus-emailsession.h
index 030c5f9..4adf845 100644
--- a/mail/libegdbus/e-gdbus-emailsession.h
+++ b/mail/libegdbus/e-gdbus-emailsession.h
@@ -45,6 +45,7 @@ struct _EGdbusSessionCSIface
   gboolean (*handle_add_password) (
     EGdbusSessionCS *object,
     GDBusMethodInvocation *invocation,
+    const gchar *key,
     const gchar *password,
     gboolean remember);
 
@@ -150,6 +151,7 @@ gboolean egdbus_session_cs_call_get_local_store_sync (
 
 void egdbus_session_cs_call_add_password (
     EGdbusSessionCS *proxy,
+    const gchar *key,
     const gchar *password,
     gboolean remember,
     GCancellable *cancellable,
@@ -163,6 +165,7 @@ gboolean egdbus_session_cs_call_add_password_finish (
 
 gboolean egdbus_session_cs_call_add_password_sync (
     EGdbusSessionCS *proxy,
+    const gchar *key,
     const gchar *password,
     gboolean remember,
     GCancellable *cancellable,



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