-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathServerPairs.hpp
59 lines (41 loc) · 1.48 KB
/
ServerPairs.hpp
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
#ifndef SERVERPAIRS_HPP
#define SERVERPAIRS_HPP
# include "Library.hpp"
class ServerPairs {
private:
u_short _port;
in_addr_t _host;
std::string _servName;
bool _autoIndex;
std::string _root;
std::string _index;
std::string _uploadPath;
int _maxBodySize;
int _errorCode;
std::string _errorDescription;
std::string _method;
std::vector<Location> _locations;
public:
ServerPairs();
ServerPairs &operator=(const ServerPairs &other);
virtual ~ServerPairs();
void setPort(const int &port);
void setHost(const std::string &host);
void setServName(const std::string &serverName);
void setAutoIndex(const bool &autoIndex);
void setRoot(const std::string &root);
void setIndex(const std::string &index);
void setUpload(const std::string &path);
void setMaxBodySize(const int &maxBodySize);
void setError(const int &code, const std::string &description);
void setMethod(const std::string &method);
std::vector<Location>& getLocations();
const u_short& getPort() const;
const std::string& getRoot() const;
const std::string& getIndex();
const std::string& getServName() const;
const in_addr_t& getHost() const;
const std::string& getUpload();
const int& getBodySize();
};
#endif