Libical API Documentation  3.0
icalvalue.h
Go to the documentation of this file.
1 /*======================================================================
2  FILE: icalvalue.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 ICALVALUE_H
20 #define ICALVALUE_H
21 
22 #include "libical_ical_export.h"
23 #include "icalvalueimpl.h"
24 
27 #define ICAL_BOOLEAN_TRUE 1
28 #define ICAL_BOOLEAN_FALSE 0
29 
30 LIBICAL_ICAL_EXPORT icalvalue *icalvalue_new(icalvalue_kind kind);
31 
32 LIBICAL_ICAL_EXPORT icalvalue *icalvalue_new_clone(const icalvalue *value);
33 
34 LIBICAL_ICAL_EXPORT icalvalue *icalvalue_new_from_string(icalvalue_kind kind, const char *str);
35 
36 LIBICAL_ICAL_EXPORT void icalvalue_free(icalvalue *value);
37 
38 LIBICAL_ICAL_EXPORT int icalvalue_is_valid(const icalvalue *value);
39 
40 LIBICAL_ICAL_EXPORT const char *icalvalue_as_ical_string(const icalvalue *value);
41 
42 LIBICAL_ICAL_EXPORT char *icalvalue_as_ical_string_r(const icalvalue *value);
43 
44 LIBICAL_ICAL_EXPORT icalvalue_kind icalvalue_isa(const icalvalue *value);
45 
46 LIBICAL_ICAL_EXPORT int icalvalue_isa_value(void *);
47 
48 LIBICAL_ICAL_EXPORT icalparameter_xliccomparetype icalvalue_compare(const icalvalue *a,
49  const icalvalue *b);
50 
51 /* Special, non autogenerated value accessors */
52 
53 /* Defined in icalderivedvalue.h */
54 /* icalvalue* icalvalue_new_recur (struct icalrecurrencetype v); */
55 /* void icalvalue_set_recur(icalvalue* value, struct icalrecurrencetype v); */
56 /* struct icalrecurrencetype icalvalue_get_recur(const icalvalue* value); */
57 
58 /* icalvalue* icalvalue_new_trigger (struct icaltriggertype v); */
59 /* void icalvalue_set_trigger(icalvalue* value, struct icaltriggertype v); */
60 /* struct icaltriggertype icalvalue_get_trigger(const icalvalue* value); */
61 
62 /* icalvalue* icalvalue_new_datetimeperiod (struct icaldatetimeperiodtype v); */
63 /* void icalvalue_set_datetimeperiod(icalvalue* value, */
64 /* struct icaldatetimeperiodtype v); */
65 /* struct icaldatetimeperiodtype icalvalue_get_datetimeperiod(const icalvalue* value); */
66 
67 /* Convert enumerations */
68 
69 LIBICAL_ICAL_EXPORT icalvalue_kind icalvalue_string_to_kind(const char *str);
70 
71 LIBICAL_ICAL_EXPORT const char *icalvalue_kind_to_string(const icalvalue_kind kind);
72 
74 LIBICAL_ICAL_EXPORT int icalvalue_kind_is_valid(const icalvalue_kind kind);
75 
77 LIBICAL_ICAL_EXPORT int icalvalue_encode_ical_string(const char *szText,
78  char *szEncText, int MaxBufferLen);
79 
81 LIBICAL_ICAL_EXPORT int icalvalue_decode_ical_string(const char *szText,
82  char *szDecText, int nMaxBufferLen);
83 
84 /* For the library only -- do not make visible */
86 extern void print_date_to_string(char *str, const struct icaltimetype *data);
87 extern void print_datetime_to_string(char *str, const struct icaltimetype *data);
89 
90 #endif /*ICALVALUE_H */
int icalvalue_encode_ical_string(const char *szText, char *szEncText, int MaxBufferLen)
Definition: icalvalue.c:1483
int icalvalue_decode_ical_string(const char *szText, char *szDecText, int nMaxBufferLen)
Definition: icalvalue.c:1514
int icalvalue_kind_is_valid(const icalvalue_kind kind)
Definition: icaltime.h:105