diff options
author | Federico Mena Quintero <federico@helixcode.com> | 2000-05-12 12:16:46 +0800 |
---|---|---|
committer | Federico Mena Quintero <federico@src.gnome.org> | 2000-05-12 12:16:46 +0800 |
commit | 47c9fef15abc15c678e4cde60ee71d741dfe23bf (patch) | |
tree | 347e2e2ccc386409e254b6f25c4c94f98a9efafe /calendar/pcs/cal-backend.c | |
parent | d55e9e0406875ffb47f40f57da3c6abaac90734a (diff) | |
download | gsoc2013-evolution-47c9fef15abc15c678e4cde60ee71d741dfe23bf.tar gsoc2013-evolution-47c9fef15abc15c678e4cde60ee71d741dfe23bf.tar.gz gsoc2013-evolution-47c9fef15abc15c678e4cde60ee71d741dfe23bf.tar.bz2 gsoc2013-evolution-47c9fef15abc15c678e4cde60ee71d741dfe23bf.tar.lz gsoc2013-evolution-47c9fef15abc15c678e4cde60ee71d741dfe23bf.tar.xz gsoc2013-evolution-47c9fef15abc15c678e4cde60ee71d741dfe23bf.tar.zst gsoc2013-evolution-47c9fef15abc15c678e4cde60ee71d741dfe23bf.zip |
New function to add today's alarms for a single object.
2000-05-11 Federico Mena Quintero <federico@helixcode.com>
* gui/gnome-cal.c (add_alarms_for_object): New function to add
today's alarms for a single object.
(gnome_calendar_object_updated_cb): Update the object's alarms.
* idl/evolution-calendar.idl (Cal): Added a
get_alarms_for_object() method.
* pcs/cal.c (Cal_get_alarms_for_object): Implemented method.
* pcs/cal-backend.c (cal_backend_get_alarms_for_object): New
function.
* pcs/cal-backend-imc.c (cal_backend_imc_get_alarms_for_object):
Implemented.
* cal-client/cal-client.c (cal_client_get_alarms_for_object): New
function.
svn path=/trunk/; revision=3003
Diffstat (limited to 'calendar/pcs/cal-backend.c')
-rw-r--r-- | calendar/pcs/cal-backend.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/calendar/pcs/cal-backend.c b/calendar/pcs/cal-backend.c index e9c18d6f86..15cfb1e7bc 100644 --- a/calendar/pcs/cal-backend.c +++ b/calendar/pcs/cal-backend.c @@ -267,6 +267,35 @@ cal_backend_get_alarms_in_range (CalBackend *backend, time_t start, time_t end) } /** + * cal_backend_get_alarms_for_object: + * @backend: A calendar backend. + * @uid: Unique identifier for a calendar object. + * @start: Start time for query. + * @end: End time for query. + * @alarms: Return value for the list of alarm instances. + * + * Builds a sorted list of the alarms of the specified event that trigger in a + * particular time range. + * + * Return value: TRUE on success, FALSE if the object was not found. + **/ +gboolean +cal_backend_get_alarms_for_object (CalBackend *backend, const char *uid, + time_t start, time_t end, + GList **alarms) +{ + g_return_val_if_fail (backend != NULL, FALSE); + g_return_val_if_fail (IS_CAL_BACKEND (backend), FALSE); + g_return_val_if_fail (uid != NULL, FALSE); + g_return_val_if_fail (start != -1 && end != -1, FALSE); + g_return_val_if_fail (start <= end, FALSE); + g_return_val_if_fail (alarms != NULL, FALSE); + + g_assert (CLASS (backend)->get_alarms_for_object != NULL); + return (* CLASS (backend)->get_alarms_for_object) (backend, uid, start, end, alarms); +} + +/** * cal_backend_update_object: * @backend: A calendar backend. * @uid: Unique identifier of the object to update. |