MilterCommandEncoder
3
milter managerライブラリ

# MilterCommandEncoder

## 概要

    struct              MilterCommandEncoder;
    MilterEncoder *     milter_command_encoder_new          (void);
    void                milter_command_encoder_encode_negotiate
                                                            (MilterCommandEncoder *encoder,
                                                             const gchar **packet,
                                                             gsize *packet_size,
                                                             MilterOption *option);
    void                milter_command_encoder_encode_define_macro
                                                            (MilterCommandEncoder *encoder,
                                                             const gchar **packet,
                                                             gsize *packet_size,
                                                             MilterCommand context,
                                                             GHashTable *macros);
    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);
    void                milter_command_encoder_encode_helo  (MilterCommandEncoder *encoder,
                                                             const gchar **packet,
                                                             gsize *packet_size,
                                                             const gchar *fqdn);
    void                milter_command_encoder_encode_envelope_from
                                                            (MilterCommandEncoder *encoder,
                                                             const gchar **packet,
                                                             gsize *packet_size,
                                                             const gchar *from);
    void                milter_command_encoder_encode_envelope_recipient
                                                            (MilterCommandEncoder *encoder,
                                                             const gchar **packet,
                                                             gsize *packet_size,
                                                             const gchar *to);
    void                milter_command_encoder_encode_data  (MilterCommandEncoder *encoder,
                                                             const gchar **packet,
                                                             gsize *packet_size);
    void                milter_command_encoder_encode_header
                                                            (MilterCommandEncoder *encoder,
                                                             const gchar **packet,
                                                             gsize *packet_size,
                                                             const gchar *name,
                                                             const gchar *value);
    void                milter_command_encoder_encode_end_of_header
                                                            (MilterCommandEncoder *encoder,
                                                             const gchar **packet,
                                                             gsize *packet_size);
    void                milter_command_encoder_encode_body  (MilterCommandEncoder *encoder,
                                                             const gchar **packet,
                                                             gsize *packet_size,
                                                             const gchar *chunk,
                                                             gsize size,
                                                             gsize *packed_size);
    void                milter_command_encoder_encode_end_of_message
                                                            (MilterCommandEncoder *encoder,
                                                             const gchar **packet,
                                                             gsize *packet_size,
                                                             const gchar *chunk,
                                                             gsize size);
    void                milter_command_encoder_encode_abort (MilterCommandEncoder *encoder,
                                                             const gchar **packet,
                                                             gsize *packet_size);
    void                milter_command_encoder_encode_quit  (MilterCommandEncoder *encoder,
                                                             const gchar **packet,
                                                             gsize *packet_size);
    void                milter_command_encoder_encode_unknown
                                                            (MilterCommandEncoder *encoder,
                                                             const gchar **packet,
                                                             gsize *packet_size,
                                                             const gchar *command);

## 説明

## 詳細

### struct MilterCommandEncoder

    struct MilterCommandEncoder {
        MilterEncoder object;
    };

### milter_command_encoder_new ()

    MilterEncoder *     milter_command_encoder_new          (void);

### milter_command_encoder_encode_negotiate ()

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

### 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_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);

### 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_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_recipient ()

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

### milter_command_encoder_encode_data ()

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

### 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_end_of_header ()

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

### milter_command_encoder_encode_body ()

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

### 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_abort ()

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

### milter_command_encoder_encode_quit ()

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

### milter_command_encoder_encode_unknown ()

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