Libical API Documentation  3.0
icalenums.h
Go to the documentation of this file.
1 /*======================================================================
2  FILE: icalenums.h
3 
4  (C) COPYRIGHT 2000, Eric Busboom <eric@civicknowledge.com>
5 
6  This library is free software; you can redistribute it and/or modify
7  it under the terms of either:
8 
9  The LGPL as published by the Free Software Foundation, version
10  2.1, available at: https://www.gnu.org/licenses/lgpl-2.1.html
11 
12  Or:
13 
14  The Mozilla Public License Version 2.0. You may obtain a copy of
15  the License at https://www.mozilla.org/MPL/
16 
17  Contributions from:
18  Graham Davison <g.m.davison@computer.org>
19 ======================================================================*/
20 
21 #ifndef ICALENUMS_H
22 #define ICALENUMS_H
23 
24 #include "libical_ical_export.h"
25 
28 /***********************************************************************
29  * Component enumerations
30 **********************************************************************/
31 
32 typedef enum icalcomponent_kind
33 {
34  ICAL_NO_COMPONENT,
35  ICAL_ANY_COMPONENT, /* Used to select all components */
36  ICAL_XROOT_COMPONENT,
37  ICAL_XATTACH_COMPONENT, /* MIME attached data, returned by parser. */
38  ICAL_VEVENT_COMPONENT,
39  ICAL_VTODO_COMPONENT,
40  ICAL_VJOURNAL_COMPONENT,
41  ICAL_VCALENDAR_COMPONENT,
42  ICAL_VAGENDA_COMPONENT,
43  ICAL_VFREEBUSY_COMPONENT,
44  ICAL_VALARM_COMPONENT,
45  ICAL_XAUDIOALARM_COMPONENT,
46  ICAL_XDISPLAYALARM_COMPONENT,
47  ICAL_XEMAILALARM_COMPONENT,
48  ICAL_XPROCEDUREALARM_COMPONENT,
49  ICAL_VTIMEZONE_COMPONENT,
50  ICAL_XSTANDARD_COMPONENT,
51  ICAL_XDAYLIGHT_COMPONENT,
52  ICAL_X_COMPONENT,
53  ICAL_VSCHEDULE_COMPONENT,
54  ICAL_VQUERY_COMPONENT,
55  ICAL_VREPLY_COMPONENT,
56  ICAL_VCAR_COMPONENT,
57  ICAL_VCOMMAND_COMPONENT,
58  ICAL_XLICINVALID_COMPONENT,
59  ICAL_XLICMIMEPART_COMPONENT, /* A non-stardard component that mirrors
60  structure of MIME data */
61  ICAL_VAVAILABILITY_COMPONENT,
62  ICAL_XAVAILABLE_COMPONENT,
63  ICAL_VPOLL_COMPONENT,
64  ICAL_VVOTER_COMPONENT,
65  ICAL_XVOTE_COMPONENT,
66  ICAL_VPATCH_COMPONENT,
67  ICAL_XPATCH_COMPONENT
68 } icalcomponent_kind;
69 
70 /***********************************************************************
71  * Request Status codes
72  **********************************************************************/
73 
74 typedef enum icalrequeststatus
75 {
76  ICAL_UNKNOWN_STATUS,
77  ICAL_2_0_SUCCESS_STATUS,
78  ICAL_2_1_FALLBACK_STATUS,
79  ICAL_2_2_IGPROP_STATUS,
80  ICAL_2_3_IGPARAM_STATUS,
81  ICAL_2_4_IGXPROP_STATUS,
82  ICAL_2_5_IGXPARAM_STATUS,
83  ICAL_2_6_IGCOMP_STATUS,
84  ICAL_2_7_FORWARD_STATUS,
85  ICAL_2_8_ONEEVENT_STATUS,
86  ICAL_2_9_TRUNC_STATUS,
87  ICAL_2_10_ONETODO_STATUS,
88  ICAL_2_11_TRUNCRRULE_STATUS,
89  ICAL_3_0_INVPROPNAME_STATUS,
90  ICAL_3_1_INVPROPVAL_STATUS,
91  ICAL_3_2_INVPARAM_STATUS,
92  ICAL_3_3_INVPARAMVAL_STATUS,
93  ICAL_3_4_INVCOMP_STATUS,
94  ICAL_3_5_INVTIME_STATUS,
95  ICAL_3_6_INVRULE_STATUS,
96  ICAL_3_7_INVCU_STATUS,
97  ICAL_3_8_NOAUTH_STATUS,
98  ICAL_3_9_BADVERSION_STATUS,
99  ICAL_3_10_TOOBIG_STATUS,
100  ICAL_3_11_MISSREQCOMP_STATUS,
101  ICAL_3_12_UNKCOMP_STATUS,
102  ICAL_3_13_BADCOMP_STATUS,
103  ICAL_3_14_NOCAP_STATUS,
104  ICAL_3_15_INVCOMMAND,
105  ICAL_4_0_BUSY_STATUS,
106  ICAL_4_1_STORE_ACCESS_DENIED,
107  ICAL_4_2_STORE_FAILED,
108  ICAL_4_3_STORE_NOT_FOUND,
109  ICAL_5_0_MAYBE_STATUS,
110  ICAL_5_1_UNAVAIL_STATUS,
111  ICAL_5_2_NOSERVICE_STATUS,
112  ICAL_5_3_NOSCHED_STATUS,
113  ICAL_6_1_CONTAINER_NOT_FOUND,
114  ICAL_9_0_UNRECOGNIZED_COMMAND
115 } icalrequeststatus;
116 
119 LIBICAL_ICAL_EXPORT const char *icalenum_reqstat_desc(icalrequeststatus stat);
120 
123 LIBICAL_ICAL_EXPORT short icalenum_reqstat_major(icalrequeststatus stat);
124 
127 LIBICAL_ICAL_EXPORT short icalenum_reqstat_minor(icalrequeststatus stat);
128 
131 LIBICAL_ICAL_EXPORT icalrequeststatus icalenum_num_to_reqstat(short major, short minor);
132 
133 LIBICAL_ICAL_EXPORT char *icalenum_reqstat_code(icalrequeststatus stat);
134 
137 LIBICAL_ICAL_EXPORT char *icalenum_reqstat_code_r(icalrequeststatus stat);
138 
139 /***********************************************************************
140  * Conversion functions
141 **********************************************************************/
142 
143 /* These routines used to be in icalenums.c, but were moved into the
144  icalproperty, icalparameter, icalvalue, or icalcomponent modules. */
145 
146 /*const char* icalproperty_kind_to_string(icalproperty_kind kind);*/
147 #define icalenum_property_kind_to_string(x) icalproperty_kind_to_string(x)
148 
149 /*icalproperty_kind icalproperty_string_to_kind(const char* string)*/
150 #define icalenum_string_to_property_kind(x) icalproperty_string_to_kind(x)
151 
152 /*icalvalue_kind icalproperty_kind_to_value_kind(icalproperty_kind kind);*/
153 #define icalenum_property_kind_to_value_kind(x) icalproperty_kind_to_value_kind(x)
154 
155 /*const char* icalenum_method_to_string(icalproperty_method);*/
156 #define icalenum_method_to_string(x) icalproperty_method_to_string(x)
157 
158 /*icalproperty_method icalenum_string_to_method(const char* string);*/
159 #define icalenum_string_to_method(x) icalproperty_string_to_method(x)
160 
161 /*const char* icalenum_status_to_string(icalproperty_status);*/
162 #define icalenum_status_to_string(x) icalproperty_status_to_string(x)
163 
164 /*icalproperty_status icalenum_string_to_status(const char* string);*/
165 #define icalenum_string_to_status(x) icalproperty_string_to_status(x)
166 
167 /*icalvalue_kind icalenum_string_to_value_kind(const char* str);*/
168 #define icalenum_string_to_value_kind(x) icalvalue_string_to_kind(x)
169 
170 /*const char* icalenum_value_kind_to_string(icalvalue_kind kind);*/
171 #define icalenum_value_kind_to_string(x) icalvalue_kind_to_string(x)
172 
173 /*const char* icalenum_component_kind_to_string(icalcomponent_kind kind);*/
174 #define icalenum_component_kind_to_string(x) icalcomponent_kind_to_string(x)
175 
176 /*icalcomponent_kind icalenum_string_to_component_kind(const char* string);*/
177 #define icalenum_string_to_component_kind(x) icalcomponent_string_to_kind(x)
178 
179 #endif /* !ICALENUMS_H */
short icalenum_reqstat_major(icalrequeststatus stat)
Returns the major number for a request status.
Definition: icalenums.c:120
icalrequeststatus icalenum_num_to_reqstat(short major, short minor)
Returns a request status for major/minor status numbers.
Definition: icalenums.c:146
const char * icalenum_reqstat_desc(icalrequeststatus stat)
Returns the descriptive text for a request status.
Definition: icalenums.c:80
char * icalenum_reqstat_code_r(icalrequeststatus stat)
Returns the code for a request status.
Definition: icalenums.c:103
short icalenum_reqstat_minor(icalrequeststatus stat)
Returns the minor number for a request status.
Definition: icalenums.c:133