/* * Internal representation of a Calendar object. This is modeled after the * iCalendar/vCalendar specificiation * * Authors: Miguel de Icaza (miguel@gnu.org) * Federico Mena (quartic@gimp.org). */ #ifndef CALOBJ_H #define CALOBJ_H #include #include "versit/vcc.h" BEGIN_GNOME_DECLS enum AlarmType { ALARM_MAIL, ALARM_PROGRAM, ALARM_DISPLAY, ALARM_AUDIO }; enum AlarmUnit { ALARM_MINUTES, ALARM_HOURS, ALARM_DAYS }; typedef struct { enum AlarmType type; int enabled; int count; enum AlarmUnit units; char *data; /* Does not get saved, internally used */ time_t offset; time_t trigger; int snooze_secs; int snooze_repeat; /* Widgets */ void *w_count; /* A GtkEntry */ void *w_enabled; /* A GtkChecButton */ void *w_timesel; /* A GtkMenu */ void *w_entry; /* A GnomeEntryFile/GtkEntry for PROGRAM/MAIL */ void *w_label; } CalendarAlarm; /* Calendar object type */ typedef enum { ICAL_EVENT, ICAL_TODO, ICAL_JOURNAL, ICAL_FBREQUEST, ICAL_FBREPLY, ICAL_BUSYTIME, ICAL_TIMEZONE } iCalType; /* For keys that might contain binary or text/binary */ typedef struct { char *data; int len; } iCalValue; typedef struct { int valid; /* true if the Geography was specified */ double latitude; double longitude; } iCalGeo; typedef enum { ICAL_OPAQUE, ICAL_TRANSPARENT } iCalTransp; typedef char NotYet; enum RecurType { RECUR_DAILY, RECUR_WEEKLY, RECUR_MONTHLY_BY_POS, RECUR_MONTHLY_BY_DAY, RECUR_YEARLY_BY_MONTH, RECUR_YEARLY_BY_DAY, }; #define DAY_LASTDAY 10000 typedef struct { enum RecurType type; int interval; /* Used for recur computation */ time_t enddate; /* If the value is zero, it is an infinite event * otherwise, it is either the _enddate value (if * this is what got specified) or it is our computed * ending date (computed from the duration item). */ int weekday; union { int month_pos; int month_day; } u; int duration; time_t _enddate; /* As found on the vCalendar file */ int __count; } Recurrence; #define IS_INFINITE(r) (r->duration == 0) /* Flags to indicate what has changed in an object */ typedef enum { CHANGE_NEW = 1 << 0, /* new object */ CHANGE_SUMMARY = 1 << 1, /* summary */ CHANGE_DATES = 1 << 2, /* dtstart / dtend */ CHANGE_ALL = CHANGE_SUMMARY | CHANGE_DATES } CalObjectChange; /* * This describes an iCalendar object, note that we never store durations, instead we * always compute the end time computed from the start + duration. */ typedef struct { iCalType type; GList *attach; /* type: one or more URIs or binary data */ GList *attendee; /* type: CAL-ADDRESS */ GList *categories; /* type: one or more TEXT */ char *class; char *comment; /* we collapse one or more TEXTs into one */ time_t completed; time_t created; GList *contact; /* type: one or more TEXT */ time_t dtstamp; time_t dtstart; time_t dtend; GList *exdate; /* type: one or more time_t's */ GList *exrule; /* type: one or more RECUR */ iCalGeo geo; time_t last_mod; char *location; char *organizer; int percent; int priority; char *rstatus; /* request status for freebusy */ GList *related; /* type: one or more TEXT */ GList *resources; /* type: one or more TEXT */ GList *rdate; /* type: one or more recurrence date */ GList *rrule; /* type: one or more recurrence rules */ int seq; char *status; char *summary; iCalTransp transp; char *uid; char *url; time_t recurid; CalendarAlarm dalarm; CalendarAlarm aalarm; CalendarAlarm palarm; CalendarAlarm malarm; Recurrence *recur; int new; void *user_data; /* Generic data pointer */ } iCalObject; /* The callback for the recurrence generator */ typedef int (*calendarfn) (iCalObject *, time_t, time_t, void *); iCalObject *ical_new (char *comment, char *organizer, char *summary); iCalObject *ical_object_new (void); void ical_object_destroy (iCalObject *ico); iCalObject *ical_object_create_from_vobject (VObject *obj, const char *object_name); VObject *ical_object_to_vobject (iCalObject *ical); iCalObject *ical_object_duplicate (iCalObject *o); void ical_foreach (GList *events, calendarfn fn, void *closure); void ical_object_generate_events (iCalObject *ico, time_t start, time_t end, calendarfn cb, void *closure); void ical_object_add_exdate (iCalObject *o, time_t t); /* Computes the enddate field of the recurrence based on the duration */ void ical_object_compute_end (iCalObject *ico); /* Returns the first toggled day in a weekday mask -- we do this because we do not support multiple * days on a monthly-by-pos recurrence. If no days are toggled, it returns -1. */ int ical_object_get_first_weekday (int weekday_mask); /* Returns the number of seconds configured to trigger the alarm in advance to an event */ int alarm_compute_offset (CalendarAlarm *a); END_GNOME_DECLS #endif * Updated Turkish translationBaris Cicek2006-08-281-4801/+6390 * removed outdated strings and run "mak update-po".Tomasz Kłoczko2005-09-111-215/+222 * Updated Turkish TranslationBaris Cicek2005-09-031-2460/+3084 * added all the new gal widgets & a couple of other missing files. re-sortedNot Zed2005-06-211-5916/+7308 * Updated Turkish TranslationBaris Cicek2005-03-121-6265/+4859 * Fixed typoBaris Cicek2004-12-061-1/+1 * Updated Turkish TranslationBaris Cicek2004-09-031-15896/+3285 * bump version. requiresJP Rosevear2004-08-141-385/+507 * bump version, requirementsJP Rosevear2004-08-031-601/+709 * bump version, requirementsJP Rosevear2004-07-201-301/+334 * bump version, requirementsJP Rosevear2004-07-051-3490/+4169 * Merge from release branch.JP Rosevear2004-06-041-1891/+1849 * bump versionJP Rosevear2004-05-201-3122/+3871 * distedJeffrey Stedfast2004-04-301-1978/+2695 * Merge from release branchJP Rosevear2004-04-201-803/+827 * bump version, requirementsJP Rosevear2004-04-031-2265/+2728 * bump version, requirementsJP Rosevear2004-03-061-1533/+1679 * bump version, libtool numbersJP Rosevear2004-02-101-1234/+1362 * bump requirements, versionJP Rosevear2004-01-271-1361/+1578 * remove duplicate msgid'sJP Rosevear2004-01-241-11/+1 * CVS_SILENTGörkem Çetin2004-01-241-16/+21 * bump version and requirementsJP Rosevear2004-01-131-1433/+2025 * bump version and gal, e-d-s and gtkhtml requirementsJP Rosevear2003-12-301-49/+60 * Some modifications...Görkem Çetin2003-12-291-787/+544 * intltool-update *Görkem Çetin2003-12-291-1482/+1658 * update version relianceJP Rosevear2003-12-081-2274/+3541 * updateJP Rosevear2003-11-071-1269/+1066 * remove dead fileJP Rosevear2003-10-311-14391/+12298 * 1.4.1 release.Ettore Perazzoli2003-06-261-397/+441 * UpdatedFatih Demir2003-06-241-263/+196 * Updated tr.poFatih Demir2003-06-191-72/+56 * Updated tr.po by GorkemFatih Demir2003-06-161-671/+517 * 1.4.0!Ettore Perazzoli2003-06-031-321/+320 * Sync 1.3.92.Ettore Perazzoli2003-05-231-3/+3 * 1.3.91.Ettore Perazzoli2003-05-221-943/+1007 * 1.3.3.Ettore Perazzoli2003-04-301-803/+924 * The return of 1.3.2.Ettore Perazzoli2003-04-121-205/+205 * Sync for 1.3.2.Ettore Perazzoli2003-04-101-5353/+6001 * Take overFatih Demir2003-01-281-1620/+1530 * Sync for 1.1.90.Ettore Perazzoli2002-10-291-1019/+1087 * Sync for 1.1.2.Ettore Perazzoli2002-10-081-8870/+20483 * Updatix..Fatih Demir2002-09-111-20309/+8878 * Sync for 1.1.1.Ettore Perazzoli2002-09-101-1166/+1272 * Update po files to speed up snap build.JP Rosevear2002-08-131-1754/+2228 * CVS_SILENTGörkem Çetin2002-07-241-2123/+1516 * Update .po files.JP Rosevear2002-06-281-3604/+4309 * Update the po files to cut down on dist timeJP Rosevear2002-05-081-3133/+4538 * Small changes...Fatih Demir2002-04-291-2265/+2265 * UpdateFatih Demir2002-02-211-4751/+15443 * Corrected charset.Fatih Demir2001-12-271-1/+3 * Sync for 0.99.2.Ettore Perazzoli2001-11-151-339/+356 * 0.99.0.Ettore Perazzoli2001-11-061-266/+277 * Syncing up for the 0.16.100 internal release.Ettore Perazzoli2001-11-011-2416/+2886 * 0.16.Ettore Perazzoli2001-10-101-715/+825 * 0.15.Ettore Perazzoli2001-10-021-957/+1156 * Sync for 0.14.Ettore Perazzoli2001-09-221-1946/+2718 * Fixed translation files.Kwok-Koon Cheung2001-09-121-1/+1 * Sync for 0.13.Ettore Perazzoli2001-08-231-2286/+4350 * Sync for the release.Ettore Perazzoli2001-08-011-2847/+4264 * Updated Turkish translation.Fatih Demir2001-07-071-3198/+5069 * Updated tr.poFatih Demir2001-04-241-611/+830 * Updated tr.poFatih Demir2001-04-111-492/+619 * Updated Turkish translationFatih Demir2001-04-041-1334/+1419 * UpdateFatih Demir2001-03-261-1182/+1187 * Small updateFatih Demir2001-03-181-793/+756 * Added Azeri language filePablo Saratxaga2001-03-151-739/+771 * Hmm, fixesFatih Demir2001-03-091-10/+10 * Updated tr.poFatih Demir2001-03-091-2280/+2825 * Getting almost full and proper use of xml-i18n-tools.Gediminas Paulauskas2001-02-111-0/+28 * Stable->HEAd commitFatih Demir2001-02-101-2030/+4690 * Updated tr.po from Goerkem CetinFatih Demir2001-02-081-4335/+2199 * Removed addressbook/gui/widgets/test-minicard-view.c,Dave Camp2001-01-181-3220/+2515 * Updated Norwegian (bokmål) translation.Kjartan Maraas2001-01-091-1672/+2334 * I like monkeys - FedericoFederico Mena Quintero2000-12-141-1778/+5613 * Updated the Turkish translation.Fatih Demir2000-08-051-216/+227 * Updated the Turkish translation.Fatih Demir2000-07-27