[tracker] libtracker-miner: tracker_password_provider_store_password() now returns a boolean



commit dfacb82aa105575e11a9b9f668ff63c52125d8c9
Author: Martyn Russell <martyn lanedo com>
Date:   Wed Mar 17 16:16:18 2010 +0000

    libtracker-miner: tracker_password_provider_store_password() now returns a boolean

 .../tracker-gnome-password-provider.c              |    7 +++++--
 src/libtracker-miner/tracker-password-provider.c   |   16 ++++++++--------
 src/libtracker-miner/tracker-password-provider.h   |    4 ++--
 3 files changed, 15 insertions(+), 12 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-gnome-password-provider.c b/src/libtracker-miner/tracker-gnome-password-provider.c
index 2c18e22..5e7f530 100644
--- a/src/libtracker-miner/tracker-gnome-password-provider.c
+++ b/src/libtracker-miner/tracker-gnome-password-provider.c
@@ -81,7 +81,7 @@ static void     password_provider_get_property       (GObject
                                                       GValue                        *value,
                                                       GParamSpec                    *pspec);
 
-static void     password_provider_gnome_store        (TrackerPasswordProvider       *provider,
+static gboolean password_provider_gnome_store        (TrackerPasswordProvider       *provider,
                                                       const gchar                   *service,
                                                       const gchar                   *description,
                                                       const gchar                   *username,
@@ -173,7 +173,7 @@ password_provider_get_property (GObject      *object,
 	};
 }
 
-static void
+static gboolean
 password_provider_gnome_store (TrackerPasswordProvider  *provider,
                                const gchar              *service,
                                const gchar              *description,
@@ -194,7 +194,10 @@ password_provider_gnome_store (TrackerPasswordProvider  *provider,
 		             TRACKER_PASSWORD_PROVIDER_ERROR_SERVICE,
 		             "Cannot store password: %s",
 		             gnome_keyring_result_to_message (r));
+		return FALSE;
 	}
+
+	return TRUE;
 }
 
 static gchar*
diff --git a/src/libtracker-miner/tracker-password-provider.c b/src/libtracker-miner/tracker-password-provider.c
index 8d76160..8517e60 100644
--- a/src/libtracker-miner/tracker-password-provider.c
+++ b/src/libtracker-miner/tracker-password-provider.c
@@ -79,17 +79,17 @@ tracker_password_provider_get_name (TrackerPasswordProvider *provider)
 	return name;
 }
 
-void
-tracker_password_provider_store_password (TrackerPasswordProvider   *provider,
-                                           const gchar               *service,
-                                           const gchar               *description,
-                                           const gchar               *username,
-                                           const gchar               *password,
-                                           GError                   **error)
+gboolean
+tracker_password_provider_store_password (TrackerPasswordProvider  *provider,
+                                          const gchar              *service,
+                                          const gchar              *description,
+                                          const gchar              *username,
+                                          const gchar              *password,
+                                          GError                  **error)
 {
 	g_assert (TRACKER_IS_PASSWORD_PROVIDER (provider));
 
-	TRACKER_PASSWORD_PROVIDER_GET_INTERFACE (provider)->store_password (provider,
+	return TRACKER_PASSWORD_PROVIDER_GET_INTERFACE (provider)->store_password (provider,
 	                                                                    service,
 	                                                                    description,
 	                                                                    username,
diff --git a/src/libtracker-miner/tracker-password-provider.h b/src/libtracker-miner/tracker-password-provider.h
index 5741edd..1a702a5 100644
--- a/src/libtracker-miner/tracker-password-provider.h
+++ b/src/libtracker-miner/tracker-password-provider.h
@@ -44,7 +44,7 @@ struct TrackerPasswordProviderIface
 {
 	GTypeInterface parent_iface;
 
-	void     (* store_password)        (TrackerPasswordProvider  *provider,
+	gboolean (* store_password)        (TrackerPasswordProvider  *provider,
 	                                    const gchar              *service,
 	                                    const gchar              *description,
 	                                    const gchar              *username,
@@ -67,7 +67,7 @@ gchar* tracker_password_provider_get_name        (TrackerPasswordProvider   *pro
 /* Must be defined by the selected implementation */
 TrackerPasswordProvider*
        tracker_password_provider_get             (void);
-void   tracker_password_provider_store_password  (TrackerPasswordProvider   *provider,
+gboolean tracker_password_provider_store_password  (TrackerPasswordProvider   *provider,
                                                   const gchar              *service,
                                                   const gchar              *description,
                                                   const gchar              *username,



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