2019-03-24 00:15:29 +00:00
|
|
|
#ifndef WSFS_ADAPTER_IMPL_SERVER_CONFIG_H
|
|
|
|
#define WSFS_ADAPTER_IMPL_SERVER_CONFIG_H
|
|
|
|
|
|
|
|
#include "wsfs/adapter/impl/authenticators.h"
|
|
|
|
|
2019-03-24 01:10:03 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2019-03-24 03:00:06 +00:00
|
|
|
struct server_config
|
2019-03-24 00:15:29 +00:00
|
|
|
{
|
|
|
|
char * mount_point;
|
|
|
|
char * document_root;
|
|
|
|
char * key_path;
|
|
|
|
char * cert_path;
|
|
|
|
char * vhost_name;
|
|
|
|
int port;
|
2019-03-24 02:25:29 +00:00
|
|
|
struct authenticators authenticators;
|
2019-03-24 00:15:29 +00:00
|
|
|
};
|
|
|
|
|
2019-03-24 03:00:06 +00:00
|
|
|
extern struct server_config * server_config_create(void);
|
2019-03-24 00:15:29 +00:00
|
|
|
|
2019-03-24 02:25:29 +00:00
|
|
|
extern void server_config_dispose(
|
2019-03-24 03:00:06 +00:00
|
|
|
struct server_config * config);
|
2019-03-24 00:15:29 +00:00
|
|
|
|
2019-03-24 02:25:29 +00:00
|
|
|
extern void server_config_init(
|
2019-03-24 03:00:06 +00:00
|
|
|
struct server_config * config);
|
2019-03-24 00:15:29 +00:00
|
|
|
|
2019-03-24 02:25:29 +00:00
|
|
|
extern void server_config_cleanup(
|
2019-03-24 03:00:06 +00:00
|
|
|
struct server_config * config);
|
2019-03-24 00:15:29 +00:00
|
|
|
|
2019-03-24 02:25:29 +00:00
|
|
|
extern void server_config_clone(
|
2019-03-24 03:00:06 +00:00
|
|
|
struct server_config * config,
|
|
|
|
struct server_config * clone);
|
2019-03-24 00:15:29 +00:00
|
|
|
|
2019-03-24 02:25:29 +00:00
|
|
|
extern void server_config_set_mountpoint(
|
2019-03-24 03:00:06 +00:00
|
|
|
struct server_config * config,
|
2019-03-24 00:15:29 +00:00
|
|
|
char const * mount_point);
|
|
|
|
|
2019-03-24 02:25:29 +00:00
|
|
|
extern void server_config_set_documentroot(
|
2019-03-24 03:00:06 +00:00
|
|
|
struct server_config * config,
|
2019-03-24 00:15:29 +00:00
|
|
|
char const * document_root);
|
|
|
|
|
2019-03-24 02:25:29 +00:00
|
|
|
extern void server_config_set_keypath(
|
2019-03-24 03:00:06 +00:00
|
|
|
struct server_config * config,
|
2019-03-24 00:15:29 +00:00
|
|
|
char const * key_path);
|
|
|
|
|
2019-03-24 02:25:29 +00:00
|
|
|
extern void server_config_set_certpath(
|
2019-03-24 03:00:06 +00:00
|
|
|
struct server_config * config,
|
2019-03-24 00:15:29 +00:00
|
|
|
char const * cert_path);
|
|
|
|
|
2019-03-24 02:25:29 +00:00
|
|
|
extern void server_config_set_vhostname(
|
2019-03-24 03:00:06 +00:00
|
|
|
struct server_config * config,
|
2019-03-24 00:15:29 +00:00
|
|
|
char const * vhost_name);
|
|
|
|
|
2019-03-24 02:25:29 +00:00
|
|
|
extern void server_config_set_port(
|
2019-03-24 03:00:06 +00:00
|
|
|
struct server_config * config,
|
2019-03-24 00:15:29 +00:00
|
|
|
int port);
|
|
|
|
|
2019-03-24 02:25:29 +00:00
|
|
|
extern void server_config_add_authenticator(
|
2019-03-24 03:00:06 +00:00
|
|
|
struct server_config * config,
|
2019-03-24 00:15:29 +00:00
|
|
|
char const * type,
|
2019-03-24 03:00:06 +00:00
|
|
|
authenticate_fn * authenticate,
|
2019-03-24 00:15:29 +00:00
|
|
|
void * user_data
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|