libinfinity-0.6 Reference Manual: InfdServerPool

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

### infd_server_pool_new ()

    InfdServerPool *
    infd_server_pool_new (InfdDirectory *directory);

Creates a new InfdServerPool.

#### Parameters

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

#### Returns

A new InfdServerPool.

### 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. |
user_data | Additional data to pass to `func` . |

## Types and Values

### struct InfdServerPool

    struct InfdServerPool;

### struct InfdServerPoolClass

    struct InfdServerPoolClass {
      GObjectClass parent_class;
    };

## Property Details

### The `“directory”` property

      “directory”                InfdDirectory *

The directory to which to register incoming connections to.

Flags: Read / Write / Construct Only