icalattach.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*======================================================================
  2. FILE: icalattach.h
  3. CREATOR: acampi 28 May 02
  4. (C) COPYRIGHT 2002, Andrea Campi <a.campi@inet.it>
  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. ======================================================================*/
  13. #ifndef ICALATTACH_H
  14. #define ICALATTACH_H
  15. #include "libical_ical_export.h"
  16. typedef struct icalattach_impl icalattach;
  17. typedef void (*icalattach_free_fn_t) (unsigned char *data, void *user_data);
  18. LIBICAL_ICAL_EXPORT icalattach *icalattach_new_from_url(const char *url);
  19. LIBICAL_ICAL_EXPORT icalattach *icalattach_new_from_data(const char *data,
  20. icalattach_free_fn_t free_fn,
  21. void *free_fn_data);
  22. LIBICAL_ICAL_EXPORT void icalattach_ref(icalattach *attach);
  23. LIBICAL_ICAL_EXPORT void icalattach_unref(icalattach *attach);
  24. LIBICAL_ICAL_EXPORT int icalattach_get_is_url(icalattach *attach);
  25. LIBICAL_ICAL_EXPORT const char *icalattach_get_url(icalattach *attach);
  26. LIBICAL_ICAL_EXPORT unsigned char *icalattach_get_data(icalattach *attach);
  27. LIBICAL_ICAL_EXPORT struct icalattachtype *icalattachtype_new(void);
  28. LIBICAL_ICAL_EXPORT void icalattachtype_add_reference(struct icalattachtype *v);
  29. LIBICAL_ICAL_EXPORT void icalattachtype_free(struct icalattachtype *v);
  30. LIBICAL_ICAL_EXPORT void icalattachtype_set_url(struct icalattachtype *v, char *url);
  31. LIBICAL_ICAL_EXPORT char *icalattachtype_get_url(struct icalattachtype *v);
  32. LIBICAL_ICAL_EXPORT void icalattachtype_set_base64(struct icalattachtype *v,
  33. char *base64, int owns);
  34. LIBICAL_ICAL_EXPORT char *icalattachtype_get_base64(struct icalattachtype *v);
  35. LIBICAL_ICAL_EXPORT void icalattachtype_set_binary(struct icalattachtype *v,
  36. char *binary, int owns);
  37. LIBICAL_ICAL_EXPORT void *icalattachtype_get_binary(struct icalattachtype *v);
  38. #endif /* !ICALATTACH_H */