#ifndef _SERVER_H_
#define _SERVER_H_
#include "types.h"
struct string;
struct SearchRequest;
void server_setPort(const char *server, const char *portStr);
void server_setPlainLdap(const char *server, const char *enabledStr);
void server_setMap(const char *server, const char *attribute, const char *value);
void server_setBind(const char *server, const char *bind);
void server_setPassword(const char *server, const char *password);
void server_setBase(const char *server, const char *base);
void server_setHomeTemplate(const char *server, const char *hometemplate);
void server_setHomeAttribute(const char *server, const char *homeattribute);
void server_setFingerprint(const char *server, const char *fingerprint);
void server_setCaBundle(const char *server, const char *file);
BOOL server_initServers();
void server_free(epoll_server_t *server);
BOOL server_send(epoll_server_t *server, const char *buffer, size_t len, const BOOL cork);
server_t *server_getFromBase(struct string *in);
uint32_t server_searchRequest(server_t *server, struct SearchRequest *req);
uint32_t server_searchRequestOnConnection(epoll_server_t *con, struct SearchRequest *req);
uint32_t server_tryUserBind(server_t *server, struct string *binddn, struct string *password, epoll_server_t **newcon);
#endif