pidgin 2.14.14dev
Loading...
Searching...
No Matches
mime.h
Go to the documentation of this file.
1/*
2 * Purple
3 *
4 * Purple is the legal property of its developers, whose names are too
5 * numerous to list here. Please refer to the COPYRIGHT file distributed
6 * with this source distribution
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or (at
11 * your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301,
21 * USA.
22 */
23
24#ifndef _PURPLE_MIME_H
25#define _PURPLE_MIME_H
26
27#include <glib.h>
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
44typedef struct _PurpleMimeDocument PurpleMimeDocument;
45
49typedef struct _PurpleMimePart PurpleMimePart;
50
55
62
71
81
86
96
107 const char *field);
108
119 const char *field,
120 const char *value);
121
130
137
138
148
149
160 const char *field);
161
167 const char *field);
168
179 const char *field,
180 const char *value);
181
190
202 guchar **data, gsize *len);
203
211
212void purple_mime_part_set_data(PurpleMimePart *part, const char *data);
213
214#ifdef __cplusplus
215}
216#endif
217
218#endif
void purple_mime_part_set_field(PurpleMimePart *part, const char *field, const char *value)
Set or replace the value of a specific field in the header of a document.
const char * purple_mime_part_get_field(PurpleMimePart *part, const char *field)
Get the value of a specific field in the header of a document part.
gsize purple_mime_part_get_length(PurpleMimePart *part)
Get the length of the data portion of a MIME document part.
GList * purple_mime_document_get_fields(PurpleMimeDocument *doc)
The list of fields in the header of a document.
const char * purple_mime_part_get_data(PurpleMimePart *part)
Get the (possibly encoded) data portion of a MIME document part.
PurpleMimePart * purple_mime_part_new(PurpleMimeDocument *doc)
Create and insert a new part into a MIME document.
void purple_mime_document_free(PurpleMimeDocument *doc)
Frees memory used in a MIME document and all of its parts and fields.
PurpleMimeDocument * purple_mime_document_new(void)
Allocate an empty MIME document.
const char * purple_mime_document_get_field(PurpleMimeDocument *doc, const char *field)
Get the value of a specific field in the header of a document.
GList * purple_mime_part_get_fields(PurpleMimePart *part)
The list of fields in the header of a document part.
void purple_mime_document_set_field(PurpleMimeDocument *doc, const char *field, const char *value)
Set or replace the value of a specific field in the header of a document.
PurpleMimeDocument * purple_mime_document_parse(const char *buf)
Parse a MIME document from a NUL-terminated string.
char * purple_mime_part_get_field_decoded(PurpleMimePart *part, const char *field)
Get the decoded value of a specific field in the header of a document part.
struct _PurpleMimeDocument PurpleMimeDocument
A MIME document.
Definition mime.h:44
void purple_mime_part_get_data_decoded(PurpleMimePart *part, guchar **data, gsize *len)
Get the data portion of a MIME document part, after attempting to decode it according to the content-...
void purple_mime_document_write(PurpleMimeDocument *doc, GString *str)
Write (append) a MIME document onto a GString.
GList * purple_mime_document_get_parts(PurpleMimeDocument *doc)
The list of parts in a multipart document.
PurpleMimeDocument * purple_mime_document_parsen(const char *buf, gsize len)
Parse a MIME document from a string.
struct _PurpleMimePart PurpleMimePart
A part of a multipart MIME document.
Definition mime.h:49