diff options
Diffstat (limited to 'calendar/gui/comp-util.c')
-rw-r--r-- | calendar/gui/comp-util.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/calendar/gui/comp-util.c b/calendar/gui/comp-util.c index e1aacc7c9e..392f991a84 100644 --- a/calendar/gui/comp-util.c +++ b/calendar/gui/comp-util.c @@ -248,6 +248,29 @@ cal_comp_is_on_server (ECalComponent *comp, ECal *client) } /** + * is_icalcomp_on_the_server: + * same as @cal_comp_is_on_server, only the component parameter is icalcomponent, not the ECalComponent. + **/ +gboolean +is_icalcomp_on_the_server (icalcomponent *icalcomp, ECal *client) +{ + gboolean on_server; + ECalComponent *comp; + + if (!icalcomp || !client || !icalcomponent_get_uid (icalcomp)) + return FALSE; + + comp = e_cal_component_new (); + e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (icalcomp)); + + on_server = cal_comp_is_on_server (comp, client); + + g_object_unref (comp); + + return on_server; +} + +/** * cal_comp_event_new_with_defaults: * * Creates a new VEVENT component and adds any default alarms to it as set in |