| Top |
| GMimeMultipart * | g_mime_multipart_new () |
| GMimeMultipart * | g_mime_multipart_new_with_subtype () |
| void | g_mime_multipart_set_preamble () |
| const char * | g_mime_multipart_get_preamble () |
| void | g_mime_multipart_set_epilogue () |
| const char * | g_mime_multipart_get_epilogue () |
| void | g_mime_multipart_set_boundary () |
| const char * | g_mime_multipart_get_boundary () |
| int | g_mime_multipart_get_count () |
| gboolean | g_mime_multipart_contains () |
| int | g_mime_multipart_index_of () |
| void | g_mime_multipart_add () |
| void | g_mime_multipart_clear () |
| void | g_mime_multipart_insert () |
| gboolean | g_mime_multipart_remove () |
| GMimeEntity * | g_mime_multipart_remove_at () |
| GMimeEntity * | g_mime_multipart_replace () |
| GMimeEntity * | g_mime_multipart_get_part () |
| gboolean | g_mime_multipart_try_get_value () |
| void | g_mime_multipart_foreach () |
| GMimeEntity * | g_mime_multipart_get_subpart_from_content_id () |
GMimeMultipart *
g_mime_multipart_new (void);
Creates a new MIME multipart object with a default content-type of multipart/mixed.
GMimeMultipart *
g_mime_multipart_new_with_subtype (const char *subtype);
Creates a new MIME multipart object with a content-type of
multipart/subtype
.
void g_mime_multipart_set_preamble (GMimeMultipart *multipart,const char *preamble);
Sets the preamble on the multipart, folding at linear whitespace using the default formatting options and ending a nonempty final line with a newline. Oversized words remain intact. Assigning the current decoded value preserves the original bytes instead of refolding them.
multipart |
a GMimeMultipart object |
|
preamble |
UTF-8 preamble, or |
[nullable] |
const char *
g_mime_multipart_get_preamble (GMimeMultipart *multipart);
Gets the preamble on the multipart.
Parsed bytes are retained separately from this decoded UTF-8 view. Embedded NUL characters become U+FFFD so the rest of the text remains visible without changing the original bytes. Assigning this same view back preserves them.
void g_mime_multipart_set_epilogue (GMimeMultipart *multipart,const char *epilogue);
Sets the epilogue on the multipart, folding at linear whitespace using the default formatting options and ending a nonempty final line with a newline. The raw bytes include the closing boundary's newline, which is omitted from the decoded view. Assigning the current decoded value preserves the bytes.
multipart |
a GMimeMultipart object |
|
epilogue |
UTF-8 epilogue, or |
[nullable] |
const char *
g_mime_multipart_get_epilogue (GMimeMultipart *multipart);
Gets the epilogue on the multipart.
The parsed UTF-8 view omits the closing boundary's first newline. Embedded NUL characters become U+FFFD without changing the original bytes. Assigning this same view back preserves them.
void g_mime_multipart_set_boundary (GMimeMultipart *multipart,const char *boundary);
Sets boundary
as the boundary on the multipart. If boundary
is
NULL, then a boundary will be auto-generated for you. Valid boundary
values are preserved without trimming, including leading spaces.
multipart |
a GMimeMultipart object |
|
boundary |
a valid MIME boundary (1 to 70 ASCII characters), or |
const char *
g_mime_multipart_get_boundary (GMimeMultipart *multipart);
Gets the boundary on the multipart. If the internal boundary is
NULL, then an auto-generated boundary will be set on the multipart
and returned.
int
g_mime_multipart_get_count (GMimeMultipart *multipart);
Gets the number of parts contained within multipart
.
gboolean g_mime_multipart_contains (GMimeMultipart *multipart,GMimeEntity *part);
Checks if part
is contained within multipart
.
int g_mime_multipart_index_of (GMimeMultipart *multipart,GMimeEntity *part);
Gets the 0-based index of part
within multipart
.
void g_mime_multipart_add (GMimeMultipart *multipart,GMimeEntity *part);
Appends a mime part to multipart
.
void
g_mime_multipart_clear (GMimeMultipart *multipart);
Removes all subparts from multipart
.
void g_mime_multipart_insert (GMimeMultipart *multipart,int index,GMimeEntity *part);
Inserts part
into multipart
at the specified index
.
multipart |
a GMimeMultipart object |
|
part |
||
index |
an index between zero and the part count, inclusive |
gboolean g_mime_multipart_remove (GMimeMultipart *multipart,GMimeEntity *part);
Removes the specified part
from multipart
.
GMimeEntity * g_mime_multipart_remove_at (GMimeMultipart *multipart,int index);
Removes the part at the specified index
from multipart
.
GMimeEntity * g_mime_multipart_replace (GMimeMultipart *multipart,int index,GMimeEntity *replacement);
Replaces the part at the specified index
within multipart
with
replacement
.
multipart |
a GMimeMultipart object |
|
index |
the 0-based index of the part to replace |
|
replacement |
a GMimeEntity to use as the replacement |
GMimeEntity * g_mime_multipart_get_part (GMimeMultipart *multipart,int index);
Gets the part at the specified index
within the multipart.
gboolean g_mime_multipart_try_get_value (GMimeMultipart *multipart,GMimeTextFormat format,GMimeTextPart **body);
Finds a body part in format
without decoding or copying its content.
The default implementation scans forwards, skipping non-text parts and
attached text parts. It stops after the first nested multipart, even if
that multipart has no match, or the first non-attachment text part, even
if it has the wrong format. Embedded messages are not entered.
Subclasses may override selection. GMimeMultipartAlternative searches backwards and considers attached text parts. Selection follows the object's class, not changes to its Content-Type subtype.
Plain format also matches flowed text. Compressed rich text and unknown
formats do not match any text part. No match returns FALSE and sets
body
to NULL.
multipart |
||
format |
the requested text format |
|
body |
the selected original text part. |
[out][nullable][transfer none] |
void g_mime_multipart_foreach (GMimeMultipart *multipart,GMimeEntityForeachFunc callback,gpointer user_data);
Recursively calls callback
on each of multipart
's subparts.
multipart |
||
callback |
function to call for each of |
[scope call] |
user_data |
user-supplied callback data |
GMimeEntity * g_mime_multipart_get_subpart_from_content_id (GMimeMultipart *multipart,const char *content_id);
Gets the mime part with the content-id content_id
from the
multipart multipart
.
the GMimeEntity whose content-id matches
the search string, or NULL if a match cannot be found.