mime.h

Go to the documentation of this file.
00001 /*
00002  * Purple
00003  *
00004  * Purple is the legal property of its developers, whose names are too
00005  * numerous to list here. Please refer to the COPYRIGHT file distributed
00006  * with this source distribution
00007  *
00008  * This program is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or (at
00011  * your option) any later version.
00012  *
00013  * This program is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00016  * General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301,
00021  * USA.
00022  */
00023
00024 #ifndef _PURPLE_MIME_H
00025 #define _PURPLE_MIME_H
00026 
00027 #include <glib.h>
00028
00029 #ifdef __cplusplus
00030 extern "C" {
00031 #endif
00032 
00044 typedef struct _PurpleMimeDocument PurpleMimeDocument;
00045
00049 typedef struct _PurpleMimePart PurpleMimePart;
00050
00054 PurpleMimeDocument *purple_mime_document_new(void);
00055
00061 void purple_mime_document_free(PurpleMimeDocument *doc);
00062
00070 PurpleMimeDocument *purple_mime_document_parse(const char *buf);
00071
00080 PurpleMimeDocument *purple_mime_document_parsen(const char *buf, gsize len);
00081
00085 void purple_mime_document_write(PurpleMimeDocument *doc, GString *str);
00086
00095 GList *purple_mime_document_get_fields(PurpleMimeDocument *doc);
00096
00106 const char *purple_mime_document_get_field(PurpleMimeDocument *doc,
00107                      const char *field);
00108
00118 void purple_mime_document_set_field(PurpleMimeDocument *doc,
00119                   const char *field,
00120                   const char *value);
00121
00129 GList *purple_mime_document_get_parts(PurpleMimeDocument *doc);
00130
00136 PurpleMimePart *purple_mime_part_new(PurpleMimeDocument *doc);
00137
00138
00147 GList *purple_mime_part_get_fields(PurpleMimePart *part);
00148
00149
00159 const char *purple_mime_part_get_field(PurpleMimePart *part,
00160                      const char *field);
00161
00166 char *purple_mime_part_get_field_decoded(PurpleMimePart *part,
00167                        const char *field);
00168
00178 void purple_mime_part_set_field(PurpleMimePart *part,
00179                   const char *field,
00180                   const char *value);
00181
00189 const char *purple_mime_part_get_data(PurpleMimePart *part);
00190
00201 void purple_mime_part_get_data_decoded(PurpleMimePart *part,
00202                      guchar **data, gsize *len);
00203
00210 gsize purple_mime_part_get_length(PurpleMimePart *part);
00211
00212 void purple_mime_part_set_data(PurpleMimePart *part, const char *data);
00213
00214 #ifdef __cplusplus
00215 }
00216 #endif
00217 
00218 #endif
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!