CAL_COMPONENT_TYPE #define CAL_COMPONENT_TYPE (cal_component_get_type ()) CAL_COMPONENT #define CAL_COMPONENT(obj) (GTK_CHECK_CAST ((obj), CAL_COMPONENT_TYPE, CalComponent)) CAL_COMPONENT_CLASS #define CAL_COMPONENT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), CAL_COMPONENT_TYPE, \ CalComponentClass)) IS_CAL_COMPONENT #define IS_CAL_COMPONENT(obj) (GTK_CHECK_TYPE ((obj), CAL_COMPONENT_TYPE)) IS_CAL_COMPONENT_CLASS #define IS_CAL_COMPONENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), CAL_COMPONENT_TYPE)) CalComponentVType typedef enum { CAL_COMPONENT_NO_TYPE, CAL_COMPONENT_EVENT, CAL_COMPONENT_TODO, CAL_COMPONENT_JOURNAL, CAL_COMPONENT_FREEBUSY, CAL_COMPONENT_TIMEZONE } CalComponentVType; CalComponentField typedef enum { CAL_COMPONENT_FIELD_CATEGORIES, /* concatenation of the categories list */ CAL_COMPONENT_FIELD_CLASSIFICATION, CAL_COMPONENT_FIELD_COMPLETED, CAL_COMPONENT_FIELD_DTEND, CAL_COMPONENT_FIELD_DTSTART, CAL_COMPONENT_FIELD_DUE, CAL_COMPONENT_FIELD_GEO, CAL_COMPONENT_FIELD_PERCENT, CAL_COMPONENT_FIELD_PRIORITY, CAL_COMPONENT_FIELD_SUMMARY, CAL_COMPONENT_FIELD_TRANSPARENCY, CAL_COMPONENT_FIELD_URL, CAL_COMPONENT_FIELD_HAS_ALARMS, /* not a real field */ CAL_COMPONENT_FIELD_ICON, /* not a real field */ CAL_COMPONENT_FIELD_COMPLETE, /* not a real field */ CAL_COMPONENT_FIELD_RECURRING, /* not a real field */ CAL_COMPONENT_FIELD_OVERDUE, /* not a real field */ CAL_COMPONENT_FIELD_COLOR, /* not a real field */ CAL_COMPONENT_FIELD_NUM_FIELDS } CalComponentField; CalComponentClassification typedef enum { CAL_COMPONENT_CLASS_NONE, CAL_COMPONENT_CLASS_PUBLIC, CAL_COMPONENT_CLASS_PRIVATE, CAL_COMPONENT_CLASS_CONFIDENTIAL, CAL_COMPONENT_CLASS_UNKNOWN } CalComponentClassification; CalComponentDateTime typedef struct { /* Actual date/time value */ struct icaltimetype *value; /* Timezone ID */ const char *tzid; } CalComponentDateTime; CalComponentPeriodType typedef enum { CAL_COMPONENT_PERIOD_DATETIME, CAL_COMPONENT_PERIOD_DURATION } CalComponentPeriodType; CalComponentPeriod typedef struct { CalComponentPeriodType type; struct icaltimetype start; union { struct icaltimetype end; struct icaldurationtype duration; } u; } CalComponentPeriod; CalComponentText typedef struct { /* Description string */ const char *value; /* Alternate representation URI */ const char *altrep; } CalComponentText; CalComponentTransparency typedef enum { CAL_COMPONENT_TRANSP_NONE, CAL_COMPONENT_TRANSP_TRANSPARENT, CAL_COMPONENT_TRANSP_OPAQUE, CAL_COMPONENT_TRANSP_UNKNOWN } CalComponentTransparency; CalComponentAlarm CalComponent CalComponentClass CalComponentPrivate CalComponent struct CalComponent { GtkObject object; /* Private data */ CalComponentPrivate *priv; }; cal_component_get_type GtkType void cal_component_gen_uid char * void cal_component_new CalComponent * void cal_component_clone CalComponent * CalComponent *comp cal_component_set_new_vtype void CalComponent *comp, CalComponentVType type cal_component_set_icalcomponent gboolean CalComponent *comp, icalcomponent *icalcomp cal_component_get_icalcomponent icalcomponent * CalComponent *comp cal_component_get_vtype CalComponentVType CalComponent *comp cal_component_get_as_string char * CalComponent *comp cal_component_commit_sequence void CalComponent *comp cal_component_get_uid void CalComponent *comp, const char **uid cal_component_set_uid void CalComponent *comp, const char *uid cal_component_get_categories_list void CalComponent *comp, GSList **categ_list cal_component_set_categories_list void CalComponent *comp, GSList *categ_list cal_component_get_classification void CalComponent *comp, CalComponentClassification *classif cal_component_set_classification void CalComponent *comp, CalComponentClassification classif cal_component_get_comment_list void CalComponent *comp, GSList **text_list cal_component_set_comment_list void CalComponent *comp, GSList *text_list cal_component_get_completed void CalComponent *comp, struct icaltimetype **t cal_component_set_completed void CalComponent *comp, struct icaltimetype *t cal_component_get_created void CalComponent *comp, struct icaltimetype **t cal_component_set_created void CalComponent *comp, struct icaltimetype *t cal_component_get_description_list void CalComponent *comp, GSList **text_list cal_component_set_description_list void CalComponent *comp, GSList *text_list cal_component_get_dtend void CalComponent *comp, CalComponentDateTime *dt cal_component_set_dtend void CalComponent *comp, CalComponentDateTime *dt cal_component_get_dtstamp void CalComponent *comp, struct icaltimetype *t cal_component_set_dtstamp void CalComponent *comp, struct icaltimetype *t cal_component_get_dtstart void CalComponent *comp, CalComponentDateTime *dt cal_component_set_dtstart void CalComponent *comp, CalComponentDateTime *dt cal_component_get_due void CalComponent *comp, CalComponentDateTime *dt cal_component_set_due void CalComponent *comp, CalComponentDateTime *dt cal_component_get_exdate_list void CalComponent *comp, GSList **exdate_list cal_component_set_exdate_list void CalComponent *comp, GSList *exdate_list cal_component_get_exrule_list void CalComponent *comp, GSList **recur_list cal_component_set_exrule_list void CalComponent *comp, GSList *recur_list cal_component_get_geo void CalComponent *comp, struct icalgeotype **geo cal_component_set_geo void CalComponent *comp, struct icalgeotype *geo cal_component_get_last_modified void CalComponent *comp, struct icaltimetype **t cal_component_set_last_modified void CalComponent *comp, struct icaltimetype *t cal_component_get_percent void CalComponent *comp, int **percent cal_component_set_percent void CalComponent *comp, int *percent cal_component_get_priority void CalComponent *comp, int **priority cal_component_set_priority void CalComponent *comp, int *priority cal_component_get_rdate_list void CalComponent *comp, GSList **period_list cal_component_set_rdate_list void CalComponent *comp, GSList *period_list cal_component_has_rdates gboolean CalComponent *comp cal_component_get_rrule_list void CalComponent *comp, GSList **recur_list cal_component_set_rrule_list void CalComponent *comp, GSList *recur_list cal_component_has_rrules gboolean CalComponent *comp cal_component_get_sequence void CalComponent *comp, int **sequence cal_component_set_sequence void CalComponent *comp, int *sequence cal_component_get_summary void CalComponent *comp, CalComponentText *summary cal_component_set_summary void CalComponent *comp, CalComponentText *summary cal_component_get_transparency void CalComponent *comp, CalComponentTransparency *transp cal_component_set_transparency void CalComponent *comp, CalComponentTransparency transp cal_component_get_url void CalComponent *comp, const char **url cal_component_set_url void CalComponent *comp, const char *url cal_component_get_pilot_id void CalComponent *comp, unsigned long *pilot_id cal_component_set_pilot_id void CalComponent *comp, unsigned long pilot_id cal_component_get_pilot_status void CalComponent *comp, unsigned long *pilot_status cal_component_set_pilot_status void CalComponent *comp, unsigned long pilot_status cal_component_free_categories_list void GSList *categ_list cal_component_free_datetime void CalComponentDateTime *dt cal_component_free_exdate_list void GSList *exdate_list cal_component_free_geo void struct icalgeotype *geo cal_component_free_icaltimetype void struct icaltimetype *t cal_component_free_percent void int *percent cal_component_free_priority void int *priority cal_component_free_period_list void GSList *period_list cal_component_free_recur_list void GSList *recur_list cal_component_free_sequence void int *sequence cal_component_free_text_list void GSList *text_list CalComponentAlarmAction typedef enum { CAL_COMPONENT_ALARM_NONE, CAL_COMPONENT_ALARM_AUDIO, CAL_COMPONENT_ALARM_DISPLAY, CAL_COMPONENT_ALARM_EMAIL, CAL_COMPONENT_ALARM_PROCEDURE, CAL_COMPONENT_ALARM_UNKNOWN } CalComponentAlarmAction; CalComponentAlarmTriggerType typedef enum { CAL_COMPONENT_ALARM_TRIGGER_RELATIVE, CAL_COMPONENT_ALARM_TRIGGER_ABSOLUTE } CalComponentAlarmTriggerType; CalComponentAlarmTriggerRelated typedef enum { CAL_COMPONENT_ALARM_TRIGGER_RELATED_START, CAL_COMPONENT_ALARM_TRIGGER_RELATED_END } CalComponentAlarmTriggerRelated; CalComponentAlarmTrigger typedef struct { CalComponentAlarmTriggerType type; union { struct { struct icaldurationtype duration; CalComponentAlarmTriggerRelated related; } relative; struct icaltimetype absolute; } u; } CalComponentAlarmTrigger; cal_component_get_first_alarm CalComponentAlarm * CalComponent *comp cal_component_get_next_alarm CalComponentAlarm * CalComponent *comp cal_component_alarm_free void CalComponentAlarm *alarm cal_component_alarm_get_action void CalComponentAlarm *alarm, CalComponentAlarmAction *action cal_component_alarm_set_action void CalComponentAlarm *alarm, CalComponentAlarmAction action cal_component_alarm_get_trigger void CalComponentAlarm *alarm, CalComponentAlarmTrigger **trigger cal_component_alarm_set_trigger void CalComponentAlarm *alarm, CalComponentAlarmTrigger *trigger cal_component_alarm_free_trigger void CalComponentAlarmTrigger *trigger CalRecurType typedef enum { CAL_RECUR_YEARLY, CAL_RECUR_MONTHLY, CAL_RECUR_WEEKLY, CAL_RECUR_DAILY, CAL_RECUR_HOURLY, CAL_RECUR_MINUTELY, CAL_RECUR_SECONDLY } CalRecurType; CalRecurrence typedef struct { CalRecurType type; int interval; /* Specifies the end of the recurrence. No occurrences are generated after this date. If it is 0, the event recurs forever. */ time_t enddate; /* WKST property - the week start day: 0 = Monday to 6 = Sunday. */ gint week_start_day; /* NOTE: I've used GList's here, but it doesn't matter if we use other data structures like arrays. The code should be easy to change. So long as it is easy to see if the modifier is set. */ /* For BYMONTH modifier. A list of GINT_TO_POINTERs, 0-11. */ GList *bymonth; /* For BYWEEKNO modifier. A list of GINT_TO_POINTERs, [+-]1-53. */ GList *byweekno; /* For BYYEARDAY modifier. A list of GINT_TO_POINTERs, [+-]1-366. */ GList *byyearday; /* For BYMONTHDAY modifier. A list of GINT_TO_POINTERs, [+-]1-31. */ GList *bymonthday; /* For BYDAY modifier. A list of GINT_TO_POINTERs, in pairs. The first of each pair is the weekday, 0 = Monday to 6 = Sunday. The second of each pair is the week number [+-]0-53. */ GList *byday; /* For BYHOUR modifier. A list of GINT_TO_POINTERs, 0-23. */ GList *byhour; /* For BYMINUTE modifier. A list of GINT_TO_POINTERs, 0-59. */ GList *byminute; /* For BYSECOND modifier. A list of GINT_TO_POINTERs, 0-60. */ GList *bysecond; /* For BYSETPOS modifier. A list of GINT_TO_POINTERs, +ve or -ve. */ GList *bysetpos; } CalRecurrence; CalObjTime CalObjTime struct CalObjTime { guint16 year; guint8 month; /* 0 - 11 */ guint8 day; /* 1 - 31 */ guint8 hour; /* 0 - 23 */ guint8 minute; /* 0 - 59 */ guint8 second; /* 0 - 59 (maybe 60 for leap second) */ }; CalRecurInstanceFn gboolean CalComponent *comp, time_t instance_start, time_t instace_end, gpointer data cal_recur_generate_instances void CalComponent *comp,time_t start,time_t end,CalRecurInstanceFn cb,gpointer cb_data cal_recur_from_icalrecurrencetype CalRecurrence * struct icalrecurrencetype *ir cal_recur_free void CalRecurrence *r CalObjInstance typedef struct { char *uid; /* UID of the object */ time_t start; /* Start time of instance */ time_t end; /* End time of instance */ } CalObjInstance; cal_obj_instance_list_free void GList *list CalAlarmInstance typedef struct { char *uid; /* UID of object */ #if 0 enum AlarmType type; /* Type of alarm */ #endif time_t trigger; /* Alarm trigger time */ time_t occur; /* Occurrence time */ } CalAlarmInstance; cal_alarm_instance_list_free void GList *list CalObjType typedef enum { CALOBJ_TYPE_EVENT = 1 << 0, CALOBJ_TYPE_TODO = 1 << 1, CALOBJ_TYPE_JOURNAL = 1 << 2, CALOBJ_TYPE_ANY = 0x07 } CalObjType; cal_obj_uid_list_free void GList *list time_from_icaltimetype time_t struct icaltimetype itt time_from_isodate time_t char *str time_from_start_duration time_t time_t start, char *duration isodate_from_time_t char * time_t t get_time_t_hour int time_t t isodiff_to_secs int char *str isodiff_from_secs char * int secs time_add_minutes time_t time_t time, int minutes time_add_day time_t time_t time, int days time_add_week time_t time_t time, int weeks time_add_month time_t time_t time, int months time_add_year time_t time_t time, int years format_simple_hour char * int hour, int use_am_pm time_days_in_month int int year, int month time_from_day time_t int year, int month, int day time_day_hour time_t time_t t, int hour time_year_begin time_t time_t t time_year_end time_t time_t t time_month_begin time_t time_t t time_month_end time_t time_t t time_week_begin time_t time_t t time_week_end time_t time_t t time_day_begin time_t time_t t time_day_end time_t time_t t parse_date time_t char *str print_time_t void time_t t