[evolution-data-server] ESourceRegistry: Reorder the "builtin" vs "default" functions.



commit 31796f5020316783a6842411ad00e3d078ccdb17
Author: Matthew Barnes <mbarnes redhat com>
Date:   Tue Oct 8 17:35:09 2013 -0400

    ESourceRegistry: Reorder the "builtin" vs "default" functions.
    
    The "builtin" functions aren't really part of the "DefaultSources"
    GSettings front-end API.  Instead they represent a set of ESources
    which are always available.  Keep them grouped together.

 .../libedataserver/libedataserver-sections.txt     |    8 +-
 libedataserver/e-source-registry.c                 |  240 ++++++++++----------
 libedataserver/e-source-registry.h                 |   23 +-
 3 files changed, 137 insertions(+), 134 deletions(-)
---
diff --git a/docs/reference/libedataserver/libedataserver-sections.txt 
b/docs/reference/libedataserver/libedataserver-sections.txt
index 8353785..4cfb131 100644
--- a/docs/reference/libedataserver/libedataserver-sections.txt
+++ b/docs/reference/libedataserver/libedataserver-sections.txt
@@ -864,20 +864,20 @@ e_source_registry_free_display_tree
 e_source_registry_dup_unique_display_name
 e_source_registry_debug_dump
 e_source_registry_ref_builtin_address_book
+e_source_registry_ref_builtin_calendar
+e_source_registry_ref_builtin_mail_account
+e_source_registry_ref_builtin_memo_list
+e_source_registry_ref_builtin_task_list
 e_source_registry_ref_default_address_book
 e_source_registry_set_default_address_book
-e_source_registry_ref_builtin_calendar
 e_source_registry_ref_default_calendar
 e_source_registry_set_default_calendar
-e_source_registry_ref_builtin_mail_account
 e_source_registry_ref_default_mail_account
 e_source_registry_set_default_mail_account
 e_source_registry_ref_default_mail_identity
 e_source_registry_set_default_mail_identity
-e_source_registry_ref_builtin_memo_list
 e_source_registry_ref_default_memo_list
 e_source_registry_set_default_memo_list
-e_source_registry_ref_builtin_task_list
 e_source_registry_ref_default_task_list
 e_source_registry_set_default_task_list
 e_source_registry_ref_default_for_extension_name
