aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/idl/evolution-calendar.idl
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@helixcode.com>2000-12-19 07:47:52 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2000-12-19 07:47:52 +0800
commit8d96fe16f15f653d0809603ccaecd677e5708d8d (patch)
tree56d1ccf4be7dcec8a7a09524f2d312ab1da004af /calendar/idl/evolution-calendar.idl
parenta1d12a819a73754b94eeaf558aefa91e77f169f3 (diff)
downloadgsoc2013-evolution-8d96fe16f15f653d0809603ccaecd677e5708d8d.tar
gsoc2013-evolution-8d96fe16f15f653d0809603ccaecd677e5708d8d.tar.gz
gsoc2013-evolution-8d96fe16f15f653d0809603ccaecd677e5708d8d.tar.bz2
gsoc2013-evolution-8d96fe16f15f653d0809603ccaecd677e5708d8d.tar.lz
gsoc2013-evolution-8d96fe16f15f653d0809603ccaecd677e5708d8d.tar.xz
gsoc2013-evolution-8d96fe16f15f653d0809603ccaecd677e5708d8d.tar.zst
gsoc2013-evolution-8d96fe16f15f653d0809603ccaecd677e5708d8d.zip
Alarm instance generation support for the Wombat.
2000-12-18 Federico Mena Quintero <federico@helixcode.com> Alarm instance generation support for the Wombat. * idl/evolution-calendar.idl (Cal::CalAlarmInstance): Changed to have an alarm UID, the trigger time, and the actual occurrence time. (Cal::CalComponentAlarms): New structure to hold a pair of a component and its alarms that trigger in a particular range of time. (Cal::getAlarmsInRange): Changed to return a CalComponentAlarmsSeq. * cal-util/cal-component.h (CalAlarmInstance): New C-side structure to match the one on the IDL. (CalComponentAlarms): Ditto. (CalAlarmAction): Renamed from CalComponentAlarmAction. (CalAlarmTriggerType): Renamed from CalComponentAlarmTriggerType. Encoded the START and END parameters for the RELATED parameter in this enum, too. Added a NONE value for invalid or missing trigger specifications. (CalComponentAlarmTriggerRelated): Removed. (CalAlarmTrigger): Renamed from CalComponentAlarmTrigger. Renamed the duration/time fields to rel_duration/abs_time, respectively. * cal-util/cal-component.c (cal_component_alarm_get_trigger): Changed to use the new trigger structure. (cal_component_alarm_set_trigger): Likewise. (cal_component_alarm_free_trigger): Removed function. (cal_component_has_alarms): Count the elements in the alarm_uid_hash instead of trying to fetch the first alarm subcomponent. (cal_component_alarms_free): New function to free a CalComponentAlarms structure. (CalComponentAlarmPrivate): Added an uid property pointer. (scan_alarm_property): Scan for the our extension UID property. (cal_component_alarm_get_uid): New function. * pcs/cal-backend.h (CalBackendClass): Changed the signatures of the ::get_alarms_in_range() and ::get_alarms_for_object() methods. * pcs/cal-backend.c (cal_backend_get_alarms_in_range): Changed signature; use the new method. (cal_backend_get_alarms_for_object): Likewise. * pcs/cal-backend-file.c (compute_alarm_range): New spiffy function to compute a range of time for alarm occurrences. (add_alarm_occurrences_cb): New function to add alarms for a particular occurrence of the component. (generate_absolute_triggers): New function to add the absolute alarm triggers. (generate_alarms_for_comp): New function to generate all the alarm instances for a component. (cal_backend_file_get_alarms_in_range): Implemented. * pcs/cal.c (Cal_get_alarms_in_range): Use the new CalBackend API. (Cal_get_alarms_for_object): Likewise. (build_alarm_instance_seq): Removed old function. * cal-util/cal-util.c (cal_alarm_instance_list_free): Removed function. * cal-client/cal-client.c (build_component_alarms_list): New function to demarshal the component alarms sequence. (build_alarm_instance_list): New function to demarshal the alarm instances sequence. (cal_client_get_alarms_in_range): Updated for the new API. (cal_client_get_alarms_for_object): Updated for the new API. * gui/gnome-cal.c: Temporary #ifdef-ing out of alarm-related stuff to make it build. svn path=/trunk/; revision=7076
Diffstat (limited to 'calendar/idl/evolution-calendar.idl')
-rw-r--r--calendar/idl/evolution-calendar.idl64
1 files changed, 38 insertions, 26 deletions
diff --git a/calendar/idl/evolution-calendar.idl b/calendar/idl/evolution-calendar.idl
index bee377c76a..3e64e07888 100644
--- a/calendar/idl/evolution-calendar.idl
+++ b/calendar/idl/evolution-calendar.idl
@@ -16,17 +16,20 @@ module GNOME {
module Evolution {
module Calendar {
- /* A calendar object (event/todo/journal/etc), represented as an
+ /* A calendar component (event/todo/journal/etc), represented as an
* iCalendar string.
*/
typedef string CalObj;
- /* An unique identifier for a calendar object */
+ /* A unique identifier for a calendar component */
typedef string CalObjUID;
/* Sequence of unique identifiers */
typedef sequence<CalObjUID> CalObjUIDSeq;
+ /* A unique identifier for an alarm subcomponent */
+ typedef string CalAlarmUID;
+
/* Flags for getting UID sequences */
typedef long CalObjType;
const CalObjType TYPE_EVENT = 1 << 0;
@@ -51,11 +54,11 @@ module Calendar {
/* Used to store a time_t */
typedef unsigned long Time_t;
- /* An instance of a calendar object that actually occurs. These are
+ /* An instance of a calendar component that actually occurs. These are
* "virtual" objects in that they are used to represent instances of
* recurring events and alarms. "Real" objects just contain the
* information required to figure out the times at which they recur or
- * trigger.
+ * trigger.
*/
struct CalObjInstance {
CalObjUID uid;
@@ -63,6 +66,7 @@ module Calendar {
Time_t end;
};
+ /* Used to transfer a list of component occurrences */
typedef sequence<CalObjInstance> CalObjInstanceSeq;
/* An object change */
@@ -71,18 +75,28 @@ module Calendar {
CalObjChangeType type;
};
+ /* Used to transfer a list of changed components */
typedef sequence<CalObjChange> CalObjChangeSeq;
/* An alarm trigger instance */
struct CalAlarmInstance {
- CalObjUID uid;
- AlarmType type;
+ CalAlarmUID auid;
Time_t trigger;
Time_t occur;
};
+ /* Used to represent a list of alarm triggers for a single component */
typedef sequence<CalAlarmInstance> CalAlarmInstanceSeq;
+ /* Alarms for a component */
+ struct CalComponentAlarms {
+ CalObj calobj;
+ CalAlarmInstanceSeq alarms;
+ };
+
+ /* Used to represent a list of components plus their triggers */
+ typedef sequence<CalComponentAlarms> CalComponentAlarmsSeq;
+
interface Listener;
/* Calendar client interface */
@@ -94,48 +108,46 @@ module Calendar {
/* A calendar is identified by its URI */
readonly attribute string uri;
- /* Gets the number of objects of the specified types */
+ /* Gets the number of components of the specified types */
long countObjects (in CalObjType type);
- /* Gets an object based on its URI */
+ /* Gets a component based on its URI */
CalObj getObject (in CalObjUID uid)
raises (NotFound);
- /* Gets a list of UIDs based on object type */
+ /* Gets a list of UIDs based on component type */
CalObjUIDSeq getUIds (in CalObjType type);
- /* Gets a list of objects that changed based on object type */
+ /* Gets a list of components that changed based on object type */
CalObjChangeSeq getChanges (in CalObjType type, in string change_id);
- /* Gets a list of objects that occur or recur in the specified time range */
+ /* Gets a list of components that occur or recur in the specified time range */
CalObjUIDSeq getObjectsInRange (in CalObjType type,
in Time_t start, in Time_t end)
raises (InvalidRange);
- /*
- * Gets the objects whose alarms trigger in the specified time
- * range.
+ /* Gets a list of the components that have alarms that trigger
+ * in the specified range of time, and the trigger/occurrence
+ * structures themselves.
*/
- CalAlarmInstanceSeq getAlarmsInRange (in Time_t start, in Time_t end)
+ CalComponentAlarmsSeq getAlarmsInRange (in Time_t start, in Time_t end)
raises (InvalidRange);
- /*
- * Gets the alarms for the specified object that trigger in the
- * specified time range.
+ /* Gets the alarms for the specified component that trigger in
+ * the specified time range.
*/
- CalAlarmInstanceSeq getAlarmsForObject (in CalObjUID uid,
- in Time_t start, in Time_t end)
+ CalComponentAlarms getAlarmsForObject (in CalObjUID uid,
+ in Time_t start, in Time_t end)
raises (NotFound, InvalidRange);
- /*
- * Updates an object by adding it if it does not exist or by
- * changing an existing one.
+ /* Updates a component by adding it if it does not exist or by
+ * changing an existing one.
*/
void updateObject (in CalObjUID uid, in CalObj calobj)
raises (InvalidObject);
- /* Removes an object */
+ /* Removes a component */
void removeObject (in CalObjUID uid)
raises (NotFound);
};
@@ -157,10 +169,10 @@ module Calendar {
*/
void notifyCalLoaded (in LoadStatus status, in Cal cal);
- /* Called from a Calendar when an object is added or changed */
+ /* Called from a Calendar when a component is added or changed */
void notifyObjUpdated (in CalObjUID uid);
- /* Called from a Calendar when an object is removed */
+ /* Called from a Calendar when a component is removed */
void notifyObjRemoved (in CalObjUID uid);
};