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