diff --git a/libedataserver/e-source-registry.c b/libedataserver/e-source-registry.c
index 70c99bb..812371e 100644
--- a/libedataserver/e-source-registry.c
+++ b/libedataserver/e-source-registry.c
@@ -3233,6 +3233,126 @@ e_source_registry_ref_builtin_address_book (ESourceRegistry *registry)
 }
 
 /**
+ * e_source_registry_ref_builtin_calendar:
+ * @registry: an #ESourceRegistry
+ *
+ * Returns the built-in calendar #ESource.
+ *
+ * This #ESource is always present and makes for a safe fallback.
+ *
+ * The returned #ESource is referenced for thread-safety and must be
+ * unreferenced with g_object_unref() when finished with it.
+ *
+ * Returns: (transfer full): the built-in calendar #ESource
+ *
+ * Since: 3.6
+ **/
+ESource *
+e_source_registry_ref_builtin_calendar (ESourceRegistry *registry)
+{
+       ESource *source;
+       const gchar *uid;
+
+       g_return_val_if_fail (E_IS_SOURCE_REGISTRY (registry), NULL);
+
+       uid = E_SOURCE_BUILTIN_CALENDAR_UID;
+       source = e_source_registry_ref_source (registry, uid);
+       g_return_val_if_fail (source != NULL, NULL);
+
+       return source;
+}
+
+/**
+ * e_source_registry_ref_builtin_mail_account:
+ * @registry: an #ESourceRegistry
+ *
+ * Returns the built-in mail account #ESource.
+ *
+ * This #ESource is always present and makes for a safe fallback.
+ *
+ * The returned #ESource is referenced for thread-safety and must be
+ * unreferenced with g_object_unref() when finished with it.
+ *
+ * Returns: (transfer full): the built-in mail account #ESource
+ *
+ * Since: 3.6
+ **/
+ESource *
+e_source_registry_ref_builtin_mail_account (ESourceRegistry *registry)
+{
+       ESource *source;
+       const gchar *uid;
+
+       g_return_val_if_fail (E_IS_SOURCE_REGISTRY (registry), NULL);
+
+       uid = E_SOURCE_BUILTIN_MAIL_ACCOUNT_UID;
+       source = e_source_registry_ref_source (registry, uid);
+       g_return_val_if_fail (source != NULL, NULL);
+
+       return source;
+}
+
+/**
+ * e_source_registry_ref_builtin_memo_list:
+ * @registry: an #ESourceRegistry
+ *
+ * Returns the built-in memo list #ESource.
+ *
+ * This #ESource is always present and makes for a safe fallback.
+ *
+ * The returned #ESource is referenced for thread-safety and must be
+ * unreferenced with g_object_unref() when finished with it.
+ *
+ * Returns: (transfer full): the built-in memo list #ESource
+ *
+ * Since: 3.6
+ **/
+ESource *
+e_source_registry_ref_builtin_memo_list (ESourceRegistry *registry)
+{
+       ESource *source;
+       const gchar *uid;
+
+       g_return_val_if_fail (E_IS_SOURCE_REGISTRY (registry), NULL);
+
+       uid = E_SOURCE_BUILTIN_MEMO_LIST_UID;
+       source = e_source_registry_ref_source (registry, uid);
+       g_return_val_if_fail (source != NULL, NULL);
+
+       return source;
+}
+
+/**
+ * e_source_registry_ref_builtin_task_list:
+ * @registry: an #ESourceRegistry
+ *
+ * Returns the built-in task list #ESource.
+ *
+ * This #ESource is always present and makes for a safe fallback.
+ *
+ * The returned #ESource is referenced for thread-safety and must be
+ * unreferenced with g_object_unref() when finished with it.
+ *
+ * Returns: (transfer full): the built-in task list #ESource
+ *
+ * Since: 3.6
+ **/
+ESource *
+e_source_registry_ref_builtin_task_list (ESourceRegistry *registry)
+{
+       ESource *source;
+       const gchar *uid;
+
+       g_return_val_if_fail (E_IS_SOURCE_REGISTRY (registry), NULL);
+
+       uid = E_SOURCE_BUILTIN_TASK_LIST_UID;
+       source = e_source_registry_ref_source (registry, uid);
+       g_return_val_if_fail (source != NULL, NULL);
+
+       return source;
+}
+
+/**
  * e_source_registry_ref_default_address_book:
  * @registry: an #ESourceRegistry
  *
@@ -3305,36 +3425,6 @@ e_source_registry_set_default_address_book (ESourceRegistry *registry,
 }
 
 /**
- * e_source_registry_ref_builtin_calendar:
- * @registry: an #ESourceRegistry
- *
- * Returns the built-in calendar #ESource.
- *
- * This #ESource is always present and makes for a safe fallback.
- *
- * The returned #ESource is referenced for thread-safety and must be
- * unreferenced with g_object_unref() when finished with it.
- *
- * Returns: (transfer full): the built-in calendar #ESource
- *
- * Since: 3.6
- **/
-ESource *
-e_source_registry_ref_builtin_calendar (ESourceRegistry *registry)
-{
-       ESource *source;
-       const gchar *uid;
-
-       g_return_val_if_fail (E_IS_SOURCE_REGISTRY (registry), NULL);
-
-       uid = E_SOURCE_BUILTIN_CALENDAR_UID;
-       source = e_source_registry_ref_source (registry, uid);
-       g_return_val_if_fail (source != NULL, NULL);
-
-       return source;
-}
-
-/**
  * e_source_registry_ref_default_calendar:
  * @registry: an #ESourceRegistry
  *
@@ -3407,36 +3497,6 @@ e_source_registry_set_default_calendar (ESourceRegistry *registry,
 }
 
 /**
- * e_source_registry_ref_builtin_mail_account:
- * @registry: an #ESourceRegistry
- *
- * Returns the built-in mail account #ESource.
- *
- * This #ESource is always present and makes for a safe fallback.
- *
- * The returned #ESource is referenced for thread-safety and must be
- * unreferenced with g_object_unref() when finished with it.
- *
- * Returns: (transfer full): the built-in mail account #ESource
- *
- * Since: 3.6
- **/
-ESource *
-e_source_registry_ref_builtin_mail_account (ESourceRegistry *registry)
-{
-       ESource *source;
-       const gchar *uid;
-
-       g_return_val_if_fail (E_IS_SOURCE_REGISTRY (registry), NULL);
-
-       uid = E_SOURCE_BUILTIN_MAIL_ACCOUNT_UID;
-       source = e_source_registry_ref_source (registry, uid);
-       g_return_val_if_fail (source != NULL, NULL);
-
-       return source;
-}
-
-/**
  * e_source_registry_ref_default_mail_account:
  * @registry: an #ESourceRegistry
  *
@@ -3637,36 +3697,6 @@ e_source_registry_set_default_mail_identity (ESourceRegistry *registry,
 }
 
 /**
- * e_source_registry_ref_builtin_memo_list:
- * @registry: an #ESourceRegistry
- *
- * Returns the built-in memo list #ESource.
- *
- * This #ESource is always present and makes for a safe fallback.
- *
- * The returned #ESource is referenced for thread-safety and must be
- * unreferenced with g_object_unref() when finished with it.
- *
- * Returns: (transfer full): the built-in memo list #ESource
- *
- * Since: 3.6
- **/
-ESource *
-e_source_registry_ref_builtin_memo_list (ESourceRegistry *registry)
-{
-       ESource *source;
-       const gchar *uid;
-
-       g_return_val_if_fail (E_IS_SOURCE_REGISTRY (registry), NULL);
-
-       uid = E_SOURCE_BUILTIN_MEMO_LIST_UID;
-       source = e_source_registry_ref_source (registry, uid);
-       g_return_val_if_fail (source != NULL, NULL);
-
-       return source;
-}
-
-/**
  * e_source_registry_ref_default_memo_list:
  * @registry: an #ESourceRegistry
  *
@@ -3739,36 +3769,6 @@ e_source_registry_set_default_memo_list (ESourceRegistry *registry,
 }
 
 /**
- * e_source_registry_ref_builtin_task_list:
- * @registry: an #ESourceRegistry
- *
- * Returns the built-in task list #ESource.
- *
- * This #ESource is always present and makes for a safe fallback.
- *
- * The returned #ESource is referenced for thread-safety and must be
- * unreferenced with g_object_unref() when finished with it.
- *
- * Returns: (transfer full): the built-in task list #ESource
- *
- * Since: 3.6
- **/
-ESource *
-e_source_registry_ref_builtin_task_list (ESourceRegistry *registry)
-{
-       ESource *source;
-       const gchar *uid;
-
-       g_return_val_if_fail (E_IS_SOURCE_REGISTRY (registry), NULL);
-
-       uid = E_SOURCE_BUILTIN_TASK_LIST_UID;
-       source = e_source_registry_ref_source (registry, uid);
-       g_return_val_if_fail (source != NULL, NULL);
-
-       return source;
-}
-
-/**
  * e_source_registry_ref_default_task_list:
  * @registry: an #ESourceRegistry
  *
diff --git a/libedataserver/e-source-registry.h b/libedataserver/e-source-registry.h
index b6eefc9..0e58ce3 100644
--- a/libedataserver/e-source-registry.h
+++ b/libedataserver/e-source-registry.h
@@ -159,26 +159,33 @@ gchar *           e_source_registry_dup_unique_display_name
 void           e_source_registry_debug_dump    (ESourceRegistry *registry,
                                                 const gchar *extension_name);
 
+/* These built-in ESource objects are always available. */
+
+ESource *      e_source_registry_ref_builtin_address_book
+                                               (ESourceRegistry *registry);
+ESource *      e_source_registry_ref_builtin_calendar
+                                               (ESourceRegistry *registry);
+ESource *      e_source_registry_ref_builtin_mail_account
+                                               (ESourceRegistry *registry);
+ESource *      e_source_registry_ref_builtin_memo_list
+                                               (ESourceRegistry *registry);
+ESource *      e_source_registry_ref_builtin_task_list
+                                               (ESourceRegistry *registry);
+
 /* The following is a front-end for the "org.gnome.Evolution.DefaultSources"
  * GSettings schema, except that it gets and sets ESource objects instead of
  * ESource UID strings. */
 
