[epiphany/wip/ephy-sync: 91/116] Rename functions



commit 76c785099e195cd1f48611cb75822bdf407ab78f
Author: Gabriel Ivascu <ivascu gabriel59 gmail com>
Date:   Fri Jul 15 20:00:00 2016 +0300

    Rename functions

 src/ephy-sync-secret.c  |    2 +-
 src/ephy-sync-service.c |   30 +++++++++++++++---------------
 src/ephy-sync-service.h |   40 ++++++++++++++++++++--------------------
 src/prefs-dialog.c      |    8 ++++----
 4 files changed, 40 insertions(+), 40 deletions(-)
---
diff --git a/src/ephy-sync-secret.c b/src/ephy-sync-secret.c
index 29ca050..6aa6707 100644
--- a/src/ephy-sync-secret.c
+++ b/src/ephy-sync-secret.c
@@ -123,7 +123,7 @@ ephy_sync_secret_load_tokens (EphySyncService *sync_service)
     if (g_strcmp0 (emailUTF8, user_email))
       continue;
 
-    ephy_sync_service_save_token (sync_service, g_strdup (token_value), token_type);
+    ephy_sync_service_set_token (sync_service, g_strdup (token_value), token_type);
 LOG ("[%d] Loaded token %s with value %s for email %s", __LINE__, token_name, token_value, emailUTF8);
 
     g_hash_table_unref (attributes);
diff --git a/src/ephy-sync-service.c b/src/ephy-sync-service.c
index 912b42e..9077a84 100644
--- a/src/ephy-sync-service.c
+++ b/src/ephy-sync-service.c
@@ -190,9 +190,9 @@ LOG ("[%d] Returning token %s with value %s", __LINE__, token_name, token_value)
 }
 
 void
-ephy_sync_service_save_token (EphySyncService   *self,
-                              gchar             *token_value,
-                              EphySyncTokenType  token_type)
+ephy_sync_service_set_token (EphySyncService   *self,
+                             gchar             *token_value,
+                             EphySyncTokenType  token_type)
 {
   const gchar *token_name;
 
@@ -206,22 +206,22 @@ LOG ("[%d] Saved token %s with value %s", __LINE__, token_name, token_value);
 }
 
 void
