## GMimeMessagePartial

GMimeMessagePartial — Partial MIME parts

## Functions

GMimeMessagePartial * | g_mime_message_partial_new ()
const char * | g_mime_message_partial_get_id ()
int | g_mime_message_partial_get_number ()
int | g_mime_message_partial_get_total ()
GMimeMessage * | g_mime_message_partial_reconstruct_message ()
GMimeMessage ** | g_mime_message_partial_split_message ()

## Types and Values

struct | GMimeMessagePartial

## Object Hierarchy

        GObject
        ╰── GMimeObject
            ╰── GMimePart
                ╰── GMimeMessagePartial

## Description

A GMimeMessagePartial represents the message/partial MIME part.

## Functions

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

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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

#### Parameters

partials | an array of message/partial mime parts. | [array length=num][element-type GMimeMessagePartial]
num | the number of elements in `partials` |

#### Returns

a GMimeMessage object on success or `NULL` on fail.

[transfer full]

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

#### Parameters

message | message object |
max_size | max size |
nparts | number of parts. | [out]

#### Returns

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

[nullable][transfer full][array length=nparts]

## Types and Values

### struct GMimeMessagePartial

    struct GMimeMessagePartial;

A message/partial MIME part.

#### Members