Initial commit
This commit is contained in:
51
src/server/configuration.cpp
Normal file
51
src/server/configuration.cpp
Normal file
@@ -0,0 +1,51 @@
|
||||
#include "configuration.hpp"
|
||||
|
||||
bool ServerConfiguration::LoadFromFile(std::string const & filePath)
|
||||
{
|
||||
// TODO implement
|
||||
return false;
|
||||
}
|
||||
|
||||
ServerConfiguration::ServerConfiguration()
|
||||
: wwwRoot("/home/tijmen/project/http-server/bin/www"),
|
||||
serverName("http-server"),
|
||||
port(8080)
|
||||
{
|
||||
}
|
||||
|
||||
int ServerConfiguration::GetMajorVersion() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ServerConfiguration::GetMinorVersion() const
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::string const & ServerConfiguration::GetWwwRoot() const
|
||||
{
|
||||
return wwwRoot;
|
||||
}
|
||||
|
||||
std::string const & ServerConfiguration::GetServerName() const
|
||||
{
|
||||
return serverName;
|
||||
}
|
||||
|
||||
int ServerConfiguration::GetPort() const
|
||||
{
|
||||
return port;
|
||||
}
|
||||
|
||||
bool ServerConfiguration::IsValid() const
|
||||
{
|
||||
return isValid;
|
||||
}
|
||||
|
||||
ServerConfiguration const & ServerConfiguration::GetInstance()
|
||||
{
|
||||
static ServerConfiguration config;
|
||||
|
||||
return config;
|
||||
}
|
||||
Reference in New Issue
Block a user