icalvalue.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*======================================================================
  2. FILE: icalvalue.h
  3. CREATOR: eric 20 March 1999
  4. (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org>
  5. http://www.softwarestudio.org
  6. This program is free software; you can redistribute it and/or modify
  7. it under the terms of either:
  8. The LGPL as published by the Free Software Foundation, version
  9. 2.1, available at: http://www.gnu.org/licenses/lgpl-2.1.html
  10. Or:
  11. The Mozilla Public License Version 1.0. You may obtain a copy of
  12. the License at http://www.mozilla.org/MPL/
  13. ======================================================================*/
  14. #ifndef ICALVALUE_H
  15. #define ICALVALUE_H
  16. #include "libical_ical_export.h"
  17. #include "icalvalueimpl.h"
  18. LIBICAL_ICAL_EXPORT icalvalue *icalvalue_new(icalvalue_kind kind);
  19. LIBICAL_ICAL_EXPORT icalvalue *icalvalue_new_clone(const icalvalue *value);
  20. LIBICAL_ICAL_EXPORT icalvalue *icalvalue_new_from_string(icalvalue_kind kind, const char *str);
  21. LIBICAL_ICAL_EXPORT void icalvalue_free(icalvalue *value);
  22. LIBICAL_ICAL_EXPORT int icalvalue_is_valid(const icalvalue *value);
  23. LIBICAL_ICAL_EXPORT const char *icalvalue_as_ical_string(const icalvalue *value);
  24. LIBICAL_ICAL_EXPORT char *icalvalue_as_ical_string_r(const icalvalue *value);
  25. LIBICAL_ICAL_EXPORT icalvalue_kind icalvalue_isa(const icalvalue *value);
  26. LIBICAL_ICAL_EXPORT int icalvalue_isa_value(void *);
  27. LIBICAL_ICAL_EXPORT icalparameter_xliccomparetype icalvalue_compare(const icalvalue *a,
  28. const icalvalue *b);
  29. /* Special, non autogenerated value accessors */
  30. /* Defined in icalderivedvalue.h */
  31. /* icalvalue* icalvalue_new_recur (struct icalrecurrencetype v); */
  32. /* void icalvalue_set_recur(icalvalue* value, struct icalrecurrencetype v); */
  33. /* struct icalrecurrencetype icalvalue_get_recur(const icalvalue* value); */
  34. /* icalvalue* icalvalue_new_trigger (struct icaltriggertype v); */
  35. /* void icalvalue_set_trigger(icalvalue* value, struct icaltriggertype v); */
  36. /* struct icaltriggertype icalvalue_get_trigger(const icalvalue* value); */
  37. /* icalvalue* icalvalue_new_datetimeperiod (struct icaldatetimeperiodtype v); */
  38. /* void icalvalue_set_datetimeperiod(icalvalue* value, */
  39. /* struct icaldatetimeperiodtype v); */
  40. /* struct icaldatetimeperiodtype icalvalue_get_datetimeperiod(const icalvalue* value); */
  41. /* Convert enumerations */
  42. LIBICAL_ICAL_EXPORT icalvalue_kind icalvalue_string_to_kind(const char *str);
  43. LIBICAL_ICAL_EXPORT const char *icalvalue_kind_to_string(const icalvalue_kind kind);
  44. /** Check validity of a specific icalvalue_kind **/
  45. LIBICAL_ICAL_EXPORT int icalvalue_kind_is_valid(const icalvalue_kind kind);
  46. /** Encode a character string in ical format, esacpe certain characters, etc. */
  47. LIBICAL_ICAL_EXPORT int icalvalue_encode_ical_string(const char *szText,
  48. char *szEncText, int MaxBufferLen);
  49. /** Extract the original character string encoded by the above function **/
  50. LIBICAL_ICAL_EXPORT int icalvalue_decode_ical_string(const char *szText,
  51. char *szDecText, int nMaxBufferLen);
  52. /* For the library only -- do not make visible */
  53. extern void print_date_to_string(char *str, const struct icaltimetype *data);
  54. extern void print_datetime_to_string(char *str, const struct icaltimetype *data);
  55. #endif /*ICALVALUE_H */