Libical API Documentation 3.0

icalattach.h
Go to the documentation of this file.
1/*======================================================================
2 FILE: icalattach.h
3 CREATOR: acampi 28 May 02
4
5 (C) COPYRIGHT 2002, Andrea Campi <a.campi@inet.it>
6
7 This library is free software; you can redistribute it and/or modify
8 it under the terms of either:
9
10 The LGPL as published by the Free Software Foundation, version
11 2.1, available at: https://www.gnu.org/licenses/lgpl-2.1.html
12
13 Or:
14
15 The Mozilla Public License Version 2.0. You may obtain a copy of
16 the License at https://www.mozilla.org/MPL/
17======================================================================*/
18
31#ifndef ICALATTACH_H
32#define ICALATTACH_H
33
34#include "libical_ical_export.h"
35
44 typedef struct icalattach_impl icalattach;
45
54 typedef void (*icalattach_free_fn_t) (char *data, void *user_data);
55
86LIBICAL_ICAL_EXPORT icalattach *icalattach_new_from_url(const char *url);
87
107LIBICAL_ICAL_EXPORT icalattach *icalattach_new_from_data(const char *data,
108 icalattach_free_fn_t free_fn,
109 void *free_fn_data);
110
125LIBICAL_ICAL_EXPORT void icalattach_ref(icalattach *attach);
126
152LIBICAL_ICAL_EXPORT void icalattach_unref(icalattach *attach);
153
176LIBICAL_ICAL_EXPORT int icalattach_get_is_url(icalattach *attach);
177
208LIBICAL_ICAL_EXPORT const char *icalattach_get_url(icalattach *attach);
209
227LIBICAL_ICAL_EXPORT unsigned char *icalattach_get_data(icalattach *attach);
228
229#endif /* !ICALATTACH_H */
icalattach_new_from_data
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:60
icalattach_free_fn_t
void(* icalattach_free_fn_t)(char *data, void *user_data)
Function to be called to free the data of an icalattach object.
Definition: icalattach.h:54
icalattach_unref
void icalattach_unref(icalattach *attach)
Decrements reference count of the icalattach.
Definition: icalattach.c:99
icalattach_get_is_url
int icalattach_get_is_url(icalattach *attach)
Determines if attach is an URL.
Definition: icalattach.c:118
icalattach_ref
void icalattach_ref(icalattach *attach)
Increments reference count of the icalattach.
Definition: icalattach.c:91
icalattach_get_data
unsigned char * icalattach_get_data(icalattach *attach)
Returns the data of the icalattach object.
Definition: icalattach.c:133
icalattach_get_url
const char * icalattach_get_url(icalattach *attach)
Returns the URL of the icalattach object.
Definition: icalattach.c:125
icalattach_new_from_url
icalattach * icalattach_new_from_url(const char *url)
Creates new icalattach object from a URL.
Definition: icalattach.c:29
icalattach_impl
Definition: icalattachimpl.h:26