-ESource *      e_source_registry_ref_builtin_address_book
-                                               (ESourceRegistry *registry);
 ESource *      e_source_registry_ref_default_address_book
                                                (ESourceRegistry *registry);
 void           e_source_registry_set_default_address_book
                                                (ESourceRegistry *registry,
                                                 ESource *default_source);
-ESource *      e_source_registry_ref_builtin_calendar
-                                               (ESourceRegistry *registry);
 ESource *      e_source_registry_ref_default_calendar
                                                (ESourceRegistry *registry);
 void           e_source_registry_set_default_calendar
                                                (ESourceRegistry *registry,
                                                 ESource *default_source);
-ESource *      e_source_registry_ref_builtin_mail_account
-                                               (ESourceRegistry *registry);
 ESource *      e_source_registry_ref_default_mail_account
                                                (ESourceRegistry *registry);
 void           e_source_registry_set_default_mail_account
@@ -189,15 +196,11 @@ ESource * e_source_registry_ref_default_mail_identity
 void           e_source_registry_set_default_mail_identity
                                                (ESourceRegistry *registry,
                                                 ESource *default_source);
-ESource *      e_source_registry_ref_builtin_memo_list
-                                               (ESourceRegistry *registry);
 ESource *      e_source_registry_ref_default_memo_list
                                                (ESourceRegistry *registry);
 void           e_source_registry_set_default_memo_list
                                                (ESourceRegistry *registry,
                                                 ESource *default_source);
-ESource *      e_source_registry_ref_builtin_task_list
-                                               (ESourceRegistry *registry);
 ESource *      e_source_registry_ref_default_task_list
                                                (ESourceRegistry *registry);
 void           e_source_registry_set_default_task_list


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