icalenums.h 5.7 KB

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