$darkmode
Libical API Documentation 4.0 STABLE VERSION Visit the v3.0 documentation
icalattach.h
Go to the documentation of this file.
1 /*======================================================================
2  FILE: icalattach.h
3  CREATOR: acampi 28 May 02
4 
5  SPDX-FileCopyrightText: 2002, Andrea Campi <a.campi@inet.it>
6  SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
7 ======================================================================*/
8 
21 #ifndef ICALATTACH_H
22 #define ICALATTACH_H
23 
24 #include "libical_ical_export.h"
25 
26 #include <stdbool.h>
27 
36 typedef struct icalattach_impl icalattach;
37 
46 typedef void (*icalattach_free_fn_t)(char *data, void *user_data);
47 
78 LIBICAL_ICAL_EXPORT icalattach *icalattach_new_from_url(const char *url);
79 
99 LIBICAL_ICAL_EXPORT icalattach *icalattach_new_from_data(const char *data,
100  icalattach_free_fn_t free_fn,
101  void *free_fn_data);
102 
117 LIBICAL_ICAL_EXPORT void icalattach_ref(icalattach *attach);
118 
144 LIBICAL_ICAL_EXPORT void icalattach_unref(icalattach *attach);
145 
167 LIBICAL_ICAL_EXPORT bool icalattach_get_is_url(const icalattach *attach);
168 
199 LIBICAL_ICAL_EXPORT const char *icalattach_get_url(icalattach *attach);
200 
218 LIBICAL_ICAL_EXPORT unsigned char *icalattach_get_data(icalattach *attach);
219 
220 #endif /* !ICALATTACH_H */
void icalattach_unref(icalattach *attach)
Decrements reference count of the icalattach.
Definition: icalattach.c:95
bool icalattach_get_is_url(const icalattach *attach)
Determines if attach is an URL.
Definition: icalattach.c:115
void(* icalattach_free_fn_t)(char *data, void *user_data)
Definition: icalattach.h:46
const char * icalattach_get_url(icalattach *attach)
Returns the URL of the icalattach object.
Definition: icalattach.c:122
unsigned char * icalattach_get_data(icalattach *attach)
Returns the data of the icalattach object.
Definition: icalattach.c:130
icalattach * icalattach_new_from_url(const char *url)
Creates new icalattach object from a URL.
Definition: icalattach.c:25
void icalattach_ref(icalattach *attach)
Increments reference count of the icalattach.
Definition: icalattach.c:87
icalattach * icalattach_new_from_data(const char *data, icalattach_free_fn_t free_fn, void *free_fn_data)
Creates new icalattach object from data.
Definition: icalattach.c:56
struct icalattach_impl icalattach
An iCal attach object representing a link to a document object.
Definition: icalattach.h:36