/* * 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 "../libversit/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 ?h=gstreamer0.10-removal'>logtreecommitdiffstats
path: root/net
Commit message (Expand)AuthorAgeFilesLines
* - Update devel/protobuf to 3.1.0sunpoet2016-12-153-1/+3
* Fix building when libressl is not the default.mat2016-12-151-2/+4
* More USE_GITHUB cleanup.mat2016-12-151-14/+4
* - Update to 0.8.8amdmi32016-12-142-5/+8
* - Update to 0.10.5amdmi32016-12-132-3/+4
* - Update to 1.0amdmi32016-12-133-22/+56
* - Update WWW: pear.php.net uses https://sunpoet2016-12-1339-39/+39
* Convert a few ports to GH_TUPLE.mat2016-12-131-73/+27
* - Update WWW: pecl.php.net uses https://sunpoet2016-12-139-9/+9
* Update to 1.3.8rc1jhale2016-12-132-6/+4
* Correct MASTER_SITES.demon2016-12-131-1/+1
* Correct cut&paste error, add missing dot.cy2016-12-131-1/+1
* Flag ntp and ntp-devel ignore if libressl is installed due to md5cy2016-12-132-0/+8
* - Update to 0.22sunpoet2016-12-133-5/+6
* Update net/nats-streaming-server to version 0.3.4.olgeni2016-12-132-4/+4
* - Update WWW: rubygems.org uses https://sunpoet2016-12-122-2/+2
* multimedia/ffmpeg: update to 3.2.2jbeich2016-12-1110-8/+10
* net/ntpa: update 0.7.4 -> 0.7.6pi2016-12-113-16/+19
* Those ports build fine with bsd makeantoine2016-12-112-2/+2
* Add py-ceilometerclient 2.7.0, openStack Telemetry API Client Library.novel2016-12-114-0/+42
* Add py-heatclient 1.6.1, openStack Orchestration API Client Library.novel2016-12-114-0/+45
* Add py-designateclient 2.3.0, openStack DNS-as-a-Service - Client.novel2016-12-114-0/+41
* net/freerdp: Fix X11_CMAKE_ON typo and logic error introduced in r428330woodsb022016-12-111-2/+2
* net/freerdp1: Implement port improvements made to net/freerdp in r428330woodsb022016-12-1111-87/+77
* net/freerdp1: Fix issue with X11_USE=xorg= being truncatedwoodsb022016-12-111-2/+1
* net/freerdp: Update to 2.0.0 pre-release (GitHub as of 2016.11.24)woodsb022016-12-1136-359/+1211
* Update asterisk13 to 13.13.1madpilot2016-12-112-5/+4
* Update asterisk11 to 11.25.1madpilot2016-12-112-4/+4
* remmina* build fine with bsd makeantoine2016-12-112-2/+2
* net/yate: Fix SSL optionbrnrd2016-12-111-1/+2
* net/tn5250: Fix build without SSLv2/3brnrd2016-12-112-2/+25
* Update to 20140814ehaupt2016-12-102-4/+5
* net/syncthing: update to 0.14.13swills2016-12-102-4/+4
* net/py-ldap: update to 2.4.28rm2016-12-102-4/+4
* net/py-pysmb: update to 1.1.19rm2016-12-102-3/+4
* net/py-ldap3: update to 2.1.1rm2016-12-102-4/+4
* Update net/xmlrpc-c to 1.39.11garga2016-12-092-4/+4
* Remove nonexistent -t option from call to netstat(1) [1]jhale2016-12-094-53/+63
* - Update to 5.17.0sunpoet2016-12-092-4/+4
* - Add rubygem-qiniu 6.8.0sunpoet2016-12-094-0/+31
* Update devel/cmake* to 3.7.1 [1]tcberner2016-12-092-1/+2
* Update to 1.6.5olivierd2016-12-092-4/+4
* Bluemix CLI provides a unified way for you to interact with youravilla2016-12-095-0/+63
* Remove libintl.so.9 compatibility link that was added in r374303 totijl2016-12-09