[gnome-calendar/calendar-editor] manager: implemented GcalManager::get_source method
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/calendar-editor] manager: implemented GcalManager::get_source method
- Date: Tue, 10 Feb 2015 13:46:10 +0000 (UTC)
commit 65604eef7dc027c76e2e53a62b7a408c16a9f433
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Feb 10 11:46:01 2015 -0200
manager: implemented GcalManager::get_source method
src/gcal-manager.c | 20 ++++++++++++++++++++
src/gcal-manager.h | 3 +++
2 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-manager.c b/src/gcal-manager.c
index 35ae6f7..b687720 100644
--- a/src/gcal-manager.c
+++ b/src/gcal-manager.c
@@ -735,6 +735,26 @@ gcal_manager_new_with_settings (GSettings *settings)
}
/**
+ * gcal_manager_get_source:
+ * @manager:
+ *
+ * Retrieve a source according to it's UID. The source
+ * is referenced for thread-safety and must be unreferenced
+ * after user.
+ *
+ * Returns: (Transfer full) an { link ESource}, or NULL.
+ **/
+ESource*
+gcal_manager_get_source (GcalManager *manager,
+ const gchar *uid)
+{
+ GcalManagerPrivate *priv;
+ priv = gcal_manager_get_instance_private (manager);
+
+ return e_source_registry_ref_source (priv->source_registry, uid);
+}
+
+/**
* gcal_manager_get_sources:
* @manager:
*
diff --git a/src/gcal-manager.h b/src/gcal-manager.h
index ff1995d..6b1bf77 100644
--- a/src/gcal-manager.h
+++ b/src/gcal-manager.h
@@ -63,6 +63,9 @@ GType gcal_manager_get_type (void);
GcalManager* gcal_manager_new_with_settings (GSettings *settings);
+ESource* gcal_manager_get_source (GcalManager *manager,
+ const gchar *uid);
+
GList* gcal_manager_get_sources (GcalManager *manager);
GList* gcal_manager_get_sources_connected (GcalManager *manager);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]