[evolution-data-server] uoa: Move service type definintions to uoa-utils.h



commit 46dff3f6c43b5a1e43251bec80077314273c2d16
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sat Feb 2 08:25:44 2013 -0500

    uoa: Move service type definintions to uoa-utils.h

 .../module-ubuntu-online-accounts.c                |   25 ++++++++------------
 modules/ubuntu-online-accounts/uoa-utils.h         |    5 ++++
 2 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/modules/ubuntu-online-accounts/module-ubuntu-online-accounts.c b/modules/ubuntu-online-accounts/module-ubuntu-online-accounts.c
index 3a37a8c..fdcfe29 100644
--- a/modules/ubuntu-online-accounts/module-ubuntu-online-accounts.c
+++ b/modules/ubuntu-online-accounts/module-ubuntu-online-accounts.c
@@ -32,11 +32,6 @@
 	(G_TYPE_CHECK_INSTANCE_CAST \
 	((obj), E_TYPE_UBUNTU_ONLINE_ACCOUNTS, EUbuntuOnlineAccounts))
 
-/* Service types we support. */
-#define SERVICE_TYPE_MAIL     "mail"
-#define SERVICE_TYPE_CALENDAR "calendar"
-#define SERVICE_TYPE_CONTACTS "contacts"
-
 #define CAMEL_OAUTH2_MECHANISM_NAME "XOAUTH2"
 
 typedef struct _EUbuntuOnlineAccounts EUbuntuOnlineAccounts;
@@ -160,27 +155,27 @@ ubuntu_online_accounts_ref_account_service (EUbuntuOnlineAccounts *extension,
 
 	extension_name = E_SOURCE_EXTENSION_ADDRESS_BOOK;
 	if (e_source_has_extension (source, extension_name))
-		service_name = SERVICE_TYPE_CONTACTS;
+		service_name = E_AG_SERVICE_TYPE_CONTACTS;
 
 	extension_name = E_SOURCE_EXTENSION_CALENDAR;
 	if (e_source_has_extension (source, extension_name))
-		service_name = SERVICE_TYPE_CALENDAR;
+		service_name = E_AG_SERVICE_TYPE_CALENDAR;
 
 	extension_name = E_SOURCE_EXTENSION_MEMO_LIST;
 	if (e_source_has_extension (source, extension_name))
-		service_name = SERVICE_TYPE_CALENDAR;
+		service_name = E_AG_SERVICE_TYPE_CALENDAR;
 
 	extension_name = E_SOURCE_EXTENSION_TASK_LIST;
 	if (e_source_has_extension (source, extension_name))
-		service_name = SERVICE_TYPE_CALENDAR;
+		service_name = E_AG_SERVICE_TYPE_CALENDAR;
 
 	extension_name = E_SOURCE_EXTENSION_MAIL_ACCOUNT;
 	if (e_source_has_extension (source, extension_name))
-		service_name = SERVICE_TYPE_MAIL;
+		service_name = E_AG_SERVICE_TYPE_MAIL;
 
 	extension_name = E_SOURCE_EXTENSION_MAIL_TRANSPORT;
 	if (e_source_has_extension (source, extension_name))
-		service_name = SERVICE_TYPE_MAIL;
+		service_name = E_AG_SERVICE_TYPE_MAIL;
 
 	g_return_val_if_fail (service_name != NULL, NULL);
 
@@ -295,7 +290,7 @@ ubuntu_online_accounts_config_oauth2 (EUbuntuOnlineAccounts *extension,
 	const gchar *extension_name;
 
 	ag_account_service = g_hash_table_lookup (
-		account_services, SERVICE_TYPE_MAIL);
+		account_services, E_AG_SERVICE_TYPE_MAIL);
 	if (ag_account_service == NULL)
 		return;
 
@@ -357,7 +352,7 @@ ubuntu_online_accounts_config_collection (EUbuntuOnlineAccounts *extension,
 			user_identity);
 
 	ag_account_service = g_hash_table_lookup (
-		account_services, SERVICE_TYPE_MAIL);
+		account_services, E_AG_SERVICE_TYPE_MAIL);
 	if (ag_account_service != NULL) {
 		g_object_bind_property (
 			ag_account_service , "enabled",
@@ -369,7 +364,7 @@ ubuntu_online_accounts_config_collection (EUbuntuOnlineAccounts *extension,
 	}
 
 	ag_account_service = g_hash_table_lookup (
-		account_services, SERVICE_TYPE_CALENDAR);
+		account_services, E_AG_SERVICE_TYPE_CALENDAR);
 	if (ag_account_service != NULL) {
 		g_object_bind_property (
 			ag_account_service, "enabled",
@@ -381,7 +376,7 @@ ubuntu_online_accounts_config_collection (EUbuntuOnlineAccounts *extension,
 	}
 
 	ag_account_service = g_hash_table_lookup (
-		account_services, SERVICE_TYPE_CONTACTS);
+		account_services, E_AG_SERVICE_TYPE_CONTACTS);
 	if (ag_account_service != NULL) {
 		g_object_bind_property (
 			ag_account_service, "enabled",
diff --git a/modules/ubuntu-online-accounts/uoa-utils.h b/modules/ubuntu-online-accounts/uoa-utils.h
index b4582c0..f900484 100644
--- a/modules/ubuntu-online-accounts/uoa-utils.h
+++ b/modules/ubuntu-online-accounts/uoa-utils.h
@@ -21,6 +21,11 @@
 
 #include <libaccounts-glib/accounts-glib.h>
 
+/* Service types we support. */
+#define E_AG_SERVICE_TYPE_MAIL     "mail"
+#define E_AG_SERVICE_TYPE_CALENDAR "calendar"
+#define E_AG_SERVICE_TYPE_CONTACTS "contacts"
+
 G_BEGIN_DECLS
 
 void		e_ag_account_collect_userinfo	(AgAccount *ag_account,



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