Libical API Documentation 3.0
Loading...
Searching...
No Matches
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
45LIBICAL_ICAL_EXPORT struct icaltriggertype icaltriggertype_from_int(const int reltime);
46
47LIBICAL_ICAL_EXPORT struct icaltriggertype icaltriggertype_from_string(const char *str);
48
49LIBICAL_ICAL_EXPORT int icaltriggertype_is_null_trigger(struct icaltriggertype tr);
50
51LIBICAL_ICAL_EXPORT int icaltriggertype_is_bad_trigger(struct icaltriggertype tr);
52
53/* struct icalreqstattype. This struct contains two string pointers,
54but don't try to free either of them. The "desc" string is a pointer
55to a static table inside the library. Don't try to free it. The
56"debug" string is a pointer into the string that the called passed
57into to icalreqstattype_from_string. Don't try to free it either, and
58don't use it after the original string has been freed.
59
60BTW, you would get that original string from
61*icalproperty_get_requeststatus() or icalvalue_get_text(), when
62operating on the value of a request_status property. */
63
65{
66 icalrequeststatus code;
67 const char *desc;
68 const char *debug;
69};
70
71LIBICAL_ICAL_EXPORT struct icalreqstattype icalreqstattype_from_string(const char *str);
72
73LIBICAL_ICAL_EXPORT const char *icalreqstattype_as_string(struct icalreqstattype);
74
75LIBICAL_ICAL_EXPORT char *icalreqstattype_as_string_r(struct icalreqstattype);
76
78{
79 const char *tzname;
80 int is_stdandard; /* 1 = standard tme, 0 = daylight savings time */
81 struct icaltimetype dtstart;
82 int offsetto;
83 int tzoffsetfrom;
84 const char *comment;
86 const char *rrule;
87};
88
90{
91 const char *tzid;
92 struct icaltimetype last_mod;
93 const char *tzurl;
94
95 /* Array of phases. The end of the array is a phase with tzname == 0 */
96 struct icaltimezonephase *phases;
97};
98
99/* ical_unknown_token_handling :
100 * How should the ICAL library handle components, properties and parameters with
101 * unknown names?
102 * FIXME: Currently only affects parameters. Extend to components and properties.
103 */
104typedef enum ical_unknown_token_handling
105{
106 ICAL_ASSUME_IANA_TOKEN = 1,
107 ICAL_DISCARD_TOKEN = 2,
108 ICAL_TREAT_AS_ERROR = 3
109} ical_unknown_token_handling;
110
111LIBICAL_ICAL_EXPORT ical_unknown_token_handling ical_get_unknown_token_handling_setting(void);
112
113LIBICAL_ICAL_EXPORT void ical_set_unknown_token_handling_setting(
114 ical_unknown_token_handling newSetting);
115
116#endif /* !ICALTYPES_H */
Methods for working with durations in iCal.
Functions for working with iCal periods (of time).
Definition icaltypes.h:28
A struct representing a duration.
Definition icalduration.h:37
Definition icaltypes.h:34
Struct to represent a period in time.
Definition icalperiod.h:38
Definition icaltypes.h:65
Definition icaltime.h:105
Definition icaltypes.h:78
Definition icaltypes.h:90
Definition icaltypes.h:40
Definition icaltimezone.c:2221