[gnome-online-accounts/wip/rishi/templates: 9/10] daemon: Rename some utility functions
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts/wip/rishi/templates: 9/10] daemon: Rename some utility functions
- Date: Fri, 26 Aug 2016 19:44:13 +0000 (UTC)
commit 179d9283d28b9125582053b8504dc5a9ae1727d6
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.
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 0c73a79..d44097d 100644
--- a/src/daemon/goadaemon.c
+++ b/src/daemon/goadaemon.c
@@ -406,14 +406,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);
@@ -511,7 +511,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]);
@@ -703,7 +703,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);
@@ -747,7 +747,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);
@@ -780,7 +780,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]