[gnome-online-accounts/wip/rishi/templates: 6/8] daemon: Rename some utility functions



commit 1e47cd0be813f675c84c0df71b372811f67aa8d4
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Aug 26 21:00:51 2016 +0200

    daemon: Rename some utility functions
    
    This will let us add similar functions dealing with templates instead
    of real accounts.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=771366

 src/daemon/goadaemon.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/daemon/goadaemon.c b/src/daemon/goadaemon.c
index b000f0b..d54166e 100644
--- a/src/daemon/goadaemon.c
+++ b/src/daemon/goadaemon.c
@@ -395,14 +395,14 @@ diff_sorted_lists (GList *list1,
 /* ---------------------------------------------------------------------------------------------------- */
 
 static const gchar *
-group_to_id (const gchar *group)
+account_group_to_id (const gchar *group)
 {
   g_return_val_if_fail (g_str_has_prefix (group, "Account "), NULL);
   return group + sizeof "Account " - 1;
 }
 
 static gchar *
-object_path_to_group (const gchar *object_path)
+account_object_path_to_group (const gchar *object_path)
 {
   g_return_val_if_fail (g_str_has_prefix (object_path, "/org/gnome/OnlineAccounts/Accounts/"), NULL);
   return g_strdup_printf ("Account %s", object_path + sizeof "/org/gnome/OnlineAccounts/Accounts/" - 1);
@@ -500,7 +500,7 @@ add_config_file (GoaDaemon     *self,
                   g_debug ("ignoring account \"%s\" in file %s because it's stale",
                            groups[n], path);
 
-                  id = group_to_id (groups[n]);
+                  id = account_group_to_id (groups[n]);
                   if (id == NULL)
                     {
                       g_warning ("Unable to get account ID from group: %s", groups[n]);
@@ -692,7 +692,7 @@ process_config_entries (GoaDaemon  *self,
       const gchar *id;
       gchar *object_path;
 
-      id = group_to_id (group);
+      id = account_group_to_id (group);
 
       /* create and validate object path */
       object_path = g_strdup_printf ("/org/gnome/OnlineAccounts/Accounts/%s", id);
@@ -736,7 +736,7 @@ process_config_entries (GoaDaemon  *self,
 
       g_debug ("adding %s", object_path);
 
-      group = object_path_to_group (object_path);
+      group = account_object_path_to_group (object_path);
       key_file_data = g_hash_table_lookup (group_name_to_key_file_data, group);
       g_warn_if_fail (key_file_data != NULL);
 
@@ -769,7 +769,7 @@ process_config_entries (GoaDaemon  *self,
 
       g_debug ("unchanged %s", object_path);
 
-      group = object_path_to_group (object_path);
+      group = account_object_path_to_group (object_path);
       key_file_data = g_hash_table_lookup (group_name_to_key_file_data, group);
       g_warn_if_fail (key_file_data != NULL);
 


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