|
pidgin 2.14.4
|
Rudimentary parsing of multi-part MIME messages into more accessible structures. More...
#include <glib.h>Go to the source code of this file.
Typedefs | |
| typedef struct _PurpleMimeDocument | PurpleMimeDocument |
| A MIME document. | |
| typedef struct _PurpleMimePart | PurpleMimePart |
| A part of a multipart MIME document. | |
Functions | |
| PurpleMimeDocument * | purple_mime_document_new (void) |
| Allocate an empty 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_parse (const char *buf) |
| Parse a MIME document from a NUL-terminated string. | |
| PurpleMimeDocument * | purple_mime_document_parsen (const char *buf, gsize len) |
| Parse a MIME document from a string. | |
| void | purple_mime_document_write (PurpleMimeDocument *doc, GString *str) |
| Write (append) a MIME document onto a GString. | |
| GList * | purple_mime_document_get_fields (PurpleMimeDocument *doc) |
| The list of fields in the header of a 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. | |
| 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. | |
| GList * | purple_mime_document_get_parts (PurpleMimeDocument *doc) |
| The list of parts in a multipart document. | |
| PurpleMimePart * | purple_mime_part_new (PurpleMimeDocument *doc) |
| Create and insert a new part into a MIME document. | |
| GList * | purple_mime_part_get_fields (PurpleMimePart *part) |
| The list of fields in the header of a document part. | |
| 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. | |
| 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. | |
| 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_data (PurpleMimePart *part) |
| Get the (possibly encoded) data portion of a MIME document part. | |
| 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-transfer-encoding field. | |
| gsize | purple_mime_part_get_length (PurpleMimePart *part) |
| Get the length of the data portion of a MIME document part. | |
| void | purple_mime_part_set_data (PurpleMimePart *part, const char *data) |
Rudimentary parsing of multi-part MIME messages into more accessible structures.
Definition in file mime.h.
| typedef struct _PurpleMimeDocument PurpleMimeDocument |
| typedef struct _PurpleMimePart PurpleMimePart |
| void purple_mime_document_free | ( | PurpleMimeDocument * | doc | ) |
Frees memory used in a MIME document and all of its parts and fields.
| doc | The MIME document to free. |
| 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.
| doc | The MIME document. |
| field | Case-insensitive field name. |
| GList * purple_mime_document_get_fields | ( | PurpleMimeDocument * | doc | ) |
The list of fields in the header of a document.
| doc | The MIME document. |
| GList * purple_mime_document_get_parts | ( | PurpleMimeDocument * | doc | ) |
The list of parts in a multipart document.
| doc | The MIME document. |
| PurpleMimeDocument * purple_mime_document_parse | ( | const char * | buf | ) |
Parse a MIME document from a NUL-terminated string.
| buf | The NULL-terminated string containing the MIME-encoded data. |
| PurpleMimeDocument * purple_mime_document_parsen | ( | const char * | buf, |
| gsize | len | ||
| ) |
Parse a MIME document from a string.
| buf | The string containing the MIME-encoded data. |
| len | Length of buf. |
| 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.
| doc | The MIME document. |
| field | Case-insensitive field name. |
| value | Value to associate with the indicated header field, of NULL to remove the field. |
| const char * purple_mime_part_get_data | ( | PurpleMimePart * | part | ) |
Get the (possibly encoded) data portion of a MIME document part.
| part | The MIME document part. |
| 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-transfer-encoding field.
If the specified encoding method is not supported, this function will return NULL.
| part | The MIME documemt part. |
| data | Buffer for the data. |
| len | The length of the buffer. |
| 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.
| part | The MIME document part. |
| field | Case-insensitive name of the header field. |
| GList * purple_mime_part_get_fields | ( | PurpleMimePart * | part | ) |
The list of fields in the header of a document part.
| part | The MIME document part. |
| gsize purple_mime_part_get_length | ( | PurpleMimePart * | part | ) |
Get the length of the data portion of a MIME document part.
| part | The MIME document part. |
| PurpleMimePart * purple_mime_part_new | ( | PurpleMimeDocument * | doc | ) |
Create and insert a new part into a MIME document.
| doc | The new part's parent MIME document. |
| 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.
| part | The part of the MIME document. |
| field | Case-insensitive field name |
| value | Value to associate with the indicated header field, of NULL to remove the field. |