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.
This commit is contained in:
Erick Pérez Castellanos
2015-01-20 13:12:01 -05:00
parent 0f13cb4a11
commit 03b108ff71
2 changed files with 24 additions and 0 deletions
+19
View File
@@ -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);
}
+5
View File
@@ -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__ */