2 /*======================================================================
4 CREATOR: eric 20 March 1999
7 (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org>
8 http://www.softwarestudio.org
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of either:
13 The LGPL as published by the Free Software Foundation, version
14 2.1, available at: http://www.fsf.org/copyleft/lesser.html
18 The Mozilla Public License Version 1.0. You may obtain a copy of
19 the License at http://www.mozilla.org/MPL/
21 The original code is icaltypes.h
23 ======================================================================*/
29 #include "icalenums.h"
31 #include "icalduration.h"
32 #include "icalperiod.h"
42 struct icaldatetimeperiodtype
44 struct icaltimetype time;
45 struct icalperiodtype period;
49 struct icaltriggertype
51 struct icaltimetype time;
52 struct icaldurationtype duration;
55 struct icaltriggertype icaltriggertype_from_int(const int reltime);
56 struct icaltriggertype icaltriggertype_from_string(const char* str);
58 int icaltriggertype_is_null_trigger(struct icaltriggertype tr);
59 int icaltriggertype_is_bad_trigger(struct icaltriggertype tr);
61 /* struct icalreqstattype. This struct contains two string pointers,
62 but don't try to free either of them. The "desc" string is a pointer
63 to a static table inside the library. Don't try to free it. The
64 "debug" string is a pointer into the string that the called passed
65 into to icalreqstattype_from_string. Don't try to free it either, and
66 don't use it after the original string has been freed.
68 BTW, you would get that original string from
69 *icalproperty_get_requeststatus() or icalvalue_get_text(), when
70 operating on the value of a request_status property. */
72 struct icalreqstattype {
74 icalrequeststatus code;
79 struct icalreqstattype icalreqstattype_from_string(const char* str);
80 const char* icalreqstattype_as_string(struct icalreqstattype);
81 char* icalreqstattype_as_string_r(struct icalreqstattype);
85 struct icaltimezonephase {
87 int is_stdandard; /* 1 = standard tme, 0 = daylight savings time */
88 struct icaltimetype dtstart;
92 struct icaldatetimeperiodtype rdate;
97 struct icaltimezonetype {
99 struct icaltimetype last_mod;
102 /* Array of phases. The end of the array is a phase with tzname == 0 */
103 struct icaltimezonephase *phases;
106 void icaltimezonetype_free(struct icaltimezonetype tzt);
108 /* ical_unknown_token_handling :
109 * How should the ICAL library handle components, properties and parameters with
111 * FIXME: Currently only affects parameters. Extend to components and properties.
113 typedef enum ical_unknown_token_handling {
114 ICAL_ASSUME_IANA_TOKEN = 1,
115 ICAL_DISCARD_TOKEN = 2,
116 ICAL_TREAT_AS_ERROR = 3
117 } ical_unknown_token_handling;
119 ical_unknown_token_handling ical_get_unknown_token_handling_setting(void);
120 void ical_set_unknown_token_handling_setting(ical_unknown_token_handling newSetting);
122 #endif /* !ICALTYPES_H */