Back to index

lightning-sunbird  0.9+nobinonly
icalenums.h
Go to the documentation of this file.
00001 
00002 /* -*- Mode: C -*-*/
00003 /*======================================================================
00004  FILE: icalenums.h
00005 
00006  
00007 
00008  (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
00009 
00010  This program is free software; you can redistribute it and/or modify
00011  it under the terms of either: 
00012 
00013     The LGPL as published by the Free Software Foundation, version
00014     2.1, available at: http://www.fsf.org/copyleft/lesser.html
00015 
00016   Or:
00017 
00018     The Mozilla Public License Version 1.0. You may obtain a copy of
00019     the License at http://www.mozilla.org/MPL/
00020 
00021   The original code is icalenums.h
00022 
00023   Contributions from:
00024      Graham Davison (g.m.davison@computer.org)
00025 
00026 ======================================================================*/
00027 
00028 #ifndef ICALENUMS_H
00029 #define ICALENUMS_H
00030 
00031 
00032 
00033 /***********************************************************************
00034  * Component enumerations
00035 **********************************************************************/
00036 
00037 typedef enum icalcomponent_kind {
00038     ICAL_NO_COMPONENT,
00039     ICAL_ANY_COMPONENT,     /* Used to select all components*/
00040     ICAL_XROOT_COMPONENT,
00041     ICAL_XATTACH_COMPONENT, /* MIME attached data, returned by parser. */
00042     ICAL_VEVENT_COMPONENT,
00043     ICAL_VTODO_COMPONENT,
00044     ICAL_VJOURNAL_COMPONENT,
00045     ICAL_VCALENDAR_COMPONENT,
00046     ICAL_VAGENDA_COMPONENT,
00047     ICAL_VFREEBUSY_COMPONENT,
00048     ICAL_VALARM_COMPONENT,
00049     ICAL_XAUDIOALARM_COMPONENT,  
00050     ICAL_XDISPLAYALARM_COMPONENT,
00051     ICAL_XEMAILALARM_COMPONENT,
00052     ICAL_XPROCEDUREALARM_COMPONENT,
00053     ICAL_VTIMEZONE_COMPONENT,
00054     ICAL_XSTANDARD_COMPONENT,
00055     ICAL_XDAYLIGHT_COMPONENT,
00056     ICAL_X_COMPONENT,
00057     ICAL_VSCHEDULE_COMPONENT,
00058     ICAL_VQUERY_COMPONENT,
00059     ICAL_VREPLY_COMPONENT,
00060     ICAL_VCAR_COMPONENT,
00061     ICAL_VCOMMAND_COMPONENT,
00062     ICAL_XLICINVALID_COMPONENT,
00063     ICAL_XLICMIMEPART_COMPONENT /* a non-stardard component that mirrors
00064                             structure of MIME data */
00065 
00066 } icalcomponent_kind;
00067 
00068 
00069 
00070 /***********************************************************************
00071  * Request Status codes
00072  **********************************************************************/
00073 
00074 typedef enum icalrequeststatus {
00075     ICAL_UNKNOWN_STATUS,
00076     ICAL_2_0_SUCCESS_STATUS,
00077     ICAL_2_1_FALLBACK_STATUS,
00078     ICAL_2_2_IGPROP_STATUS,
00079     ICAL_2_3_IGPARAM_STATUS,
00080     ICAL_2_4_IGXPROP_STATUS,
00081     ICAL_2_5_IGXPARAM_STATUS,
00082     ICAL_2_6_IGCOMP_STATUS,
00083     ICAL_2_7_FORWARD_STATUS,
00084     ICAL_2_8_ONEEVENT_STATUS,
00085     ICAL_2_9_TRUNC_STATUS,
00086     ICAL_2_10_ONETODO_STATUS,
00087     ICAL_2_11_TRUNCRRULE_STATUS,
00088     ICAL_3_0_INVPROPNAME_STATUS,
00089     ICAL_3_1_INVPROPVAL_STATUS,
00090     ICAL_3_2_INVPARAM_STATUS,
00091     ICAL_3_3_INVPARAMVAL_STATUS,
00092     ICAL_3_4_INVCOMP_STATUS,
00093     ICAL_3_5_INVTIME_STATUS,
00094     ICAL_3_6_INVRULE_STATUS,
00095     ICAL_3_7_INVCU_STATUS,
00096     ICAL_3_8_NOAUTH_STATUS,
00097     ICAL_3_9_BADVERSION_STATUS,
00098     ICAL_3_10_TOOBIG_STATUS,
00099     ICAL_3_11_MISSREQCOMP_STATUS,
00100     ICAL_3_12_UNKCOMP_STATUS,
00101     ICAL_3_13_BADCOMP_STATUS,
00102     ICAL_3_14_NOCAP_STATUS,
00103     ICAL_3_15_INVCOMMAND,
00104     ICAL_4_0_BUSY_STATUS,
00105     ICAL_4_1_STORE_ACCESS_DENIED,
00106     ICAL_4_2_STORE_FAILED,
00107     ICAL_4_3_STORE_NOT_FOUND,
00108     ICAL_5_0_MAYBE_STATUS,
00109     ICAL_5_1_UNAVAIL_STATUS,
00110     ICAL_5_2_NOSERVICE_STATUS,
00111     ICAL_5_3_NOSCHED_STATUS,
00112     ICAL_6_1_CONTAINER_NOT_FOUND,
00113        ICAL_9_0_UNRECOGNIZED_COMMAND
00114 } icalrequeststatus;
00115 
00116 
00117 const char* icalenum_reqstat_desc(icalrequeststatus stat);
00118 short icalenum_reqstat_major(icalrequeststatus stat);
00119 short icalenum_reqstat_minor(icalrequeststatus stat);
00120 icalrequeststatus icalenum_num_to_reqstat(short major, short minor);
00121 char* icalenum_reqstat_code(icalrequeststatus stat);
00122 
00123 /***********************************************************************
00124  * Conversion functions
00125 **********************************************************************/
00126 
00127 
00128 /* Thse routines used to be in icalenums.c, but were moved into the
00129    icalproperty, icalparameter, icalvalue, or icalcomponent modules. */
00130 
00131 /* const char* icalproperty_kind_to_string(icalproperty_kind kind);*/
00132 #define icalenum_property_kind_to_string(x) icalproperty_kind_to_string(x)
00133 
00134 /*icalproperty_kind icalproperty_string_to_kind(const char* string)*/
00135 #define icalenum_string_to_property_kind(x) icalproperty_string_to_kind(x)
00136 
00137 /*icalvalue_kind icalproperty_kind_to_value_kind(icalproperty_kind kind);*/
00138 #define icalenum_property_kind_to_value_kind(x) icalproperty_kind_to_value_kind(x)
00139 
00140 /*const char* icalenum_method_to_string(icalproperty_method);*/
00141 #define icalenum_method_to_string(x) icalproperty_method_to_string(x)
00142 
00143 /*icalproperty_method icalenum_string_to_method(const char* string);*/
00144 #define icalenum_string_to_method(x) icalproperty_string_to_method(x)
00145 
00146 /*const char* icalenum_status_to_string(icalproperty_status);*/
00147 #define icalenum_status_to_string(x) icalproperty_status_to_string(x)
00148 
00149 /*icalproperty_status icalenum_string_to_status(const char* string);*/
00150 #define icalenum_string_to_status(x) icalproperty_string_to_status(x)
00151 
00152 /*icalvalue_kind icalenum_string_to_value_kind(const char* str);*/
00153 #define icalenum_string_to_value_kind(x) icalvalue_string_to_kind(x)
00154 
00155 /*const char* icalenum_value_kind_to_string(icalvalue_kind kind);*/
00156 #define icalenum_value_kind_to_string(x) icalvalue_kind_to_string(x)
00157 
00158 /*const char* icalenum_component_kind_to_string(icalcomponent_kind kind);*/
00159 #define icalenum_component_kind_to_string(x) icalcomponent_kind_to_string(x)
00160 
00161 /*icalcomponent_kind icalenum_string_to_component_kind(const char* string);*/
00162 #define icalenum_string_to_component_kind(x) icalcomponent_string_to_kind(x)
00163 
00164 
00165 #endif /* !ICALENUMS_H */
00166