Libical API Documentation  2.99
icaltypes.h
1 /*======================================================================
2  FILE: icaltypes.h
3  CREATOR: eric 20 March 1999
4 
5  (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org>
6  http://www.softwarestudio.org
7 
8  This library is free software; you can redistribute it and/or modify
9  it under the terms of either:
10 
11  The LGPL as published by the Free Software Foundation, version
12  2.1, available at: http://www.gnu.org/licenses/lgpl-2.1.html
13 
14  Or:
15 
16  The Mozilla Public License Version 2.0. You may obtain a copy of
17  the License at http://www.mozilla.org/MPL/
18 ======================================================================*/
19 
20 #ifndef ICALTYPES_H
21 #define ICALTYPES_H
22 
23 #include "libical_ical_export.h"
24 #include "icalduration.h"
25 #include "icalenums.h"
26 #include "icalperiod.h"
27 
29 {
30  struct icaltimetype time;
31  struct icalperiodtype period;
32 };
33 
35 {
36  double lat;
37  double lon;
38 };
39 
41 {
42  struct icaltimetype time;
43  struct icaldurationtype duration;
44 };
45 
46 LIBICAL_ICAL_EXPORT struct icaltriggertype icaltriggertype_from_int(const int reltime);
47 
48 LIBICAL_ICAL_EXPORT struct icaltriggertype icaltriggertype_from_string(const char *str);
49 
50 LIBICAL_ICAL_EXPORT int icaltriggertype_is_null_trigger(struct icaltriggertype tr);
51 
52 LIBICAL_ICAL_EXPORT int icaltriggertype_is_bad_trigger(struct icaltriggertype tr);
53 
54 /* struct icalreqstattype. This struct contains two string pointers,
55 but don't try to free either of them. The "desc" string is a pointer
56 to a static table inside the library. Don't try to free it. The
57 "debug" string is a pointer into the string that the called passed
58 into to icalreqstattype_from_string. Don't try to free it either, and
59 don't use it after the original string has been freed.
60 
61 BTW, you would get that original string from
62 *icalproperty_get_requeststatus() or icalvalue_get_text(), when
63 operating on the value of a request_status property. */
64 
66 {
67  icalrequeststatus code;
68  const char *desc;
69  const char *debug;
70 };
71 
72 LIBICAL_ICAL_EXPORT struct icalreqstattype icalreqstattype_from_string(const char *str);
73 
74 LIBICAL_ICAL_EXPORT const char *icalreqstattype_as_string(struct icalreqstattype);
75 
76 LIBICAL_ICAL_EXPORT char *icalreqstattype_as_string_r(struct icalreqstattype);
77 
79 {
80  const char *tzname;
81  int is_stdandard; /* 1 = standard tme, 0 = daylight savings time */
82  struct icaltimetype dtstart;
83  int offsetto;
84  int tzoffsetfrom;
85  const char *comment;
86  struct icaldatetimeperiodtype rdate;
87  const char *rrule;
88 };
89 
91 {
92  const char *tzid;
93  struct icaltimetype last_mod;
94  const char *tzurl;
95 
96  /* Array of phases. The end of the array is a phase with tzname == 0 */
97  struct icaltimezonephase *phases;
98 };
99 
100 /* ical_unknown_token_handling :
101  * How should the ICAL library handle components, properties and parameters with
102  * unknown names?
103  * FIXME: Currently only affects parameters. Extend to components and properties.
104  */
105 typedef enum ical_unknown_token_handling
106 {
107  ICAL_ASSUME_IANA_TOKEN = 1,
108  ICAL_DISCARD_TOKEN = 2,
109  ICAL_TREAT_AS_ERROR = 3
110 } ical_unknown_token_handling;
111 
112 LIBICAL_ICAL_EXPORT ical_unknown_token_handling ical_get_unknown_token_handling_setting(void);
113 
114 LIBICAL_ICAL_EXPORT void ical_set_unknown_token_handling_setting(
115  ical_unknown_token_handling newSetting);
116 
117 #endif /* !ICALTYPES_H */
Methods for working with durations in iCal.
Struct to represent a period in time.
Definition: icalperiod.h:38
Definition: icaltypes.h:34
Definition: icaltypes.h:28
Definition: icaltypes.h:65
A struct representing a duration.
Definition: icalduration.h:37
Definition: icaltypes.h:40
Definition: icaltime.h:105
Functions for working with iCal periods (of time).
Definition: icaltypes.h:78
Definition: icaltypes.h:90