![]() |
![]() |
![]() |
GMime Reference Manual | ![]() |
---|---|---|---|---|
GMimeMultipart; GMimeMultipart* g_mime_multipart_new (void); GMimeMultipart* g_mime_multipart_new_with_subtype (const char *subtype); void g_mime_multipart_set_preface (GMimeMultipart *multipart, const char *preface); const char* g_mime_multipart_get_preface (GMimeMultipart *multipart); void g_mime_multipart_set_postface (GMimeMultipart *multipart, const char *postface); const char* g_mime_multipart_get_postface (GMimeMultipart *multipart); void g_mime_multipart_set_boundary (GMimeMultipart *multipart, const char *boundary); const char* g_mime_multipart_get_boundary (GMimeMultipart *multipart); void g_mime_multipart_add_part (GMimeMultipart *multipart, GMimeObject *part); void g_mime_multipart_add_part_at (GMimeMultipart *multipart, GMimeObject *part, int index); int g_mime_multipart_get_number (GMimeMultipart *multipart); GMimeObject* g_mime_multipart_get_part (GMimeMultipart *multipart, int index); void g_mime_multipart_remove_part (GMimeMultipart *multipart, GMimeObject *part); GMimeObject* g_mime_multipart_remove_part_at (GMimeMultipart *multipart, int index); void g_mime_multipart_foreach (GMimeMultipart *multipart, GMimePartFunc callback, gpointer user_data); GMimeObject* g_mime_multipart_get_subpart_from_content_id (GMimeMultipart *multipart, const char *content_id);
GObject +----GMimeObject +----GMimeMultipart +----GMimeMultipartEncrypted +----GMimeMultipartSigned
GMimeMultipart* g_mime_multipart_new (void);
Creates a new MIME multipart object with a default content-type of multipart/mixed.
Returns : |
an empty 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
.
|
content-type subtype |
Returns : |
an empty MIME multipart object with a content-type of
multipart/subtype .
|
void g_mime_multipart_set_preface (GMimeMultipart *multipart, const char *preface);
Sets the preface on the multipart.
|
multipart |
|
preface |
const char* g_mime_multipart_get_preface (GMimeMultipart *multipart);
Gets the preface on the multipart.
|
multipart |
Returns : |
a pointer to the preface string on the multipart. |
void g_mime_multipart_set_postface (GMimeMultipart *multipart, const char *postface);
Sets the postface on the multipart.
|
multipart |
|
postface |
const char* g_mime_multipart_get_postface (GMimeMultipart *multipart);
Gets the postface on the multipart.
|
multipart |
Returns : |
a pointer to the postface string on the multipart. |
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.
|
multipart |
|
boundary or NULL to autogenerate one
|
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.
|
multipart |
Returns : |
the boundary on the multipart. |
void g_mime_multipart_add_part (GMimeMultipart *multipart, GMimeObject *part);
Adds a mime part to the multipart.
|
multipart |
|
mime part |
void g_mime_multipart_add_part_at (GMimeMultipart *multipart, GMimeObject *part, int index);
Adds a mime part to the multipart at the position index
.
|
multipart |
|
mime part |
|
position to insert the mime part |
int g_mime_multipart_get_number (GMimeMultipart *multipart);
Gets the number of mime parts contained within the multipart.
|
multipart |
Returns : |
the number of mime parts contained within the multipart. |
GMimeObject* g_mime_multipart_get_part (GMimeMultipart *multipart, int index);
Gets the mime part at position index
within the multipart.
|
multipart |
|
position of the mime part |
Returns : |
the mime part at position index .
|
void g_mime_multipart_remove_part (GMimeMultipart *multipart, GMimeObject *part);
Removes the specified mime part from the multipart.
|
multipart |
|
mime part |
GMimeObject* g_mime_multipart_remove_part_at (GMimeMultipart *multipart, int index);
Removes the mime part at position index
from the multipart.
|
multipart |
|
position of the mime part to remove |
Returns : |
the mime part that was removed. |
void g_mime_multipart_foreach (GMimeMultipart *multipart, GMimePartFunc callback, gpointer user_data);
Calls callback
on each of multipart
's subparts.
|
a multipart |
|
function to call for multipart and all of its subparts
|
|
extra data to pass to the callback |
GMimeObject* 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
.
|
a multipart |
|
the content id of the part to look for |
Returns : |
the GMimeObject whose content-id matches the search string,
or NULL if a match cannot be found.
|