Libical API Documentation  3.0
icalvalue.h
1 /*======================================================================
2  FILE: icalvalue.h
3  CREATOR: eric 20 March 1999
4 
5  (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org>
6  http://www.softwarestudio.org
7 
8  This library is free software; you can redistribute it and/or modify
9  it under the terms of either:
10 
11  The LGPL as published by the Free Software Foundation, version
12  2.1, available at: http://www.gnu.org/licenses/lgpl-2.1.html
13 
14  Or:
15 
16  The Mozilla Public License Version 2.0. You may obtain a copy of
17  the License at http://www.mozilla.org/MPL/
18  ======================================================================*/
19 
20 #ifndef ICALVALUE_H
21 #define ICALVALUE_H
22 
23 #include "libical_ical_export.h"
24 #include "icalvalueimpl.h"
25 
26 #define ICAL_BOOLEAN_TRUE 1
27 #define ICAL_BOOLEAN_FALSE 0
28 
29 LIBICAL_ICAL_EXPORT icalvalue *icalvalue_new(icalvalue_kind kind);
30 
31 LIBICAL_ICAL_EXPORT icalvalue *icalvalue_new_clone(const icalvalue *value);
32 
33 LIBICAL_ICAL_EXPORT icalvalue *icalvalue_new_from_string(icalvalue_kind kind, const char *str);
34 
35 LIBICAL_ICAL_EXPORT void icalvalue_free(icalvalue *value);
36 
37 LIBICAL_ICAL_EXPORT int icalvalue_is_valid(const icalvalue *value);
38 
39 LIBICAL_ICAL_EXPORT const char *icalvalue_as_ical_string(const icalvalue *value);
40 
41 LIBICAL_ICAL_EXPORT char *icalvalue_as_ical_string_r(const icalvalue *value);
42 
43 LIBICAL_ICAL_EXPORT icalvalue_kind icalvalue_isa(const icalvalue *value);
44 
45 LIBICAL_ICAL_EXPORT int icalvalue_isa_value(void *);
46 
47 LIBICAL_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 
68 LIBICAL_ICAL_EXPORT icalvalue_kind icalvalue_string_to_kind(const char *str);
69 
70 LIBICAL_ICAL_EXPORT const char *icalvalue_kind_to_string(const icalvalue_kind kind);
71 
73 LIBICAL_ICAL_EXPORT int icalvalue_kind_is_valid(const icalvalue_kind kind);
74 
76 LIBICAL_ICAL_EXPORT int icalvalue_encode_ical_string(const char *szText,
77  char *szEncText, int MaxBufferLen);
78 
80 LIBICAL_ICAL_EXPORT int icalvalue_decode_ical_string(const char *szText,
81  char *szDecText, int nMaxBufferLen);
82 
83 /* For the library only -- do not make visible */
84 extern void print_date_to_string(char *str, const struct icaltimetype *data);
85 extern void print_datetime_to_string(char *str, const struct icaltimetype *data);
86 
87 #endif /*ICALVALUE_H */
Definition: icaltime.h:105