[gnome-todo] manager: add functions to get internal lists



commit b55afebe9f8f7cb8e4bcf7adb9f7d4fcae55198d
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Thu Jun 25 00:45:56 2015 -0300

    manager: add functions to get internal lists

 src/gtd-manager.c |   34 ++++++++++++++++++++++++++++++++++
 src/gtd-manager.h |    5 +++++
 2 files changed, 39 insertions(+), 0 deletions(-)
---
diff --git a/src/gtd-manager.c b/src/gtd-manager.c
index 04ea45c..08b6867 100644
--- a/src/gtd-manager.c
+++ b/src/gtd-manager.c
@@ -1557,3 +1557,37 @@ gtd_manager_set_is_first_run (GtdManager *manager,
                           "first-run",
                           is_first_run);
 }
+
+/**
+ * gtd_manager_get_scheduled_list:
+ * @manager: a #GtdManager
+ *
+ * Retrieves the internal #GtdTaskList that holds scheduled tasks.
+ *
+ * Returns: (transfer none): the internal #GtdTaskList with scheduled
+ * tasks
+ */
+GtdTaskList*
+gtd_manager_get_scheduled_list (GtdManager *manager)
+{
+  g_return_val_if_fail (GTD_IS_MANAGER (manager), NULL);
+
+  return manager->priv->scheduled_tasks_list;
+}
+
+/**
+ * gtd_manager_get_today_list:
+ * @manager: a #GtdManager
+ *
+ * Retrieves the internal #GtdTaskList that holds tasks for today.
+ *
+ * Returns: (transfer none): the internal #GtdTaskList with today's
+ * tasks
+ */
+GtdTaskList*
+gtd_manager_get_today_list (GtdManager *manager)
+{
+  g_return_val_if_fail (GTD_IS_MANAGER (manager), NULL);
+
+  return manager->priv->today_tasks_list;
+}
diff --git a/src/gtd-manager.h b/src/gtd-manager.h
index 70ab3d5..1587b3e 100644
--- a/src/gtd-manager.h
+++ b/src/gtd-manager.h
@@ -57,6 +57,11 @@ void                    gtd_manager_remove_task           (GtdManager
 void                    gtd_manager_update_task           (GtdManager           *manager,
                                                            GtdTask              *task);
 
+/* Special lists */
+GtdTaskList*            gtd_manager_get_scheduled_list    (GtdManager           *manager);
+
+GtdTaskList*            gtd_manager_get_today_list        (GtdManager           *manager);
+
 /* Online accounts */
 GoaClient*              gtd_manager_get_goa_client        (GtdManager           *manager);
 


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