2020-03-20 12:48:58 +00:00
|
|
|
#include "mock/config_builder.hpp"
|
2020-03-20 13:51:57 +00:00
|
|
|
#include "util/wrap.hpp"
|
2020-03-15 20:48:45 +00:00
|
|
|
|
|
|
|
extern "C"
|
|
|
|
{
|
2020-03-20 13:51:57 +00:00
|
|
|
static webfused_test::IConfigBuilder * wfd_MockConfigBuilder = nullptr;
|
|
|
|
|
|
|
|
WFD_WRAP_FUNC0(wfd_MockConfigBuilder, wfd_config *, wfd_config_create);
|
|
|
|
WFD_WRAP_FUNC1(wfd_MockConfigBuilder, void, wfd_config_dispose, wfd_config *);
|
|
|
|
WFD_WRAP_FUNC2(wfd_MockConfigBuilder, void, wfd_config_set_server_vhostname, wfd_config *, char const *);
|
|
|
|
WFD_WRAP_FUNC2(wfd_MockConfigBuilder, void, wfd_config_set_server_port, wfd_config *, int);
|
|
|
|
WFD_WRAP_FUNC2(wfd_MockConfigBuilder, void, wfd_config_set_server_key, wfd_config *, char const *);
|
|
|
|
WFD_WRAP_FUNC2(wfd_MockConfigBuilder, void, wfd_config_set_server_cert, wfd_config *, char const *);
|
|
|
|
WFD_WRAP_FUNC2(wfd_MockConfigBuilder, void, wfd_config_set_server_document_root, wfd_config *, char const *);
|
|
|
|
WFD_WRAP_FUNC3(wfd_MockConfigBuilder, bool, wfd_config_add_auth_provider, wfd_config *, char const *, wfd_settings *);
|
|
|
|
WFD_WRAP_FUNC3(wfd_MockConfigBuilder, bool, wfd_config_add_filesystem, wfd_config *, char const *, char const *);
|
|
|
|
WFD_WRAP_FUNC4(wfd_MockConfigBuilder, bool, wfd_config_set_logger, wfd_config *, char const *, int, wfd_settings *);
|
|
|
|
WFD_WRAP_FUNC3(wfd_MockConfigBuilder, void, wfd_config_set_user, wfd_config *, char const *, char const *);
|
2020-03-19 16:25:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace webfused_test
|
2020-03-15 20:48:45 +00:00
|
|
|
{
|
|
|
|
|
2020-03-19 16:25:26 +00:00
|
|
|
MockConfigBuilder::MockConfigBuilder()
|
|
|
|
{
|
|
|
|
wfd_MockConfigBuilder = this;
|
2020-03-15 20:48:45 +00:00
|
|
|
}
|
|
|
|
|
2020-03-19 16:25:26 +00:00
|
|
|
MockConfigBuilder::~MockConfigBuilder()
|
2020-03-15 20:48:45 +00:00
|
|
|
{
|
2020-03-19 16:25:26 +00:00
|
|
|
wfd_MockConfigBuilder = nullptr;
|
|
|
|
}
|
2020-03-15 20:48:45 +00:00
|
|
|
|
2020-03-19 16:25:26 +00:00
|
|
|
struct wfd_config * MockConfigBuilder::getBuilder()
|
|
|
|
{
|
|
|
|
IConfigBuilder * config_builder = this;
|
2020-03-15 20:48:45 +00:00
|
|
|
|
2020-03-19 16:25:26 +00:00
|
|
|
return reinterpret_cast<wfd_config *>(config_builder);
|
|
|
|
}
|
2020-03-15 20:48:45 +00:00
|
|
|
}
|