[evolution-data-server/email-factory] Implement addPassword



commit 7af1d878b47f0d514765c3680caad02a9b7e9b21
Author: Srinivasa Ragavan <sragavan gnome org>
Date:   Fri Apr 29 18:39:44 2011 +0530

    Implement addPassword

 mail/daemon/e-mail-data-session.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/mail/daemon/e-mail-data-session.c b/mail/daemon/e-mail-data-session.c
index 4d6bb6f..80a6116 100644
--- a/mail/daemon/e-mail-data-session.c
+++ b/mail/daemon/e-mail-data-session.c
@@ -332,6 +332,20 @@ impl_Mail_getFolderFromUri (EGdbusSessionCS *object, GDBusMethodInvocation *invo
 	return TRUE;
 }
 
+static gboolean
+impl_Mail_addPassword (EGdbusSessionCS *object, GDBusMethodInvocation *invocation, const char *key, const char *password, gboolean remember, EMailDataSession *msession)
+{
+	EMailDataSessionPrivate *priv = DATA_SESSION_PRIVATE(msession);
+
+	ipc(printf("Adding Password for: %s (remember: %d)\n", key, remember));
+	e_passwords_add_password (key, password);
+	if (remember)
+		e_passwords_remember_password ("Mail", key);
+
+	return TRUE;
+}
+
+
 
 static void
 e_mail_data_session_get_property (GObject *object, guint property_id,
@@ -390,6 +404,7 @@ e_mail_data_session_init (EMailDataSession *self)
 	g_signal_connect (priv->gdbus_object, "handle-get-local-store", G_CALLBACK (impl_Mail_getLocalStore), self);
 	g_signal_connect (priv->gdbus_object, "handle-get-local-folder", G_CALLBACK (impl_Mail_getLocalFolder), self);
 	g_signal_connect (priv->gdbus_object, "handle-get-folder-from-uri", G_CALLBACK (impl_Mail_getFolderFromUri), self);
+	g_signal_connect (priv->gdbus_object, "handle-add-password", G_CALLBACK (impl_Mail_addPassword), self);
 
 	priv->stores_lock = g_mutex_new ();
 	priv->stores = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);



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