Back to index

lightning-sunbird  0.9+nobinonly
icalattach.h
Go to the documentation of this file.
00001 /* -*- Mode: C -*- */
00002 /*======================================================================
00003  FILE: icalattach.h
00004  CREATOR: acampi 28 May 02
00005 
00006 
00007  (C) COPYRIGHT 2002, Andrea Campi
00008 
00009  This program is free software; you can redistribute it and/or modify
00010  it under the terms of either: 
00011 
00012     The LGPL as published by the Free Software Foundation, version
00013     2.1, available at: http://www.fsf.org/copyleft/lesser.html
00014 
00015   Or:
00016 
00017     The Mozilla Public License Version 1.0. You may obtain a copy of
00018     the License at http://www.mozilla.org/MPL/
00019 
00020   The original code is icalattach.h
00021 
00022 ======================================================================*/
00023 
00024 #ifndef ICALATTACH_H
00025 #define ICALATTACH_H
00026 
00027 
00028 typedef struct icalattach_impl icalattach;
00029 
00030 typedef void (* icalattach_free_fn_t) (unsigned char *data, void *user_data);
00031 
00032 icalattach *icalattach_new_from_url (const char *url);
00033 icalattach *icalattach_new_from_data (unsigned char *data,
00034        icalattach_free_fn_t free_fn, void *free_fn_data);
00035 
00036 void icalattach_ref (icalattach *attach);
00037 void icalattach_unref (icalattach *attach);
00038 
00039 int icalattach_get_is_url (icalattach *attach);
00040 const char *icalattach_get_url (icalattach *attach);
00041 unsigned char *icalattach_get_data (icalattach *attach);
00042 
00043 struct icalattachtype* icalattachtype_new(void);
00044 void  icalattachtype_add_reference(struct icalattachtype* v);
00045 void icalattachtype_free(struct icalattachtype* v);
00046 
00047 void icalattachtype_set_url(struct icalattachtype* v, char* url);
00048 char* icalattachtype_get_url(struct icalattachtype* v);
00049 
00050 void icalattachtype_set_base64(struct icalattachtype* v, char* base64,
00051                             int owns);
00052 char* icalattachtype_get_base64(struct icalattachtype* v);
00053 
00054 void icalattachtype_set_binary(struct icalattachtype* v, char* binary,
00055                             int owns);
00056 void* icalattachtype_get_binary(struct icalattachtype* v);
00057 
00058 
00059 
00060 #endif /* !ICALATTACH_H */