1 /* -*- Mode: C -*- */
2 /*======================================================================
3  FILE: icalattach.h
4  CREATOR: acampi 28 May 02
5 
6 
7  (C) COPYRIGHT 2002, Andrea Campi <a.campi@inet.it>
8 
9  This program is free software; you can redistribute it and/or modify
10  it under the terms of either:
11 
12     The LGPL as published by the Free Software Foundation, version
13     2.1, available at: http://www.fsf.org/copyleft/lesser.html
14 
15   Or:
16 
17     The Mozilla Public License Version 1.0. You may obtain a copy of
18     the License at http://www.mozilla.org/MPL/
19 
20   The original code is icalattach.h
21 
22 ======================================================================*/
23 
24 #ifndef ICALATTACH_H
25 #define ICALATTACH_H
26 
27 
28 typedef struct icalattach_impl icalattach;
29 
30 typedef void (* icalattach_free_fn_t) (unsigned char *data, void *user_data);
31 
32 icalattach *icalattach_new_from_url (const char *url);
33 icalattach *icalattach_new_from_data (const char *data,
34 	icalattach_free_fn_t free_fn, void *free_fn_data);
35 
36 void icalattach_ref (icalattach *attach);
37 void icalattach_unref (icalattach *attach);
38 
39 int icalattach_get_is_url (icalattach *attach);
40 const char *icalattach_get_url (icalattach *attach);
41 unsigned char *icalattach_get_data (icalattach *attach);
42 
43 struct icalattachtype* icalattachtype_new(void);
44 void  icalattachtype_add_reference(struct icalattachtype* v);
45 void icalattachtype_free(struct icalattachtype* v);
46 
47 void icalattachtype_set_url(struct icalattachtype* v, char* url);
48 char* icalattachtype_get_url(struct icalattachtype* v);
49 
50 void icalattachtype_set_base64(struct icalattachtype* v, char* base64,
51 				int owns);
52 char* icalattachtype_get_base64(struct icalattachtype* v);
53 
54 void icalattachtype_set_binary(struct icalattachtype* v, char* binary,
55 				int owns);
56 void* icalattachtype_get_binary(struct icalattachtype* v);
57 
58 
59 
60 #endif /* !ICALATTACH_H */
61