PhodavServer

## PhodavServer PhodavServer — A WebDAV server |

## Stability Level

Stable, unless otherwise indicated

## Functions

PhodavServer * | phodav_server_new ()
void | phodav_server_run ()
void | phodav_server_quit ()
guint | phodav_server_get_port ()
SoupServer * | phodav_server_get_soup_server ()

## Properties

guint | port | Read / Write / Construct Only
gchar * | root | Read / Write / Construct
SoupServer * | server | Read

## Types and Values

| PhodavServer
| PhodavServerClass

## Object Hierarchy

        GObject
        ╰── PhodavServer

## Includes

    #include <libphodav/phodav.h>

## Description

PhodavServer implements a simple WebDAV server.

## Functions

### phodav_server_new ()

    PhodavServer *
    phodav_server_new (guint port,
                       const gchar *root);

Creates a new PhodavServer.

#### Parameters

port | Port to listen on. |
root | Root path. | [allow-none]

#### Returns

a new PhodavServer

### phodav_server_run ()

    void
    phodav_server_run (PhodavServer *server);

Run the server in a separate thread.

#### Parameters

server | a `PhodavServer` |

### phodav_server_quit ()

    void
    phodav_server_quit (PhodavServer *server);

Stops the server from running.

#### Parameters

server | a `PhodavServer` |

### phodav_server_get_port ()

    guint
    phodav_server_get_port (PhodavServer *server);

Gets the TCP port that server is listening on. This is most useful when you did not request a specific port, with value 0.

#### Parameters

server | a `PhodavServer` |

#### Returns

the port `server` is listening on.

### phodav_server_get_soup_server ()

    SoupServer *
    phodav_server_get_soup_server (PhodavServer *server);

Returns the underlying `SoupServer`, if any.

#### Parameters

server | a `PhodavServer` |

#### Returns

the associated `SoupServer` or `NULL`

## Types and Values

### PhodavServer

    typedef struct _PhodavServer PhodavServer;

### PhodavServerClass

    typedef struct _PhodavServerClass PhodavServerClass;

## Property Details

### The `“port”` property

      “port”                     guint

Port.

Flags: Read / Write / Construct Only

Allowed values: <= 65535

Default value: 0

### The `“root”` property

      “root”                     gchar *

Root path.

Flags: Read / Write / Construct

Default value: NULL

### The `“server”` property

      “server”                   SoupServer *

Soup Server.

Flags: Read

## See Also

SoupServer