[gnome-calendar] manager: implemented GcalManager::get_source method
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] manager: implemented GcalManager::get_source method
- Date: Mon, 25 May 2015 16:49:46 +0000 (UTC)
commit e5a2361274bc13ac29b07d121aa5032171573c9e
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 08979b8..e44e5b5 100644
--- a/src/gcal-manager.c
+++ b/src/gcal-manager.c
@@ -856,6 +856,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]