MilterEventLoop 3 MILTER-MANAGER Library
MilterEventLoop

## Functions

void | (*MilterEventLoopCustomRunFunc) ()
gboolean | (*MilterEventLoopCustomIterateFunc) ()
GQuark | milter_event_loop_error_quark ()
void | milter_event_loop_run ()
gboolean | milter_event_loop_is_running ()
void | milter_event_loop_run_without_custom ()
void | milter_event_loop_set_custom_run_func ()
MilterEventLoopCustomRunFunc | milter_event_loop_get_custom_run_func ()
gboolean | milter_event_loop_iterate ()
gboolean | milter_event_loop_iterate_without_custom ()
void | milter_event_loop_set_custom_iterate_func ()
MilterEventLoopCustomIterateFunc | milter_event_loop_get_custom_iterate_func ()
void | milter_event_loop_quit ()
guint | milter_event_loop_watch_io ()
guint | milter_event_loop_watch_io_full ()
guint | milter_event_loop_watch_child ()
guint | milter_event_loop_watch_child_full ()
guint | milter_event_loop_add_timeout ()
guint | milter_event_loop_add_timeout_full ()
guint | milter_event_loop_add_idle ()
guint | milter_event_loop_add_idle_full ()
gboolean | milter_event_loop_remove ()

## Properties

gpointer | custom-run | Read / Write

## Types and Values

#define | MILTER_EVENT_LOOP_ERROR
enum | MilterEventLoopError

## Object Hierarchy

        GObject
        ╰── MilterEventLoop
            ├── MilterGLibEventLoop
            ╰── MilterLibevEventLoop

## Description

## Functions

### MilterEventLoopCustomRunFunc ()

    void
    (*MilterEventLoopCustomRunFunc) (MilterEventLoop *loop);

MilterEventLoopCustomRunFunc

### MilterEventLoopCustomIterateFunc ()

    gboolean
    (*MilterEventLoopCustomIterateFunc) (MilterEventLoop *loop,
                                         gboolean may_block,
                                         gpointer user_data);

MilterEventLoopCustomIterateFunc

### milter_event_loop_error_quark ()

    GQuark
    milter_event_loop_error_quark (void);

milter_event_loop_error_quark

### milter_event_loop_run ()

    void
    milter_event_loop_run (MilterEventLoop *loop);

milter_event_loop_run

### milter_event_loop_is_running ()

    gboolean
    milter_event_loop_is_running (MilterEventLoop *loop);

milter_event_loop_is_running

### milter_event_loop_run_without_custom ()

    void
    milter_event_loop_run_without_custom (MilterEventLoop *loop);

milter_event_loop_run_without_custom

### milter_event_loop_set_custom_run_func ()

    void
    milter_event_loop_set_custom_run_func (MilterEventLoop *loop,
                                           MilterEventLoopCustomRunFunc custom_run);

Set the custom event runner function to the event loop.

[skip]

#### Parameters

loop | A MilterEventLoop. |
custom_run | A MilterEventLoopCustomRunFunc. |

milter_event_loop_set_custom_run_func

### milter_event_loop_get_custom_run_func ()

    MilterEventLoopCustomRunFunc
    milter_event_loop_get_custom_run_func (MilterEventLoop *loop);

[skip]

#### Parameters

loop | A MilterEventLoop. |

#### Returns

The current custom runner function of this event loop.

[nullable]

milter_event_loop_get_custom_run_func

### milter_event_loop_iterate ()

    gboolean
    milter_event_loop_iterate (MilterEventLoop *loop,
                               gboolean may_block);

milter_event_loop_iterate

### milter_event_loop_iterate_without_custom ()

    gboolean
    milter_event_loop_iterate_without_custom
                                   (MilterEventLoop *loop,
                                    gboolean may_block);

milter_event_loop_iterate_without_custom

### milter_event_loop_set_custom_iterate_func ()

    void
    milter_event_loop_set_custom_iterate_func
                                   (MilterEventLoop *loop,
                                    MilterEventLoopCustomIterateFunc custom_iterate,
                                    gpointer user_data,
                                    GDestroyNotify destroy);

milter_event_loop_set_custom_iterate_func

### milter_event_loop_get_custom_iterate_func ()

    MilterEventLoopCustomIterateFunc
    milter_event_loop_get_custom_iterate_func
                                   (MilterEventLoop *loop);

[skip]

#### Parameters

loop | A MilterEventLoop. |

#### Returns

The current custom iterate function of this event loop.

[nullable]

milter_event_loop_get_custom_iterate_func

### milter_event_loop_quit ()

    void
    milter_event_loop_quit (MilterEventLoop *loop);

milter_event_loop_quit

### milter_event_loop_watch_io ()

    guint
    milter_event_loop_watch_io (MilterEventLoop *loop,
                                GIOChannel *channel,
                                GIOCondition condition,
                                GIOFunc function,
                                gpointer user_data);

This equals to `milter_event_loop_watch_io_full(loop, G_PRIORITY_DEFAULT, channel, condition, function, user_data, NULL)`.

[skip]

#### Parameters

loop | A MilterEventLoop. |
channel | A GIOChannel. |
condition | The condition to watch for. |
function | The function to call when the condition is satisfied. |
user_data | User data to pass to function . |

