-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfigurableInterface.h
More file actions
47 lines (40 loc) · 1.12 KB
/
Copy pathConfigurableInterface.h
File metadata and controls
47 lines (40 loc) · 1.12 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
/**
* @file ConfigurableInterface.h
* @brief A common interface to set/get IP, MASK, GW, DNS, DHC and MAC
*
* Common interface headers
*
* @author Amine BAGGA (2025)
*/
#ifndef __CONFIGURABLE_INTERFACE__
#define __CONFIGURABLE_INTERFACE__
#include <string>
#include <mutex>
class ConfigurableInterface {
public:
ConfigurableInterface();
ConfigurableInterface& operator=(const ConfigurableInterface&);
virtual ~ConfigurableInterface();
void setIpAddress(const std::string&);
void setSubnetMask(const std::string&);
void setGateway(const std::string&);
void setDns(const std::string&);
void setDhcp(const bool);
void setMacAddress(const std::string&);
std::string getIpAddress() const;
std::string getSubnetMask() const;
std::string getGateway() const;
std::string getDns() const;
bool getDhcp() const;
std::string getMacAddress() const;
protected:
std::string m_ipAddress;
std::string m_subnetMask;
std::string m_gateway;
std::string m_dns;
std::string m_macAddress;
bool m_dhcp;
private:
std::mutex* m_mutex;
};
#endif // __CONFIGURABLE_INTERFACE__