gmime-multipart

Name

gmime-multipart -- 

Synopsis



struct      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);
const GMimeObject* g_mime_multipart_get_subpart_from_content_id
                                            (GMimeMultipart *multipart,
                                             const char *content_id);


Object Hierarchy


  GObject
   +----GMimeObject
         +----GMimeMultipart

Description

Details

struct GMimeMultipart

struct GMimeMultipart;


g_mime_multipart_new ()

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.


g_mime_multipart_new_with_subtype ()

GMimeMultipart* g_mime_multipart_new_with_subtype
                                            (const char *subtype);

Creates a new MIME multipart object with a content-type of multipart/subtype.

subtype :

content-type subtype

Returns :

an empty MIME multipart object with a content-type of multipart/subtype.


g_mime_multipart_set_preface ()

void        g_mime_multipart_set_preface    (GMimeMultipart *multipart,
                                             const char *preface);

Sets the preface on the multipart.

multipart :

multipart

preface :

preface


g_mime_multipart_get_preface ()

const char* g_mime_multipart_get_preface    (GMimeMultipart *multipart);

Gets the preface on the multipart.

multipart :

multipart

Returns :

a pointer to the preface string on the multipart.


g_mime_multipart_set_postface ()

void        g_mime_multipart_set_postface   (GMimeMultipart *multipart,
                                             const char *postface);

Sets the postface on the multipart.

multipart :

multipart

postface :

postface


g_mime_multipart_get_postface ()

const char* g_mime_multipart_get_postface   (GMimeMultipart *multipart);

Gets the postface on the multipart.

multipart :

multipart

Returns :

a pointer to the postface string on the multipart.


g_mime_multipart_set_boundary ()

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 :

multipart

boundary :

boundary or NULL to autogenerate one


g_mime_multipart_get_boundary ()

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 :

multipart

Returns :

the boundary on the multipart.


g_mime_multipart_add_part ()

void        g_mime_multipart_add_part       (GMimeMultipart *multipart,
                                             GMimeObject *part);

Adds a mime part to the multipart.

multipart :

multipart

part :

mime part


g_mime_multipart_add_part_at ()

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 :

multipart

part :

mime part

index :

position to insert the mime part


g_mime_multipart_get_number ()

int         g_mime_multipart_get_number     (GMimeMultipart *multipart);

Gets the number of mime parts contained within the multipart.

multipart :

multipart

Returns :

the number of mime parts contained within the multipart.


g_mime_multipart_get_part ()

GMimeObject* g_mime_multipart_get_part      (GMimeMultipart *multipart,
                                             int index);

Gets the mime part at position index within the multipart.

multipart :

multipart

index :

position of the mime part

Returns :

the mime part at position index.


g_mime_multipart_remove_part ()

void        g_mime_multipart_remove_part    (GMimeMultipart *multipart,
                                             GMimeObject *part);

Removes the specified mime part from the multipart.

multipart :

multipart

part :

mime part


g_mime_multipart_remove_part_at ()

GMimeObject* g_mime_multipart_remove_part_at
                                            (GMimeMultipart *multipart,
                                             int index);

Removes the mime part at position index from the multipart.

multipart :

multipart

index :

position of the mime part to remove

Returns :

the mime part that was removed.


g_mime_multipart_foreach ()

void        g_mime_multipart_foreach        (GMimeMultipart *multipart,
                                             GMimePartFunc callback,
                                             gpointer user_data);

Calls callback on multipart and each of its subparts.

multipart :

a multipart

callback :

function to call for multipart and all of its subparts

user_data :

extra data to pass to the callback


g_mime_multipart_get_subpart_from_content_id ()

const 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.

multipart :

a multipart

content_id :

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.