#ifndef VSERVER_H
#define VSERVER_H
#include <cx/string.h>
#include "../util/object.h"
#include "../public/nsapi.h"
#include "../daemon/acldata.h"
#include "log.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct VSLocation VSLocation;
struct VSLocation {
VSLocation *child_begin;
VSLocation *child_end;
VSLocation *next;
};
struct VirtualServer {
pool_handle_t *pool;
cxmutstr name;
cxmutstr host;
CxMap hosts;
cxmutstr objectfile;
HTTPObjectConfig *objects;
cxmutstr document_root;
ACLData *acls;
AccessLog *log;
VSLocation *locations_begin;
VSLocation *locations_end;
uint32_t ref;
};
VirtualServer* vs_new(
pool_handle_t *pool);
int vs_add_host(VirtualServer *vs, cxstring host);
#ifdef __cplusplus
}
#endif
#endif