[gnome-calendar/new-year-view] GcalView: add get_children by uuid method



commit bf153b59f86853f27e074a5c9af5b68742423d1e
Author: Erick Pérez Castellanos <erick red gmail com>
Date:   Tue Jan 20 01:09:57 2015 -0500

    GcalView: add get_children by uuid method
    
    After adding it and removing it, and adding it again. I think this time
    is for good. We're keeping GcalView interface as parent of every view
    shown in the application.

 src/gcal-view.c |   19 +++++++++++++++++++
 src/gcal-view.h |    5 +++++
 2 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-view.c b/src/gcal-view.c
index 989da23..c0202ea 100644
--- a/src/gcal-view.c
+++ b/src/gcal-view.c
@@ -193,3 +193,22 @@ gcal_view_get_right_header (GcalView *view)
 
   return GCAL_VIEW_GET_INTERFACE (view)->get_right_header (view);
 }
+
+/**
+ * gcal_view_get_children_by_uuid:
+ * @view: a #GcalView
+ * @uuid: The unique id of an event
+ *
+ * Returns a list with every event that has the passed uuid
+ *
+ * Returns: (transfer full): a { link GList} instance
+ **/
+GList*
+gcal_view_get_children_by_uuid (GcalView    *view,
+                                const gchar *uuid)
+{
+  g_return_val_if_fail (GCAL_IS_VIEW (view), NULL);
+  g_return_val_if_fail (GCAL_VIEW_GET_INTERFACE (view)->get_children_by_uuid, NULL);
+
+  return GCAL_VIEW_GET_INTERFACE (view)->get_children_by_uuid (view, uuid);
+}
diff --git a/src/gcal-view.h b/src/gcal-view.h
index 0922db8..e28a8ad 100644
--- a/src/gcal-view.h
+++ b/src/gcal-view.h
@@ -58,6 +58,8 @@ struct _GcalViewIface
   /* Update NavBar headings */
   gchar*          (*get_left_header)                    (GcalView     *view);
   gchar*          (*get_right_header)                   (GcalView     *view);
+
+  GList*          (*get_children_by_uuid)               (GcalView     *view, const gchar *uuid);
 };
 
 GType         gcal_view_get_type                      (void);
@@ -78,6 +80,9 @@ gchar*        gcal_view_get_left_header               (GcalView     *view);
 
 gchar*        gcal_view_get_right_header              (GcalView     *view);
 
+GList*        gcal_view_get_children_by_uuid          (GcalView     *view,
+                                                       const gchar  *uuid);
+
 G_END_DECLS
 
 #endif /* __GCAL_MONTH_VIEW_H__ */


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