GMimeMessagePartial

GMimeMessagePartial — Partial MIME parts

Synopsis

struct              GMimeMessagePartial;
GMimeMessagePartial * g_mime_message_partial_new        (const char *id,
                                                         int number,
                                                         int total);
const char *        g_mime_message_partial_get_id       (GMimeMessagePartial *partial);
int                 g_mime_message_partial_get_number   (GMimeMessagePartial *partial);
int                 g_mime_message_partial_get_total    (GMimeMessagePartial *partial);
GMimeMessage *      g_mime_message_partial_reconstruct_message
                                                        (GMimeMessagePartial **partials,
                                                         size_t num);
GMimeMessage **     g_mime_message_partial_split_message
                                                        (GMimeMessage *message,
                                                         size_t max_size,
                                                         size_t *nparts);

Object Hierarchy

  GObject
   +----GMimeObject
         +----GMimePart
               +----GMimeMessagePartial

Description

A GMimeMessagePartial represents the message/partial MIME part.

Details

struct GMimeMessagePartial

struct GMimeMessagePartial;

A message/partial MIME part.


g_mime_message_partial_new ()

GMimeMessagePartial * g_mime_message_partial_new        (const char *id,
                                                         int number,
                                                         int total);

Creates a new MIME message/partial object.

id :

message/partial part id

number :

message/partial part number

total :

total number of message/partial parts

Returns :

an empty MIME message/partial object.

g_mime_message_partial_get_id ()

const char *        g_mime_message_partial_get_id       (GMimeMessagePartial *partial);

Gets the message/partial id parameter value.

partial :

message/partial object

Returns :

the message/partial id or NULL on fail.

g_mime_message_partial_get_number ()

int                 g_mime_message_partial_get_number   (GMimeMessagePartial *partial);

Gets the message/partial part number.

partial :

message/partial object

Returns :

the message/partial part number or -1 on fail.

g_mime_message_partial_get_total ()

int                 g_mime_message_partial_get_total    (GMimeMessagePartial *partial);

Gets the total number of message/partial parts needed to reconstruct the original message.

partial :

message/partial object

Returns :

the total number of message/partial parts needed to reconstruct the original message or -1 on fail.

g_mime_message_partial_reconstruct_message ()

GMimeMessage *      g_mime_message_partial_reconstruct_message
                                                        (GMimeMessagePartial **partials,
                                                         size_t num);

Reconstructs the GMimeMessage from the given message/partial parts in partials.

partials :

an array of message/partial mime parts

num :

the number of elements in partials

Returns :

a GMimeMessage object on success or NULL on fail.

g_mime_message_partial_split_message ()

GMimeMessage **     g_mime_message_partial_split_message
                                                        (GMimeMessage *message,
                                                         size_t max_size,
                                                         size_t *nparts);

Splits message into an array of GMimeMessage objects each containing a single GMimeMessagePartial object containing max_size bytes or fewer. nparts is set to the number of GMimeMessagePartial objects created.

message :

message object

max_size :

max size

nparts :

number of parts

Returns :

an array of GMimeMessage objects and sets nparts to th number of messages returned or NULL on fail.