Diffstat (limited to 'libical/src/libical/icaltypes.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libical/src/libical/icaltypes.h | 138 |
1 files changed, 138 insertions, 0 deletions
diff --git a/libical/src/libical/icaltypes.h b/libical/src/libical/icaltypes.h new file mode 100644 index 0000000..d61b9f3 --- a/dev/null +++ b/libical/src/libical/icaltypes.h | |||
@@ -0,0 +1,138 @@ | |||
1 | /* -*- Mode: C -*- */ | ||
2 | /*====================================================================== | ||
3 | FILE: icaltypes.h | ||
4 | CREATOR: eric 20 March 1999 | ||
5 | |||
6 | |||
7 | (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org | ||
8 | |||
9 | This program is free software; you can redistribute it and/or modify | ||
10 | it under the terms of either: | ||
11 | |||
12 | The LGPL as published by the Free Software Foundation, version | ||
13 | 2.1, available at: http://www.fsf.org/copyleft/lesser.html | ||
14 | |||
15 | Or: | ||
16 | |||
17 | The Mozilla Public License Version 1.0. You may obtain a copy of | ||
18 | the License at http://www.mozilla.org/MPL/ | ||
19 | |||
20 | The original code is icaltypes.h | ||
21 | |||
22 | ======================================================================*/ | ||
23 | |||
24 | #ifndef ICALTYPES_H | ||
25 | #define ICALTYPES_H | ||
26 | |||
27 | #include <time.h> | ||
28 | #include "icalenums.h" | ||
29 | #include "icaltime.h" | ||
30 | #include "icalduration.h" | ||
31 | #include "icalperiod.h" | ||
32 | |||
33 | |||
34 | /* This type type should probably be an opaque type... */ | ||
35 | struct icalattachtype | ||
36 | { | ||
37 | void* binary; | ||
38 | int owns_binary; | ||
39 | |||
40 | char* base64; | ||
41 | int owns_base64; | ||
42 | |||
43 | char* url; | ||
44 | |||
45 | int refcount; | ||
46 | |||
47 | }; | ||
48 | |||
49 | /* converts base64 to binary, fetches url and stores as binary, or | ||
50 | just returns data */ | ||
51 | |||
52 | struct icalattachtype* icalattachtype_new(void); | ||
53 | void icalattachtype_add_reference(struct icalattachtype* v); | ||
54 | void icalattachtype_free(struct icalattachtype* v); | ||
55 | |||
56 | void icalattachtype_set_url(struct icalattachtype* v, char* url); | ||
57 | char* icalattachtype_get_url(struct icalattachtype* v); | ||
58 | |||
59 | void icalattachtype_set_base64(struct icalattachtype* v, char* base64, | ||
60 | int owns); | ||
61 | char* icalattachtype_get_base64(struct icalattachtype* v); | ||
62 | |||
63 | void icalattachtype_set_binary(struct icalattachtype* v, char* binary, | ||
64 | int owns); | ||
65 | void* icalattachtype_get_binary(struct icalattachtype* v); | ||
66 | |||
67 | struct icalgeotype | ||
68 | { | ||
69 | float lat; | ||
70 | float lon; | ||
71 | }; | ||
72 | |||
73 | |||
74 | struct icaldatetimeperiodtype | ||
75 | { | ||
76 | struct icaltimetype time; | ||
77 | struct icalperiodtype period; | ||
78 | }; | ||
79 | |||
80 | |||
81 | struct icaltriggertype | ||
82 | { | ||
83 | struct icaltimetype time; | ||
84 | struct icaldurationtype duration; | ||
85 | }; | ||
86 | |||
87 | struct icaltriggertype icaltriggertype_from_string(const char* str); | ||
88 | |||
89 | int icaltriggertype_is_null_trigger(struct icaltriggertype tr); | ||
90 | |||
91 | /* struct icalreqstattype. This struct contains two string pointers, | ||
92 | but don't try to free either of them. The "desc" string is a pointer | ||
93 | to a static table inside the library. Don't try to free it. The | ||
94 | "debug" string is a pointer into the string that the called passed | ||
95 | into to icalreqstattype_from_string. Don't try to free it either, and | ||
96 | don't use it after the original string has been freed. | ||
97 | |||
98 | BTW, you would get that original string from | ||
99 | *icalproperty_get_requeststatus() or icalvalue_get_text(), when | ||
100 | operating on a the value of a request_status property. */ | ||
101 | |||
102 | struct icalreqstattype { | ||
103 | |||
104 | icalrequeststatus code; | ||
105 | const char* desc; | ||
106 | const char* debug; | ||
107 | }; | ||
108 | |||
109 | struct icalreqstattype icalreqstattype_from_string(const char* str); | ||
110 | const char* icalreqstattype_as_string(struct icalreqstattype); | ||
111 | |||
112 | |||
113 | |||
114 | struct icaltimezonephase { | ||
115 | const char* tzname; | ||
116 | int is_stdandard; /* 1 = standard tme, 0 = daylight savings time */ | ||
117 | struct icaltimetype dtstart; | ||
118 | int offsetto; | ||
119 | int tzoffsetfrom; | ||
120 | const char* comment; | ||
121 | struct icaldatetimeperiodtype rdate; | ||
122 | const char* rrule; | ||
123 | }; | ||
124 | |||
125 | |||
126 | struct icaltimezonetype { | ||
127 | const char* tzid; | ||
128 | struct icaltimetype last_mod; | ||
129 | const char* tzurl; | ||
130 | |||
131 | /* Array of phases. The end of the array is a phase with tzname == 0 */ | ||
132 | struct icaltimezonephase *phases; | ||
133 | }; | ||
134 | |||
135 | void icaltimezonetype_free(struct icaltimezonetype tzt); | ||
136 | |||
137 | |||
138 | #endif /* !ICALTYPES_H */ | ||