Next: , Previous: Mailer, Up: libmailbox


3.1.4 Message

     /* Prefix mu_message_ is reserved. */
     #include <mailutils/message.h>
     

The mu_message_t object is a convenient way to manipulate messages. It encapsulates the envelope_t, the header_t and the body_t.

         mailbox_t
         ----------                   mu_message_t
        (message[1])        +------>+--------------------+
         ----------         |       |  mu_envelope_t     |
        (message[2])        |       |--------------------|
         ----------         |       |  mu_header_t       |
        (message[3])--------+       |--------------------|
         ----------                 |  mu_body_t         |
        (message[n])                |--------------------|
         ----------                 |  mu_attribute_t    |
                                    |--------------------|
                                    |  mu_stream_t       |
                                    +--------------------+
— Function: void mu_message_create (mu_message_t *msg, void *owner)
— Function: void mu_message_destroy (mu_message_t *msg, void *owner)

The resources allocate for msg are freed.

— Function: int mu_message_create_copy (mu_message_t *to, mu_message_t *from)
— Function: void* mu_message_get_owner (mu_message_t msg)
— Function: int mu_message_is_modified (mu_message_t msg)
— Function: int mu_message_clear_modified (mu_message_t msg)
— Function: int mu_message_get_mailbox (mu_message_t msg, mu_mailbox_t *mbox)
— Function: int mu_message_set_mailbox (mu_message_t msg, mu_mailbox_t mbox, void *owner)
— Function: int mu_message_ref (mu_message_t msg)
— Function: int mu_message_get_envelope (mu_message_t msg, mu_envelope_t *envelope)
— Function: int mu_message_set_envelope (mu_message_t msg, mu_envelope_t envelope, void *owner)
— Function: int mu_message_get_header (mu_message_t msg, mu_header_t *header)

Retrieve msg header.

— Function: int mu_message_set_header (mu_message_t msg, mu_header_t header, void *owner)
— Function: int mu_message_get_body (mu_message_t msg, mu_body_t *body)
— Function: int mu_message_set_body (mu_message_t msg, mu_body_t body, void *owner)
— Function: int mu_message_get_stream (mu_message_t msg, mu_stream_t *stream)
— Function: int mu_message_set_stream (mu_message_t msg, mu_stream_t stream, void *owner)
— Function: int mu_message_get_attribute (mu_message_t msg, mu_attribute_t *attribute)
— Function: int mu_message_set_attribute (mu_message_t msg, mu_attribute_t attribute, void *owner)
— Function: int mu_message_get_observable (mu_message_t msg, mu_observable_t *observable)
— Function: int mu_message_is_multipart (mu_message_t msg, int *multi)

Set *multi to non-zero value if msg is multi-part.

— Function: int mu_message_set_is_multipart (mu_message_t msg, int (*_is_multipart) (mu_message_t, int *), void *);
— Function: int mu_message_size (mu_message_t msg, size_t *size)
— Function: int mu_message_set_size (mu_message_t msg, int (*_size) (mu_message_t, size_t *), void *owner)
— Function: int mu_message_lines (mu_message_t msg, size_t *size)
— Function: int mu_message_set_lines (mu_message_t msg, int (*_lines) (mu_message_t, size_t *), void *owner)
— Function: int mu_message_get_num_parts (mu_message_t msg, size_t *nparts)
— Function: int mu_message_set_get_num_parts (mu_message_t msg, int (*_get_num_parts) (mu_message_t, size_t *), void *owner)
— Function: int mu_message_get_part (mu_message_t msg, size_t part, mu_message_t *msg)
— Function: int mu_message_set_get_part (mu_message_t msg, int (*_get_part) (mu_message_t, size_t, mu_message_t *), void *owner)
— Function: int mu_message_get_uidl (mu_message_t msg, char *buffer, size_t buflen, size_t *writen)
— Function: int mu_message_set_uidl (mu_message_t msg, int (*_get_uidl) (mu_message_t, char *, size_t, size_t *), void *owner)
— Function: int mu_message_get_uid (mu_message_t msg, size_t *uid)
— Function: int mu_message_set_uid (mu_message_t msg, int (*_get_uid) (mu_message_t, size_t *), void *owner)
— Function: int mu_message_create_attachment (const char *content_type, const char *encoding, const char *filename, mu_message_t *newmsg)
— Function: int mu_message_save_attachment (mu_message_t msg, const char *filename, void **data)
— Function: int mu_message_encapsulate (mu_message_t msg, mu_message_t *newmsg, void **data)
— Function: int mu_message_unencapsulate (mu_message_t msg, mu_message_t *newmsg, void **data);
— Function: int mu_message_get_attachment_name (mu_message_t msg, char *name, size_t bufsize, size_t *size);
— Function: int mu_message_aget_attachment_name (mu_message_t msg, char **name);
— Function: int mu_message_save_to_mailbox (mu_message_t msg, mu_ticket_t ticket, mu_debug_t debug, const char *toname);