Libical API Documentation 4.0
Loading...
Searching...
No Matches
icalenums.h
Go to the documentation of this file.
1/*======================================================================
2 FILE: icalenums.h
3
4 SPDX-FileCopyrightText: 2000, Eric Busboom <eric@civicknowledge.com>
5
6 SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
7
8 Contributions from:
9 Graham Davison <g.m.davison@computer.org>
10======================================================================*/
11
12#ifndef ICALENUMS_H
13#define ICALENUMS_H
14
15#include "libical_ical_export.h"
16
18
19/***********************************************************************
20 * Component enumerations
21**********************************************************************/
22
23typedef enum icalcomponent_kind
24{
25 ICAL_NO_COMPONENT,
26 ICAL_ANY_COMPONENT, /* Used to select all components */
27 ICAL_XROOT_COMPONENT,
28 ICAL_XATTACH_COMPONENT, /* MIME attached data, returned by parser. */
29 ICAL_VEVENT_COMPONENT,
30 ICAL_VTODO_COMPONENT,
31 ICAL_VJOURNAL_COMPONENT,
32 ICAL_VCALENDAR_COMPONENT,
33 ICAL_VAGENDA_COMPONENT,
34 ICAL_VFREEBUSY_COMPONENT,
35 ICAL_VALARM_COMPONENT,
36 ICAL_XAUDIOALARM_COMPONENT,
37 ICAL_XDISPLAYALARM_COMPONENT,
38 ICAL_XEMAILALARM_COMPONENT,
39 ICAL_XPROCEDUREALARM_COMPONENT,
40 ICAL_VTIMEZONE_COMPONENT,
41 ICAL_XSTANDARD_COMPONENT,
42 ICAL_XDAYLIGHT_COMPONENT,
43 ICAL_X_COMPONENT,
44 ICAL_VSCHEDULE_COMPONENT,
45 ICAL_VQUERY_COMPONENT,
46 ICAL_VREPLY_COMPONENT,
47 ICAL_VCAR_COMPONENT,
48 ICAL_VCOMMAND_COMPONENT,
49 ICAL_XLICINVALID_COMPONENT,
50 ICAL_XLICMIMEPART_COMPONENT, /* A non-stardard component that mirrors
51 structure of MIME data */
52 ICAL_VAVAILABILITY_COMPONENT,
53 ICAL_XAVAILABLE_COMPONENT,
54 ICAL_VPOLL_COMPONENT,
55 ICAL_VVOTER_COMPONENT,
56 ICAL_XVOTE_COMPONENT,
57 ICAL_VPATCH_COMPONENT,
58 ICAL_XPATCH_COMPONENT,
59 ICAL_PARTICIPANT_COMPONENT,
60 ICAL_VLOCATION_COMPONENT,
61 ICAL_VRESOURCE_COMPONENT,
62 ICAL_NUM_COMPONENT_TYPES /* MUST be last (unless we can put NO_COMP last) */
63} icalcomponent_kind;
64
65/***********************************************************************
66 * Request Status codes
67 **********************************************************************/
68
69typedef enum icalrequeststatus
70{
71 ICAL_UNKNOWN_STATUS,
72 ICAL_2_0_SUCCESS_STATUS,
73 ICAL_2_1_FALLBACK_STATUS,
74 ICAL_2_2_IGPROP_STATUS,
75 ICAL_2_3_IGPARAM_STATUS,
76 ICAL_2_4_IGXPROP_STATUS,
77 ICAL_2_5_IGXPARAM_STATUS,
78 ICAL_2_6_IGCOMP_STATUS,
79 ICAL_2_7_FORWARD_STATUS,
80 ICAL_2_8_ONEEVENT_STATUS,
81 ICAL_2_9_TRUNC_STATUS,
82 ICAL_2_10_ONETODO_STATUS,
83 ICAL_2_11_TRUNCRRULE_STATUS,
84 ICAL_3_0_INVPROPNAME_STATUS,
85 ICAL_3_1_INVPROPVAL_STATUS,
86 ICAL_3_2_INVPARAM_STATUS,
87 ICAL_3_3_INVPARAMVAL_STATUS,
88 ICAL_3_4_INVCOMP_STATUS,
89 ICAL_3_5_INVTIME_STATUS,
90 ICAL_3_6_INVRULE_STATUS,
91 ICAL_3_7_INVCU_STATUS,
92 ICAL_3_8_NOAUTH_STATUS,
93 ICAL_3_9_BADVERSION_STATUS,
94 ICAL_3_10_TOOBIG_STATUS,
95 ICAL_3_11_MISSREQCOMP_STATUS,
96 ICAL_3_12_UNKCOMP_STATUS,
97 ICAL_3_13_BADCOMP_STATUS,
98 ICAL_3_14_NOCAP_STATUS,
99 ICAL_3_15_INVCOMMAND,
100 ICAL_4_0_BUSY_STATUS,
101 ICAL_4_1_STORE_ACCESS_DENIED,
102 ICAL_4_2_STORE_FAILED,
103 ICAL_4_3_STORE_NOT_FOUND,
104 ICAL_5_0_MAYBE_STATUS,
105 ICAL_5_1_UNAVAIL_STATUS,
106 ICAL_5_2_NOSERVICE_STATUS,
107 ICAL_5_3_NOSCHED_STATUS,
108 ICAL_6_1_CONTAINER_NOT_FOUND,
109 ICAL_9_0_UNRECOGNIZED_COMMAND
110} icalrequeststatus;
111
114LIBICAL_ICAL_EXPORT const char *icalenum_reqstat_desc(icalrequeststatus stat);
115
118LIBICAL_ICAL_EXPORT short icalenum_reqstat_major(icalrequeststatus stat);
119
122LIBICAL_ICAL_EXPORT short icalenum_reqstat_minor(icalrequeststatus stat);
123
126LIBICAL_ICAL_EXPORT icalrequeststatus icalenum_num_to_reqstat(short major, short minor);
127
128LIBICAL_ICAL_EXPORT char *icalenum_reqstat_code(icalrequeststatus stat);
129
132LIBICAL_ICAL_EXPORT char *icalenum_reqstat_code_r(icalrequeststatus stat);
133
134/***********************************************************************
135 * Conversion functions
136**********************************************************************/
137
138/* These routines used to be in icalenums.c, but were moved into the
139 icalproperty, icalparameter, icalvalue, or icalcomponent modules. */
140
141/*const char* icalproperty_kind_to_string(icalproperty_kind kind);*/
142#define icalenum_property_kind_to_string(x) icalproperty_kind_to_string(x)
143
144/*icalproperty_kind icalproperty_string_to_kind(const char* string)*/
145#define icalenum_string_to_property_kind(x) icalproperty_string_to_kind(x)
146
147/*icalvalue_kind icalproperty_kind_to_value_kind(icalproperty_kind kind);*/
148#define icalenum_property_kind_to_value_kind(x) icalproperty_kind_to_value_kind(x)
149
150/*const char* icalenum_method_to_string(icalproperty_method);*/
151#define icalenum_method_to_string(x) icalproperty_method_to_string(x)
152
153/*icalproperty_method icalenum_string_to_method(const char* string);*/
154#define icalenum_string_to_method(x) icalproperty_string_to_method(x)
155
156/*const char* icalenum_status_to_string(icalproperty_status);*/
157#define icalenum_status_to_string(x) icalproperty_status_to_string(x)
158
159/*icalproperty_status icalenum_string_to_status(const char* string);*/
160#define icalenum_string_to_status(x) icalproperty_string_to_status(x)
161
162/*icalvalue_kind icalenum_string_to_value_kind(const char* str);*/
163#define icalenum_string_to_value_kind(x) icalvalue_string_to_kind(x)
164
165/*const char* icalenum_value_kind_to_string(icalvalue_kind kind);*/
166#define icalenum_value_kind_to_string(x) icalvalue_kind_to_string(x)
167
168/*const char* icalenum_component_kind_to_string(icalcomponent_kind kind);*/
169#define icalenum_component_kind_to_string(x) icalcomponent_kind_to_string(x)
170
171/*icalcomponent_kind icalenum_string_to_component_kind(const char* string);*/
172#define icalenum_string_to_component_kind(x) icalcomponent_string_to_kind(x)
173
174/*const char* icalenum_action_to_string(icalproperty_action);*/
175#define icalenum_action_to_string(x) icalproperty_action_to_string(x)
176
177/*icalproperty_action icalenum_string_to_action(const char* string);*/
178#define icalenum_string_to_action(x) icalproperty_string_to_action(x)
179
180/*const char* icalenum_transp_to_string(icalproperty_transp);*/
181#define icalenum_transp_to_string(x) icalproperty_transp_to_string(x)
182
183/*icalproperty_transp icalenum_string_to_transp(const char* string);*/
184#define icalenum_string_to_transp(x) icalproperty_string_to_transp(x)
185
186/*const char* icalenum_class_to_string(icalproperty_class);*/
187#define icalenum_class_to_string(x) icalproperty_class_to_string(x)
188
189/*icalproperty_class icalenum_string_to_class(const char* string);*/
190#define icalenum_string_to_class(x) icalproperty_string_to_class(x)
191
192/*const char* icalenum_participanttype_to_string(icalproperty_participanttype);*/
193#define icalenum_participanttype_to_string(x) icalproperty_participanttype_to_string(x)
194
195/*icalproperty_participanttype icalenum_string_to_participanttype(const char* string);*/
196#define icalenum_string_to_participanttype(x) icalproperty_string_to_participanttype(x)
197
198/*const char* icalenum_resourcetype_to_string(icalproperty_resourcetype);*/
199#define icalenum_resourcetype_to_string(x) icalproperty_resourcetype_to_string(x)
200
201/*icalproperty_resourcetype icalenum_string_to_resourcetype(const char* string);*/
202#define icalenum_string_to_resourcetype(x) icalproperty_string_to_resourcetype(x)
203
204#endif /* !ICALENUMS_H */
const char * icalenum_reqstat_desc(icalrequeststatus stat)
Returns the descriptive text for a request status.
Definition icalenums.c:71
short icalenum_reqstat_major(icalrequeststatus stat)
Returns the major number for a request status.
Definition icalenums.c:111
icalrequeststatus icalenum_num_to_reqstat(short major, short minor)
Returns a request status for major/minor status numbers.
Definition icalenums.c:137
short icalenum_reqstat_minor(icalrequeststatus stat)
Returns the minor number for a request status.
Definition icalenums.c:124
char * icalenum_reqstat_code_r(icalrequeststatus stat)
Returns the code for a request status.
Definition icalenums.c:94