MilterCommandEncoder 3 MILTER-MANAGER Library
MilterCommandEncoder

## Functions

MilterEncoder * | milter_command_encoder_new ()
void | milter_command_encoder_encode_negotiate ()
void | milter_command_encoder_encode_define_macro ()
void | milter_command_encoder_encode_connect ()
void | milter_command_encoder_encode_helo ()
void | milter_command_encoder_encode_envelope_from ()
void | milter_command_encoder_encode_envelope_recipient ()
void | milter_command_encoder_encode_data ()
void | milter_command_encoder_encode_header ()
void | milter_command_encoder_encode_end_of_header ()
void | milter_command_encoder_encode_body ()
void | milter_command_encoder_encode_body_bytes ()
void | milter_command_encoder_encode_end_of_message ()
void | milter_command_encoder_encode_abort ()
void | milter_command_encoder_encode_quit ()
void | milter_command_encoder_encode_unknown ()

## Object Hierarchy

        GObject
        ╰── MilterEncoder
            ╰── MilterCommandEncoder

## Description

## Functions

### milter_command_encoder_new ()

    MilterEncoder *
    milter_command_encoder_new (void);

milter_command_encoder_new

### milter_command_encoder_encode_negotiate ()

    void
    milter_command_encoder_encode_negotiate
                                   (MilterCommandEncoder *encoder,
                                    const gchar **packet,
                                    gsize *packet_size,
                                    MilterOption *option);

Encodes negotiate command.

#### Parameters

encoder | A MilterCommandEncoder. |
packet | Return location for encoded command. | [out][array length=packet_size][element-type guint8][transfer none]
packet_size | Return location for encoded command size in bytes. | [out]
option | A MilterOption. | [nullable]

milter_command_encoder_encode_negotiate

### milter_command_encoder_encode_define_macro ()

    void
    milter_command_encoder_encode_define_macro
                                   (MilterCommandEncoder *encoder,
                                    const gchar **packet,
                                    gsize *packet_size,
                                    MilterCommand context,
                                    GHashTable *macros);

milter_command_encoder_encode_define_macro

### milter_command_encoder_encode_connect ()

    void
    milter_command_encoder_encode_connect (MilterCommandEncoder *encoder,
                                           const gchar **packet,
                                           gsize *packet_size,
                                           const gchar *host_name,
                                           const struct sockaddr *address,
                                           socklen_t address_size);

Encodes connect command.

#### Parameters

encoder | A MilterCommandEncoder. |
packet | Return location for encoded command. | [out][array length=packet_size][element-type guint8][transfer none]
packet_size | Return location for encoded command size in bytes. | [out]
host_name | A host name connected. |
address | An address connected. | [array length=address_size][element-type guint8]
address_size | The size of address in bytes. |

milter_command_encoder_encode_connect

### milter_command_encoder_encode_helo ()

    void
    milter_command_encoder_encode_helo (MilterCommandEncoder *encoder,
                                        const gchar **packet,
                                        gsize *packet_size,
                                        const gchar *fqdn);

milter_command_encoder_encode_helo

### milter_command_encoder_encode_envelope_from ()

    void
    milter_command_encoder_encode_envelope_from
                                   (MilterCommandEncoder *encoder,
                                    const gchar **packet,
                                    gsize *packet_size,
                                    const gchar *from);

milter_command_encoder_encode_envelope_from

### milter_command_encoder_encode_envelope_recipient ()

    void
    milter_command_encoder_encode_envelope_recipient
                                   (MilterCommandEncoder *encoder,
                                    const gchar **packet,
                                    gsize *packet_size,
                                    const gchar *to);

milter_command_encoder_encode_envelope_recipient

### milter_command_encoder_encode_data ()

    void
    milter_command_encoder_encode_data (MilterCommandEncoder *encoder,
                                        const gchar **packet,
                                        gsize *packet_size);

milter_command_encoder_encode_data

### milter_command_encoder_encode_header ()

    void
    milter_command_encoder_encode_header (MilterCommandEncoder *encoder,
                                          const gchar **packet,
                                          gsize *packet_size,
                                          const gchar *name,
                                          const gchar *value);

milter_command_encoder_encode_header

### milter_command_encoder_encode_end_of_header ()

    void
    milter_command_encoder_encode_end_of_header
                                   (MilterCommandEncoder *encoder,
                                    const gchar **packet,
                                    gsize *packet_size);

milter_command_encoder_encode_end_of_header

### milter_command_encoder_encode_body ()

    void
    milter_command_encoder_encode_body (MilterCommandEncoder *encoder,
                                        const gchar **packet,
                                        gsize *packet_size,
                                        const gchar *chunk,
                                        gsize chunk_size,
                                        gsize *packed_size);

Encodes body command.

[skip]

#### Parameters

encoder | A MilterCommandEncoder. |
packet | Return location for encoded command. | [out][array length=packet_size][element-type guint8][transfer none]
packet_size | Return location for encoded command size in bytes. | [out]
chunk | A chunk of body. | [array length=chunk_size][element-type guint8]
chunk_size | The size of chunk in bytes. |
packed_size | Return location for packed size in bytes. | [out]

milter_command_encoder_encode_body

### milter_command_encoder_encode_body_bytes ()

    void
    milter_command_encoder_encode_body_bytes
                                   (MilterCommandEncoder *encoder,
                                    const gchar **packet,
                                    gsize *packet_size,
                                    GBytes *chunk,
                                    gsize *packed_size);

Encodes body command.

[rename-to milter_command_encoder_encode_body]

#### Parameters

encoder | A MilterCommandEncoder. |
packet | Return location for encoded command. | [out][array length=packet_size][element-type guint8][transfer none]
packet_size | Return location for encoded command size in bytes. | [out]
chunk | A chunk of body. |
packed_size | Return location for packed size in bytes. | [out]

milter_command_encoder_encode_body_bytes

### milter_command_encoder_encode_end_of_message ()

    void
    milter_command_encoder_encode_end_of_message
                                   (MilterCommandEncoder *encoder,
                                    const gchar **packet,
                                    gsize *packet_size,
                                    const gchar *chunk,
                                    gsize size);

milter_command_encoder_encode_end_of_message

### milter_command_encoder_encode_abort ()

    void
    milter_command_encoder_encode_abort (MilterCommandEncoder *encoder,
                                         const gchar **packet,
                                         gsize *packet_size);

Encodes abort command.

#### Parameters

encoder | A MilterCommandEncoder. |
packet | Return location for encoded command. | [out][array length=packet_size][element-type guint8][transfer none]
packet_size | Return location for encoded command size in bytes. | [out]

milter_command_encoder_encode_abort

### milter_command_encoder_encode_quit ()

    void
    milter_command_encoder_encode_quit (MilterCommandEncoder *encoder,
                                        const gchar **packet,
                                        gsize *packet_size);

milter_command_encoder_encode_quit

### milter_command_encoder_encode_unknown ()

    void
    milter_command_encoder_encode_unknown (MilterCommandEncoder *encoder,
                                           const gchar **packet,
                                           gsize *packet_size,
                                           const gchar *command);

milter_command_encoder_encode_unknown