51 lines
825 B
C++
51 lines
825 B
C++
#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;
|
|
} |