icalparameter.h 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*======================================================================
  2. FILE: icalparam.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 ICALPARAMETER_H
  15. #define ICALPARAMETER_H
  16. #include "libical_ical_export.h"
  17. #include "icalderivedparameter.h"
  18. /* Declared in icalderivedparameter.h */
  19. /*typedef struct icalparameter_impl icalparameter;*/
  20. LIBICAL_ICAL_EXPORT icalparameter *icalparameter_new(icalparameter_kind kind);
  21. LIBICAL_ICAL_EXPORT icalparameter *icalparameter_new_clone(icalparameter *p);
  22. /* Create from string of form "PARAMNAME=VALUE" */
  23. LIBICAL_ICAL_EXPORT icalparameter *icalparameter_new_from_string(const char *value);
  24. /* Create from just the value, the part after the "=" */
  25. LIBICAL_ICAL_EXPORT icalparameter *icalparameter_new_from_value_string(icalparameter_kind kind,
  26. const char *value);
  27. LIBICAL_ICAL_EXPORT void icalparameter_free(icalparameter *parameter);
  28. LIBICAL_ICAL_EXPORT char *icalparameter_as_ical_string(icalparameter *parameter);
  29. LIBICAL_ICAL_EXPORT char *icalparameter_as_ical_string_r(icalparameter *parameter);
  30. LIBICAL_ICAL_EXPORT int icalparameter_is_valid(icalparameter *parameter);
  31. LIBICAL_ICAL_EXPORT icalparameter_kind icalparameter_isa(icalparameter *parameter);
  32. LIBICAL_ICAL_EXPORT int icalparameter_isa_parameter(void *param);
  33. /* Access the name of an X parameter */
  34. LIBICAL_ICAL_EXPORT void icalparameter_set_xname(icalparameter *param, const char *v);
  35. LIBICAL_ICAL_EXPORT const char *icalparameter_get_xname(icalparameter *param);
  36. LIBICAL_ICAL_EXPORT void icalparameter_set_xvalue(icalparameter *param, const char *v);
  37. LIBICAL_ICAL_EXPORT const char *icalparameter_get_xvalue(icalparameter *param);
  38. /* Access the name of an IANA parameter */
  39. LIBICAL_ICAL_EXPORT void icalparameter_set_iana_name(icalparameter *param, const char *v);
  40. LIBICAL_ICAL_EXPORT const char *icalparameter_get_iana_name(icalparameter *param);
  41. LIBICAL_ICAL_EXPORT void icalparameter_set_iana_value(icalparameter *param, const char *v);
  42. LIBICAL_ICAL_EXPORT const char *icalparameter_get_iana_value(icalparameter *param);
  43. /* returns 1 if parameters have same name in ICAL, otherwise 0 */
  44. LIBICAL_ICAL_EXPORT int icalparameter_has_same_name(icalparameter *param1, icalparameter *param2);
  45. /* Convert enumerations */
  46. LIBICAL_ICAL_EXPORT const char *icalparameter_kind_to_string(icalparameter_kind kind);
  47. LIBICAL_ICAL_EXPORT icalparameter_kind icalparameter_string_to_kind(const char *string);
  48. #endif