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