#### Returns

The event source ID.

milter_event_loop_watch_io

### milter_event_loop_watch_io_full ()

    guint
    milter_event_loop_watch_io_full (MilterEventLoop *loop,
                                     gint priority,
                                     GIOChannel *channel,
                                     GIOCondition condition,
                                     GIOFunc function,
                                     gpointer user_data,
                                     GDestroyNotify notify);

[rename-to milter_event_loop_watch_io]

#### Parameters

loop | A MilterEventLoop. |
priority | The priority of the GIOChannel source. |
channel | A GIOChannel. |
condition | The condition to watch for. |
function | The function to call when the condition is satisfied. |
user_data | User data to pass to function . |
notify | The function to call when the source is removed. | [nullable]

#### Returns

The event source ID.

milter_event_loop_watch_io_full

### milter_event_loop_watch_child ()

    guint
    milter_event_loop_watch_child (MilterEventLoop *loop,
                                   GPid pid,
                                   GChildWatchFunc function,
                                   gpointer user_data);

This equals to `milter_event_loop_watch_child_full(loop, G_PRIORITY_DEFAULT, pid, function, user_data, NULL)`.

[skip]

#### Parameters

loop | A MilterEventLoop. |
pid | An ID of the process to watch. |
function | The function to call when the child is finished. |
user_data | User data to pass to function . |

#### Returns

The event source ID.

milter_event_loop_watch_child

### milter_event_loop_watch_child_full ()

    guint
    milter_event_loop_watch_child_full (MilterEventLoop *loop,
                                        gint priority,
                                        GPid pid,
                                        GChildWatchFunc function,
                                        gpointer user_data,
                                        GDestroyNotify notify);

[rename-to milter_event_loop_watch_child]

#### Parameters

loop | A MilterEventLoop. |
priority | The priority of the child source. |
pid | An ID of the process to watch. |
function | The function to call when the child is finished. |
user_data | User data to pass to function . |
notify | The function to call when the source is removed. | [nullable]

#### Returns

The event source ID.

milter_event_loop_watch_child_full

### milter_event_loop_add_timeout ()

    guint
    milter_event_loop_add_timeout (MilterEventLoop *loop,
                                   gdouble interval_in_seconds,
                                   GSourceFunc function,
                                   gpointer user_data);

This equals to `milter_event_loop_add_timeout_full(loop, G_PRIORITY_DEFAULT, interval_in_seconds, function, user_data, NULL)`.

[skip]

#### Parameters

loop | A MilterEventLoop. |
interval_in_seconds | The time between calls to the function , in seconds. |
function | The function to call when the interval is passed. |
user_data | User data to pass to function . |

#### Returns

The event source ID.

milter_event_loop_add_timeout

### milter_event_loop_add_timeout_full ()

    guint
    milter_event_loop_add_timeout_full (MilterEventLoop *loop,
                                        gint priority,
                                        gdouble interval_in_seconds,
                                        GSourceFunc function,
                                        gpointer user_data,
                                        GDestroyNotify notify);

[rename-to milter_event_loop_add_timeout]

#### Parameters

loop | A MilterEventLoop. |
priority | The priority of the timeout source. |
interval_in_seconds | The time between calls to the function , in seconds. |
function | The function to call when the interval is passed. |
user_data | User data to pass to function . |
notify | The function to call when the source is removed. | [nullable]

#### Returns

The event source ID.

milter_event_loop_add_timeout_full

### milter_event_loop_add_idle ()

    guint
    milter_event_loop_add_idle (MilterEventLoop *loop,
                                GSourceFunc function,
                                gpointer user_data);

This equals to `milter_event_loop_add_idle_full(loop, G_PRIORITY_DEFAULT_IDLE, function, user_data, NULL)`.

[skip]

#### Parameters

loop | A MilterEventLoop. |
function | The function to call when no source is dispatched. |
user_data | User data to pass to function . |

#### Returns

The event source ID.

milter_event_loop_add_idle

### milter_event_loop_add_idle_full ()

    guint
    milter_event_loop_add_idle_full (MilterEventLoop *loop,
                                     gint priority,
                                     GSourceFunc function,
                                     gpointer user_data,
                                     GDestroyNotify notify);

[rename-to milter_event_loop_add_idle]

#### Parameters

loop | A MilterEventLoop. |
priority | The priority of the idle source. |
function | The function to call when no source is dispatched. |
user_data | User data to pass to function . |
notify | The function to call when the source is removed. | [nullable]

#### Returns

The event source ID.

milter_event_loop_add_idle_full

### milter_event_loop_remove ()

    gboolean
    milter_event_loop_remove (MilterEventLoop *loop,
                              guint id);

milter_event_loop_remove

## Types and Values

### MILTER_EVENT_LOOP_ERROR

    #define MILTER_EVENT_LOOP_ERROR           (milter_event_loop_error_quark())

MILTER_EVENT_LOOP_ERROR

### enum MilterEventLoopError

#### Members

MILTER_EVENT_LOOP_ERROR_MAX |  |

MilterEventLoopError

## Property Details

### The `“custom-run”` property

      “custom-run”               gpointer

The custom run.

Owner: MilterEventLoop

Flags: Read / Write

MilterEventLoop:custom-run