Libical API Documentation 4.0
Loading...
Searching...
No Matches
icaltypes.h
1/*======================================================================
2 FILE: icaltypes.h
3 CREATOR: eric 20 March 1999
4
5 SPDX-FileCopyrightText: 2000, Eric Busboom <eric@civicknowledge.com>
6
7 SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
8
9======================================================================*/
10
11#ifndef ICALTYPES_H
12#define ICALTYPES_H
13
14#include "libical_ical_export.h"
15#include "icalduration.h"
16#include "icalenums.h"
17#include "icalperiod.h"
18
19#include <stdbool.h>
20
22 struct icaltimetype time;
23 struct icalperiodtype period;
24};
25
26#define ICAL_GEO_LEN 16
28 char lat[ICAL_GEO_LEN];
29 char lon[ICAL_GEO_LEN];
30};
31
33 struct icaltimetype time;
34 struct icaldurationtype duration;
35};
36
37LIBICAL_ICAL_EXPORT struct icaltriggertype icaltriggertype_from_int(const int reltime);
38
39LIBICAL_ICAL_EXPORT struct icaltriggertype icaltriggertype_from_string(const char *str);
40
41LIBICAL_ICAL_EXPORT bool icaltriggertype_is_null_trigger(struct icaltriggertype tr);
42
43LIBICAL_ICAL_EXPORT bool icaltriggertype_is_bad_trigger(struct icaltriggertype tr);
44
45/* struct icalreqstattype. This struct contains two string pointers,
46but don't try to free either of them. The "desc" string is a pointer
47to a static table inside the library. Don't try to free it. The
48"debug" string is allocated in the ring buffer. Don't try to free it
49either.
50
51BTW, you would get that original string from
52*icalproperty_get_requeststatus() or icalvalue_get_text(), when
53operating on the value of a request_status property. */
54
56 icalrequeststatus code;
57 const char *desc;
58 const char *debug;
59};
60
61LIBICAL_ICAL_EXPORT struct icalreqstattype icalreqstattype_from_string(const char *str);
62
63LIBICAL_ICAL_EXPORT const char *icalreqstattype_as_string(struct icalreqstattype);
64
65LIBICAL_ICAL_EXPORT char *icalreqstattype_as_string_r(struct icalreqstattype);
66
67/* ical_unknown_token_handling :
68 * How should the ICAL library handle components, properties and parameters with
69 * unknown names?
70 * FIXME: Currently only affects parameters. Extend to components and properties.
71 */
72typedef enum ical_unknown_token_handling
73{
74 ICAL_ASSUME_IANA_TOKEN = 1,
75 ICAL_DISCARD_TOKEN = 2,
76 ICAL_TREAT_AS_ERROR = 3
77} ical_unknown_token_handling;
78
79LIBICAL_ICAL_EXPORT ical_unknown_token_handling ical_get_unknown_token_handling_setting(void);
80
81LIBICAL_ICAL_EXPORT void ical_set_unknown_token_handling_setting(
82 ical_unknown_token_handling newSetting);
83
84#endif /* !ICALTYPES_H */
Methods for working with durations in iCal.
Functions for working with iCal periods (of time).
Definition icaltypes.h:21
A struct representing a duration.
Definition icalduration.h:29
Definition icaltypes.h:27
Struct to represent a period in time.
Definition icalperiod.h:30
Definition icaltypes.h:55
Definition icaltime.h:98
Definition icaltypes.h:32