Details
enum GMimePartEncodingType
typedef enum {
GMIME_PART_ENCODING_DEFAULT,
GMIME_PART_ENCODING_7BIT,
GMIME_PART_ENCODING_8BIT,
GMIME_PART_ENCODING_BINARY,
GMIME_PART_ENCODING_BASE64,
GMIME_PART_ENCODING_QUOTEDPRINTABLE,
GMIME_PART_ENCODING_UUENCODE,
GMIME_PART_NUM_ENCODINGS
} GMimePartEncodingType; |
struct GMimePart
struct GMimePart {
GMimeObject parent_object;
GMimeHeader *headers;
GMimeContentType *mime_type;
GMimePartEncodingType encoding;
GMimeDisposition *disposition;
char *description;
char *content_id;
char *content_md5;
char *content_location;
GMimeDataWrapper *content;
GList *children; /* of type GMimePart */
}; |
GMimePartFunc ()
void (*GMimePartFunc) (GMimePart *part,
gpointer data); |
g_mime_part_new ()
Creates a new MIME Part object with a default content-type of
text/plain.
g_mime_part_new_with_type ()
GMimePart* g_mime_part_new_with_type (const char *type,
const char *subtype); |
Creates a new MIME Part with a sepcified type.
g_mime_part_set_content_header ()
void g_mime_part_set_content_header (GMimePart *mime_part,
const char *header,
const char *value); |
Set an arbitrary MIME content header.
g_mime_part_get_content_header ()
const char* g_mime_part_get_content_header (GMimePart *mime_part,
const char *header); |
Gets the value of the requested header if it exists, or NULL
otherwise.
g_mime_part_set_content_description ()
void g_mime_part_set_content_description
(GMimePart *mime_part,
const char *description); |
Set the content description for the specified mime part.
g_mime_part_get_content_description ()
const char* g_mime_part_get_content_description
(const GMimePart *mime_part); |
Gets the value of the Content-Description for the specified mime
part if it exists or NULL otherwise.
g_mime_part_set_content_id ()
void g_mime_part_set_content_id (GMimePart *mime_part,
const char *content_id); |
Set the content id for the specified mime part.
g_mime_part_get_content_id ()
const char* g_mime_part_get_content_id (GMimePart *mime_part); |
Gets the content-id of the specified mime part if it exists, or
NULL otherwise.
g_mime_part_set_content_md5 ()
void g_mime_part_set_content_md5 (GMimePart *mime_part,
const char *content_md5); |
Set the content md5 for the specified mime part.
g_mime_part_get_content_md5 ()
const char* g_mime_part_get_content_md5 (GMimePart *mime_part); |
Gets the md5sum contained in the Content-Md5 header of the
specified mime part if it exists, or NULL otherwise.
g_mime_part_verify_content_md5 ()
gboolean g_mime_part_verify_content_md5 (GMimePart *mime_part); |
Verify the content md5 for the specified mime part.
g_mime_part_set_content_location ()
void g_mime_part_set_content_location
(GMimePart *mime_part,
const char *content_location); |
Sets the content location for the specified mime part.
g_mime_part_get_content_location ()
const char* g_mime_part_get_content_location
(GMimePart *mime_part); |
Gets the value of the Content-Location header if it exists, or
NULL otherwise.
g_mime_part_set_content_type ()
Set the content type/subtype for the specified mime part.
g_mime_part_get_content_type ()
Gets the Content-Type object for the given mime part or NULL on
error.
g_mime_part_set_encoding ()
Sets the content encoding for the specified mime part. Available
values for the encoding are: GMIME_PART_ENCODING_DEFAULT,
GMIME_PART_ENCODING_7BIT, GMIME_PART_ENCODING_8BIT,
GMIME_PART_ENCODING_BINARY, GMIME_PART_ENCODING_BASE64,
GMIME_PART_ENCODING_QUOTEDPRINTABLE or
GMIME_PART_ENCODING_UUENCODE.
g_mime_part_get_encoding ()
Gets the content encoding of the mime part.
g_mime_part_encoding_to_string ()
Gets the string value of the content encoding.
g_mime_part_encoding_from_string ()
Gets the content encoding enumeration value based on the input
string.
g_mime_part_set_content_disposition_object ()
Set the content disposition for the specified mime part
g_mime_part_set_content_disposition ()
void g_mime_part_set_content_disposition
(GMimePart *mime_part,
const char *disposition); |
Set the content disposition for the specified mime part
g_mime_part_get_content_disposition ()
const char* g_mime_part_get_content_disposition
(GMimePart *mime_part); |
Gets the content disposition if set or NULL otherwise.
g_mime_part_add_content_disposition_parameter ()
void g_mime_part_add_content_disposition_parameter
(GMimePart *mime_part,
const char *attribute,
const char *value); |
Add a content-disposition parameter to the specified mime part.
g_mime_part_get_content_disposition_parameter ()
const char* g_mime_part_get_content_disposition_parameter
(GMimePart *mime_part,
const char *attribute); |
Gets the value of the Content-Disposition parameter specified by
attribute, or NULL if the parameter does not exist.
g_mime_part_set_filename ()
void g_mime_part_set_filename (GMimePart *mime_part,
const char *filename); |
Sets the "filename" parameter on the Content-Disposition and also
sets the "name" parameter on the Content-Type.
g_mime_part_get_filename ()
const char* g_mime_part_get_filename (const GMimePart *mime_part); |
Gets the filename of the specificed mime part, or NULL if the mime
part does not have the filename or name parameter set.
g_mime_part_set_boundary ()
void g_mime_part_set_boundary (GMimePart *mime_part,
const char *boundary); |
Sets the boundary on the multipart mime part to boundary. If
boundary is NULL, a random boundary will be generated for you.
g_mime_part_get_boundary ()
const char* g_mime_part_get_boundary (GMimePart *mime_part); |
Gets the multipart boundary or NULL on error.
g_mime_part_set_content ()
void g_mime_part_set_content (GMimePart *mime_part,
const char *content,
size_t len); |
Sets the content of the Mime Part (only non-multiparts)
g_mime_part_set_pre_encoded_content ()
Sets the encoding type and raw content on the mime part after
decoding the content.
g_mime_part_set_content_byte_array ()
void g_mime_part_set_content_byte_array
(GMimePart *mime_part,
GByteArray *content); |
Sets the content of the Mime Part (only non-multiparts)
g_mime_part_get_content ()
const char* g_mime_part_get_content (const GMimePart *mime_part,
size_t *len); |
Gets the raw contents of the mime part and sets len to the length
of the raw data buffer.
g_mime_part_get_content_object ()
Gets the internal data-wrapper of the specified mime part, or NULL
on error.
g_mime_part_set_content_object ()
Sets the content object on the mime part.
g_mime_part_add_subpart ()
Adds a subpart to the parent mime part which *must* be a
multipart.
g_mime_part_write_to_stream ()
Writes the contents of the MIME Part to stream.
g_mime_part_to_string ()
char* g_mime_part_to_string (GMimePart *mime_part); |
Allocates a string buffer containing the MIME Part.
g_mime_part_foreach ()
Calls callback on mime_part and each of it's subparts.
g_mime_part_get_subpart_from_content_id ()
const GMimePart* g_mime_part_get_subpart_from_content_id
(GMimePart *mime_part,
const char *content_id); |
Gets the mime part with the content-id content_id from the
multipart mime_part.