forked from amenesca/Weeaboos-WebServer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVirtualServer.cpp
More file actions
64 lines (49 loc) · 1.37 KB
/
Copy pathVirtualServer.cpp
File metadata and controls
64 lines (49 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#include "./VirtualServer.hpp"
VirtualServer::VirtualServer() {}
VirtualServer::~VirtualServer() {}
VirtualServer::VirtualServer(const VirtualServer& copy) {
*this = copy;
}
VirtualServer& VirtualServer::operator=(const VirtualServer& copy) {
if (this != ©) {
this->_bodySize = copy._bodySize;
this->_errorPage = copy._errorPage;
this->_location = copy._location;
this->_port = copy._port;
this->_serverName = copy._serverName;
}
return *this;
}
void VirtualServer::setPort(int port) {
this->_port = port;
}
void VirtualServer::setServerName(std::string serverName) {
this->_serverName = serverName;
}
void VirtualServer::setBodySize(std::string bodySize) {
this->_bodySize = bodySize;
}
void VirtualServer::setErrorPage(std::vector<std::string> errorPage) {
this->_errorPage = errorPage;
}
// void VirtualServer::PushLocation(Location location) {
// this->_location.push_back(location);
// }
int VirtualServer::getPort(void) const {
return(_port);
}
std::string VirtualServer::getServerName(void) const {
return(_serverName);
}
std::string VirtualServer::getBodySize(void) const {
return(_bodySize);
}
std::vector<Location> VirtualServer::getLocation(void) const {
return(_location);
}
std::vector<Location>* VirtualServer::getLocationAddress(void) {
return(&_location);
}
std::vector<std::string> VirtualServer::getErrorPage(void) const {
return(_errorPage);
}