-ephy_sync_service_save_store_tokens (EphySyncService   *self,
-                                     gchar             *token_value,
-                                     EphySyncTokenType  token_type,
-                                     ...)
+ephy_sync_service_set_and_store_tokens (EphySyncService   *self,
+                                        gchar             *token_value,
+                                        EphySyncTokenType  token_type,
+                                        ...)
 {
   EphySyncTokenType type;
   gchar *value;
   va_list args;
 
-  ephy_sync_service_save_token (self, token_value, token_type);
+  ephy_sync_service_set_token (self, token_value, token_type);
   ephy_sync_secret_store_token (self->user_email, token_value, token_type);
 
   va_start (args, token_type);
   while ((value = va_arg (args, gchar *)) != NULL) {
     type = va_arg (args, EphySyncTokenType);
-    ephy_sync_service_save_token (self, value, type);
+    ephy_sync_service_set_token (self, value, type);
     ephy_sync_secret_store_token (self->user_email, value, type);
   }
   va_end (args);
@@ -323,12 +323,12 @@ ephy_sync_service_fetch_sync_keys (EphySyncService *self,
 
   /* Everything is okay, save the tokens. */
   ephy_sync_service_set_user_email (self, email);
-  ephy_sync_service_save_store_tokens (self,
-                                       g_strdup (keyFetchToken), EPHY_SYNC_TOKEN_KEYFETCHTOKEN,
-                                       g_strdup (unwrapBKey), EPHY_SYNC_TOKEN_UNWRAPBKEY,
-                                       ephy_sync_utils_encode_hex (sync_keys->kA, 0), EPHY_SYNC_TOKEN_KA,
-                                       ephy_sync_utils_encode_hex (sync_keys->kB, 0), EPHY_SYNC_TOKEN_KB,
-                                       NULL);
+  ephy_sync_service_set_and_store_tokens (self,
+                                          g_strdup (keyFetchToken), EPHY_SYNC_TOKEN_KEYFETCHTOKEN,
+                                          g_strdup (unwrapBKey), EPHY_SYNC_TOKEN_UNWRAPBKEY,
+                                          ephy_sync_utils_encode_hex (sync_keys->kA, 0), EPHY_SYNC_TOKEN_KA,
+                                          ephy_sync_utils_encode_hex (sync_keys->kB, 0), EPHY_SYNC_TOKEN_KB,
+                                          NULL);
   retval = TRUE;
 
 LOG ("kA: %s", ephy_sync_utils_encode_hex (sync_keys->kA, 0));
diff --git a/src/ephy-sync-service.h b/src/ephy-sync-service.h
index 7e229a6..17054b6 100644
--- a/src/ephy-sync-service.h
+++ b/src/ephy-sync-service.h
@@ -29,34 +29,34 @@ G_BEGIN_DECLS
 
 G_DECLARE_FINAL_TYPE (EphySyncService, ephy_sync_service, EPHY, SYNC_SERVICE, GObject)
 
-EphySyncService *ephy_sync_service_new               (void);
+EphySyncService *ephy_sync_service_new                  (void);
 
-gchar           *ephy_sync_service_get_user_email    (EphySyncService *self);
+gchar           *ephy_sync_service_get_user_email       (EphySyncService *self);
 
-void             ephy_sync_service_set_user_email    (EphySyncService *self,
-                                                      const gchar     *email);
+void             ephy_sync_service_set_user_email       (EphySyncService *self,
+                                                         const gchar     *email);
 
-gchar           *ephy_sync_service_get_token         (EphySyncService   *self,
-                                                      EphySyncTokenType  token_type);
+gchar           *ephy_sync_service_get_token            (EphySyncService   *self,
+                                                         EphySyncTokenType  token_type);
 
-void             ephy_sync_service_save_token        (EphySyncService   *self,
-                                                      gchar             *token_value,
-                                                      EphySyncTokenType  token_type);
+void             ephy_sync_service_set_token            (EphySyncService   *self,
+                                                         gchar             *token_value,
+                                                         EphySyncTokenType  token_type);
 
-void             ephy_sync_service_save_store_tokens (EphySyncService   *self,
-                                                      gchar             *token_value,
-                                                      EphySyncTokenType  token_type,
-                                                      ...) G_GNUC_NULL_TERMINATED;
+void             ephy_sync_service_set_and_store_tokens (EphySyncService   *self,
+                                                         gchar             *token_value,
+                                                         EphySyncTokenType  token_type,
+                                                         ...) G_GNUC_NULL_TERMINATED;
 
-void             ephy_sync_service_delete_all_tokens (EphySyncService *self);
+void             ephy_sync_service_delete_all_tokens    (EphySyncService *self);
 
-void             ephy_sync_service_destroy_session   (EphySyncService *self,
-                                                      const gchar     *sessionToken);
+void             ephy_sync_service_destroy_session      (EphySyncService *self,
+                                                         const gchar     *sessionToken);
 
-gboolean         ephy_sync_service_fetch_sync_keys   (EphySyncService *self,
-                                                      const gchar     *email,
-                                                      const gchar     *keyFetchToken,
-                                                      const gchar     *unwrapBKey);
+gboolean         ephy_sync_service_fetch_sync_keys      (EphySyncService *self,
+                                                         const gchar     *email,
+                                                         const gchar     *keyFetchToken,
+                                                         const gchar     *unwrapBKey);
 
 G_END_DECLS
 
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index 0e18e1d..bdebc44 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -290,10 +290,10 @@ server_message_received_cb (WebKitUserContentManager *manager,
 
     /* Everything is okay, save the tokens. */
     g_settings_set_string (EPHY_SETTINGS_MAIN, EPHY_PREFS_SYNC_USER, email);
-    ephy_sync_service_save_store_tokens (service,
-                                         g_strdup (uid), EPHY_SYNC_TOKEN_UID,
-                                         g_strdup (sessionToken), EPHY_SYNC_TOKEN_SESSIONTOKEN,
-                                         NULL);
+    ephy_sync_service_set_and_store_tokens (service,
+                                            g_strdup (uid), EPHY_SYNC_TOKEN_UID,
+                                            g_strdup (sessionToken), EPHY_SYNC_TOKEN_SESSIONTOKEN,
+                                            NULL);
 
     /* Translators: the %s refers to the email of the currently logged in user. */
     gtk_label_set_markup (GTK_LABEL (dialog->sync_sign_out_details),


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