Libical API Documentation 4.0
Loading...
Searching...
No Matches
icalvalue.h
Go to the documentation of this file.
1/*======================================================================
2 FILE: icalvalue.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 ICALVALUE_H
12#define ICALVALUE_H
13
14#include "libical_ical_export.h"
15#include "icalvalueimpl.h"
16
17#include <stdbool.h>
18
20
21#define ICAL_BOOLEAN_TRUE 1
22#define ICAL_BOOLEAN_FALSE 0
23
24LIBICAL_ICAL_EXPORT icalvalue *icalvalue_new(icalvalue_kind kind);
25
31LIBICAL_ICAL_EXPORT icalvalue *icalvalue_clone(const icalvalue *value);
32
33LIBICAL_ICAL_EXPORT icalvalue *icalvalue_new_from_string(icalvalue_kind kind, const char *str);
34
35LIBICAL_ICAL_EXPORT void icalvalue_free(icalvalue *value);
36
37LIBICAL_ICAL_EXPORT bool icalvalue_is_valid(const icalvalue *value);
38
39LIBICAL_ICAL_EXPORT const char *icalvalue_as_ical_string(const icalvalue *value);
40
41LIBICAL_ICAL_EXPORT char *icalvalue_as_ical_string_r(const icalvalue *value);
42
43LIBICAL_ICAL_EXPORT icalvalue_kind icalvalue_isa(const icalvalue *value);
44
45LIBICAL_ICAL_EXPORT bool icalvalue_isa_value(void *);
46
47LIBICAL_ICAL_EXPORT icalparameter_xliccomparetype icalvalue_compare(const icalvalue *a,
48 const icalvalue *b);
49
50/* Special, non autogenerated value accessors */
51
52/* Defined in icalderivedvalue.h */
53/* icalvalue* icalvalue_new_recur (struct icalrecurrencetype *v); */
54/* void icalvalue_set_recur(icalvalue* value, struct icalrecurrencetype *v); */
55/* struct icalrecurrencetype *icalvalue_get_recur(const icalvalue* value); */
56
57/* icalvalue* icalvalue_new_trigger (struct icaltriggertype v); */
58/* void icalvalue_set_trigger(icalvalue* value, struct icaltriggertype v); */
59/* struct icaltriggertype icalvalue_get_trigger(const icalvalue* value); */
60
61/* icalvalue* icalvalue_new_datetimeperiod (struct icaldatetimeperiodtype v); */
62/* void icalvalue_set_datetimeperiod(icalvalue* value, */
63/* struct icaldatetimeperiodtype v); */
64/* struct icaldatetimeperiodtype icalvalue_get_datetimeperiod(const icalvalue* value); */
65
66/* Convert enumerations */
67
68LIBICAL_ICAL_EXPORT icalvalue_kind icalvalue_string_to_kind(const char *str);
69
70LIBICAL_ICAL_EXPORT const char *icalvalue_kind_to_string(const icalvalue_kind kind);
71
73LIBICAL_ICAL_EXPORT bool icalvalue_kind_is_valid(const icalvalue_kind kind);
74
76LIBICAL_ICAL_EXPORT bool icalvalue_encode_ical_string(const char *szText,
77 char *szEncText, int MaxBufferLen);
78
80LIBICAL_ICAL_EXPORT bool icalvalue_decode_ical_string(const char *szText,
81 char *szDecText, int nMaxBufferLen);
82
83/* For the library only -- do not make visible */
85extern void print_date_to_string(char *str, const struct icaltimetype *data);
86extern void print_datetime_to_string(char *str, const struct icaltimetype *data);
88
89#endif /*ICALVALUE_H */
bool icalvalue_encode_ical_string(const char *szText, char *szEncText, int MaxBufferLen)
Definition icalvalue.c:1501
bool icalvalue_decode_ical_string(const char *szText, char *szDecText, int nMaxBufferLen)
Definition icalvalue.c:1532
icalvalue * icalvalue_clone(const icalvalue *value)
Deeply clones an icalvalue.
Definition icalvalue.c:57
bool icalvalue_kind_is_valid(const icalvalue_kind kind)
Definition icaltime.h:98