## InfdServerPool

InfdServerPool

## Functions

void | (*InfdServerPoolForeachServerFunc) ()
InfdServerPool * | infd_server_pool_new ()
void | infd_server_pool_add_server ()
void | infd_server_pool_add_local_publisher ()
void | infd_server_pool_remove_server ()
void | infd_server_pool_foreach_server ()

## Properties

InfdDirectory * | directory | Read / Write / Construct Only

## Types and Values

struct | InfdServerPool
struct | InfdServerPoolClass

## Object Hierarchy

        GObject
        ╰── InfdServerPool

## Description

## Functions

### InfdServerPoolForeachServerFunc ()

    void
    (*InfdServerPoolForeachServerFunc) (InfdXmlServer *server,
                                        gpointer user_data);

This is the callback signature of the callback passed to `infd_server_pool_foreach_server()`.

#### Parameters

server | The currently iterated server. |
user_data | Additional data passed to `infd_server_pool_foreach_server()`. |

### infd_server_pool_new ()

    InfdServerPool *
    infd_server_pool_new (InfdDirectory *directory);

Creates a new InfdServerPool.

[constructor]

#### Parameters

directory | A InfdDirectory to which to add incoming connections. |

#### Returns

A new InfdServerPool.

[transfer full]

### infd_server_pool_add_server ()

    void
    infd_server_pool_add_server (InfdServerPool *server_pool,
                                 InfdXmlServer *server);

Adds `server` to `server_pool` . The server pool accepts incoming connections and gives them to its directory which processes incoming requests.

#### Parameters

server_pool | A InfdServerPool. |
server | A InfdXmlServer. |

### infd_server_pool_add_local_publisher ()

    void
    infd_server_pool_add_local_publisher (InfdServerPool *server_pool,
                                          InfdXmppServer *server,
                                          InfLocalPublisher *publisher);

Publishes a service offered by `server` on the local network via `publisher` . This can safely be called when `server` is not yet open. The service will be published as soon as the server opens.

#### Parameters

server_pool | A InfdServerPool. |
server | A InfdXmppServer added to `server_pool` . |
publisher | A InfLocalPublisher. |

### infd_server_pool_remove_server ()

    void
    infd_server_pool_remove_server (InfdServerPool *server_pool,
                                    InfdXmlServer *server);

Removed `server` from `servor_pool` . If `server` was published via some publishers then it will be unpublished automatically.

#### Parameters

server_pool | A InfdServerPool. |
server | A InfdXmlServer which was previously added to `server_pool` . |

### infd_server_pool_foreach_server ()

    void
    infd_server_pool_foreach_server (InfdServerPool *server_pool,
                                     InfdServerPoolForeachServerFunc func,
                                     gpointer user_data);

Calls `func` for each server in pool registered with `infd_server_pool_add_server()`.

#### Parameters

server_pool | A InfdServerPool. |
func | The function to be called for each server. | [scope call]
user_data | Additional data to pass to `func` . |

## Types and Values

### struct InfdServerPool

    struct InfdServerPool;

InfdServerPool is an opaque data type. You should only access it via the public API functions.

### struct InfdServerPoolClass

    struct InfdServerPoolClass {
    };

This structure does not contain any public fields.

## Property Details

### The `“directory”` property

      “directory”                InfdDirectory *

The directory to which to register incoming connections to.

Owner: InfdServerPool

Flags: Read / Write / Construct Only