MilterAgent 3 milter managerライブラリ
MilterAgent

## Functions

GQuark | milter_agent_error_quark ()
MilterEncoder * | milter_agent_get_encoder ()
MilterDecoder * | milter_agent_get_decoder ()
void | milter_agent_set_writer ()
void | milter_agent_set_reader ()
gboolean | milter_agent_write_packet ()
gboolean | milter_agent_flush ()
gboolean | milter_agent_start ()
void | milter_agent_shutdown ()
guint | milter_agent_get_tag ()
void | milter_agent_set_tag ()
MilterEventLoop * | milter_agent_get_event_loop ()
void | milter_agent_set_event_loop ()
gdouble | milter_agent_get_elapsed ()

## プロパティ

MilterDecoder * | decoder | Read
double | elapsed | Read
MilterEventLoop * | event-loop | Read / Write
MilterReader * | reader | Read / Write
guint | tag | Read / Write

## シグナル

void | flushed | Run Last

## Types and Values

#define | MILTER_AGENT_ERROR
enum | MilterAgentError
#define | MILTER_TYPE_AGENT
struct | MilterAgentClass
| MilterAgent

## オブジェクト階層

    GObject
        ╰── MilterAgent
            ├── MilterProtocolAgent
            ├── MilterManagerControllerContext
            ╰── MilterManagerProcessLauncher

## 実装されたインターフェイス

MilterAgent implements

## 説明

## Functions

### milter_agent_error_quark ()

    GQuark
    milter_agent_error_quark (void);

milter_agent_error_quark

### milter_agent_get_encoder ()

    MilterEncoder *
    milter_agent_get_encoder (MilterAgent *agent);

#### Parameters

agent | A MilterAgent. |

#### Returns

The encoder of the agent.

[transfer none]

milter_agent_get_encoder

### milter_agent_get_decoder ()

    MilterDecoder *
    milter_agent_get_decoder (MilterAgent *agent);

#### Parameters

agent | A MilterAgent. |

#### Returns

The decoder of the agent.

[transfer none]

milter_agent_get_decoder

### milter_agent_set_writer ()

    void
    milter_agent_set_writer (MilterAgent *agent,
                             MilterWriter *writer);

milter_agent_set_writer

### milter_agent_set_reader ()

    void
    milter_agent_set_reader (MilterAgent *agent,
                             MilterReader *reader);

milter_agent_set_reader

### milter_agent_write_packet ()

    gboolean
    milter_agent_write_packet (MilterAgent *agent,
                               const char *packet,
                               gsize packet_size,
                               GError **error);

milter_agent_write_packet

### milter_agent_flush ()

    gboolean
    milter_agent_flush (MilterAgent *agent,
                        GError **error);

milter_agent_flush

### milter_agent_start ()

    gboolean
    milter_agent_start (MilterAgent *agent,
                        GError **error);

milter_agent_start

### milter_agent_shutdown ()

    void
    milter_agent_shutdown (MilterAgent *agent);

milter_agent_shutdown

### milter_agent_get_tag ()

    guint
    milter_agent_get_tag (MilterAgent *agent);

milter_agent_get_tag

### milter_agent_set_tag ()

    void
    milter_agent_set_tag (MilterAgent *agent,
                          guint tag);

milter_agent_set_tag

### milter_agent_get_event_loop ()

    MilterEventLoop *
    milter_agent_get_event_loop (MilterAgent *agent);

#### Parameters

agent | A MilterAgent. |

#### Returns

The event loop of the agent.

[transfer none]

milter_agent_get_event_loop

### milter_agent_set_event_loop ()

    void
    milter_agent_set_event_loop (MilterAgent *agent,
                                 MilterEventLoop *loop);

Sets a new event loop.

#### Parameters

agent | A MilterAgent. |
loop | A MilterEventLoop to be used. |

milter_agent_set_event_loop

### milter_agent_get_elapsed ()

    gdouble
    milter_agent_get_elapsed (MilterAgent *agent);

milter_agent_get_elapsed

## Types and Values

### MILTER_AGENT_ERROR

    #define MILTER_AGENT_ERROR           (milter_agent_error_quark())

MILTER_AGENT_ERROR

### enum MilterAgentError

#### Members

MILTER_AGENT_ERROR_IO_ERROR |  |
MILTER_AGENT_ERROR_DECODE_ERROR |  |
MILTER_AGENT_ERROR_NO_EVENT_LOOP_ERROR |  |

MilterAgentError

### MILTER_TYPE_AGENT

    #define MILTER_TYPE_AGENT            (milter_agent_get_type())

MILTER_TYPE_AGENT

### struct MilterAgentClass

    struct MilterAgentClass {
        GObjectClass parent_class;

        MilterDecoder *(*decoder_new)   (MilterAgent *agent);
        MilterEncoder *(*encoder_new)   (MilterAgent *agent);
        gboolean       (*flush)         (MilterAgent *agent,
                                         GError     **error);

        void           (*flushed)       (MilterAgent *agent);
    };

MilterAgentClass

### MilterAgent

    typedef struct _MilterAgent MilterAgent;

MilterAgent

## プロパティ詳細

### The `“decoder”` property

    “decoder”                  MilterDecoder *

The decoder of the agent.

Owner: MilterAgent

Flags: Read

MilterAgent:decoder

### The `“elapsed”` property

    “elapsed”                  double

The elapsed time of the agent.

Owner: MilterAgent

Flags: Read

Allowed values: >= 0

デフォルト値: 0

MilterAgent:elapsed

### The `“event-loop”` property

    “event-loop”               MilterEventLoop *

The event loop of the agent.

Owner: MilterAgent

Flags: Read / Write

MilterAgent:event-loop

### The `“reader”` property

    “reader”                   MilterReader *

The reader of the agent.

Owner: MilterAgent

Flags: Read / Write

MilterAgent:reader

### The `“tag”` property

    “tag”                      guint

The tag of the agent.

Owner: MilterAgent

Flags: Read / Write

デフォルト値: 0

MilterAgent:tag

## シグナル詳細

### The `“flushed”` signal

    void
    user_function (MilterAgent *agent,
                   gpointer     user_data)

This signal is emitted when writer of the agent flushes requested data.

#### Parameters

agent | the agent that received the signal. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

MilterAgent::flushed