Libical API Documentation  3.0
icalenums.h
1 /*======================================================================
2  FILE: icalenums.h
3 
4  (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org>
5  http://www.softwarestudio.org
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: http://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 http://www.mozilla.org/MPL/
17 
18  Contributions from:
19  Graham Davison <g.m.davison@computer.org>
20 ======================================================================*/
21 
22 #ifndef ICALENUMS_H
23 #define ICALENUMS_H
24 
25 #include "libical_ical_export.h"
26 
27 /***********************************************************************
28  * Component enumerations
29 **********************************************************************/
30 
31 typedef enum icalcomponent_kind
32 {
33  ICAL_NO_COMPONENT,
34  ICAL_ANY_COMPONENT, /* Used to select all components */
35  ICAL_XROOT_COMPONENT,
36  ICAL_XATTACH_COMPONENT, /* MIME attached data, returned by parser. */
37  ICAL_VEVENT_COMPONENT,
38  ICAL_VTODO_COMPONENT,
39  ICAL_VJOURNAL_COMPONENT,
40  ICAL_VCALENDAR_COMPONENT,
41  ICAL_VAGENDA_COMPONENT,
42  ICAL_VFREEBUSY_COMPONENT,
43  ICAL_VALARM_COMPONENT,
44  ICAL_XAUDIOALARM_COMPONENT,
45  ICAL_XDISPLAYALARM_COMPONENT,
46  ICAL_XEMAILALARM_COMPONENT,
47  ICAL_XPROCEDUREALARM_COMPONENT,
48  ICAL_VTIMEZONE_COMPONENT,
49  ICAL_XSTANDARD_COMPONENT,
50  ICAL_XDAYLIGHT_COMPONENT,
51  ICAL_X_COMPONENT,
52  ICAL_VSCHEDULE_COMPONENT,
53  ICAL_VQUERY_COMPONENT,
54  ICAL_VREPLY_COMPONENT,
55  ICAL_VCAR_COMPONENT,
56  ICAL_VCOMMAND_COMPONENT,
57  ICAL_XLICINVALID_COMPONENT,
58  ICAL_XLICMIMEPART_COMPONENT, /* a non-stardard component that mirrors
59  structure of MIME data */
60  ICAL_VAVAILABILITY_COMPONENT,
61  ICAL_XAVAILABLE_COMPONENT,
62  ICAL_VPOLL_COMPONENT,
63  ICAL_VVOTER_COMPONENT,
64  ICAL_XVOTE_COMPONENT,
65  ICAL_VPATCH_COMPONENT,
66  ICAL_XPATCH_COMPONENT
67 } icalcomponent_kind;
68 
69 /***********************************************************************
70  * Request Status codes
71  **********************************************************************/
72 
73 typedef enum icalrequeststatus
74 {
75  ICAL_UNKNOWN_STATUS,
76  ICAL_2_0_SUCCESS_STATUS,
77  ICAL_2_1_FALLBACK_STATUS,
78  ICAL_2_2_IGPROP_STATUS,
79  ICAL_2_3_IGPARAM_STATUS,
80  ICAL_2_4_IGXPROP_STATUS,
81  ICAL_2_5_IGXPARAM_STATUS,
82  ICAL_2_6_IGCOMP_STATUS,
83  ICAL_2_7_FORWARD_STATUS,
84  ICAL_2_8_ONEEVENT_STATUS,
85  ICAL_2_9_TRUNC_STATUS,
86  ICAL_2_10_ONETODO_STATUS,
87  ICAL_2_11_TRUNCRRULE_STATUS,
88  ICAL_3_0_INVPROPNAME_STATUS,
89  ICAL_3_1_INVPROPVAL_STATUS,
90  ICAL_3_2_INVPARAM_STATUS,
91  ICAL_3_3_INVPARAMVAL_STATUS,
92  ICAL_3_4_INVCOMP_STATUS,
93  ICAL_3_5_INVTIME_STATUS,
94  ICAL_3_6_INVRULE_STATUS,
95  ICAL_3_7_INVCU_STATUS,
96  ICAL_3_8_NOAUTH_STATUS,
97  ICAL_3_9_BADVERSION_STATUS,
98  ICAL_3_10_TOOBIG_STATUS,
99  ICAL_3_11_MISSREQCOMP_STATUS,
100  ICAL_3_12_UNKCOMP_STATUS,
101  ICAL_3_13_BADCOMP_STATUS,
102  ICAL_3_14_NOCAP_STATUS,
103  ICAL_3_15_INVCOMMAND,
104  ICAL_4_0_BUSY_STATUS,
105  ICAL_4_1_STORE_ACCESS_DENIED,
106  ICAL_4_2_STORE_FAILED,
107  ICAL_4_3_STORE_NOT_FOUND,
108  ICAL_5_0_MAYBE_STATUS,
109  ICAL_5_1_UNAVAIL_STATUS,
110  ICAL_5_2_NOSERVICE_STATUS,
111  ICAL_5_3_NOSCHED_STATUS,
112  ICAL_6_1_CONTAINER_NOT_FOUND,
113  ICAL_9_0_UNRECOGNIZED_COMMAND
114 } icalrequeststatus;
115 
116 LIBICAL_ICAL_EXPORT const char *icalenum_reqstat_desc(icalrequeststatus stat);
117 
118 LIBICAL_ICAL_EXPORT short icalenum_reqstat_major(icalrequeststatus stat);
119 
120 LIBICAL_ICAL_EXPORT short icalenum_reqstat_minor(icalrequeststatus stat);
121 
122 LIBICAL_ICAL_EXPORT icalrequeststatus icalenum_num_to_reqstat(short major, short minor);
123 
124 LIBICAL_ICAL_EXPORT char *icalenum_reqstat_code(icalrequeststatus stat);
125 
126 LIBICAL_ICAL_EXPORT char *icalenum_reqstat_code_r(icalrequeststatus stat);
127 
128 /***********************************************************************
129  * Conversion functions
130 **********************************************************************/
131 
132 /* Thse routines used to be in icalenums.c, but were moved into the
133  icalproperty, icalparameter, icalvalue, or icalcomponent modules. */
134 
135 /*const char* icalproperty_kind_to_string(icalproperty_kind kind);*/
136 #define icalenum_property_kind_to_string(x) icalproperty_kind_to_string(x)
137 
138 /*icalproperty_kind icalproperty_string_to_kind(const char* string)*/
139 #define icalenum_string_to_property_kind(x) icalproperty_string_to_kind(x)
140 
141 /*icalvalue_kind icalproperty_kind_to_value_kind(icalproperty_kind kind);*/
142 #define icalenum_property_kind_to_value_kind(x) icalproperty_kind_to_value_kind(x)
143 
144 /*const char* icalenum_method_to_string(icalproperty_method);*/
145 #define icalenum_method_to_string(x) icalproperty_method_to_string(x)
146 
147 /*icalproperty_method icalenum_string_to_method(const char* string);*/
148 #define icalenum_string_to_method(x) icalproperty_string_to_method(x)
149 
150 /*const char* icalenum_status_to_string(icalproperty_status);*/
151 #define icalenum_status_to_string(x) icalproperty_status_to_string(x)
152 
153 /*icalproperty_status icalenum_string_to_status(const char* string);*/
154 #define icalenum_string_to_status(x) icalproperty_string_to_status(x)
155 
156 /*icalvalue_kind icalenum_string_to_value_kind(const char* str);*/
157 #define icalenum_string_to_value_kind(x) icalvalue_string_to_kind(x)
158 
159 /*const char* icalenum_value_kind_to_string(icalvalue_kind kind);*/
160 #define icalenum_value_kind_to_string(x) icalvalue_kind_to_string(x)
161 
162 /*const char* icalenum_component_kind_to_string(icalcomponent_kind kind);*/
163 #define icalenum_component_kind_to_string(x) icalcomponent_kind_to_string(x)
164 
165 /*icalcomponent_kind icalenum_string_to_component_kind(const char* string);*/
166 #define icalenum_string_to_component_kind(x) icalcomponent_string_to_kind(x)
167 
168 #endif /* !ICALENUMS_H */