networkservice
NetworkService.h
Go to the documentation of this file.
1 //\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\//
2 // //
3 // MIT License //
4 // //
5 // Copyright (c) 2020 Boubacar DIENE //
6 // //
7 // This file is part of NetworkService project //
8 // //
9 // Permission is hereby granted, free of charge, to any person obtaining a copy //
10 // of this software and associated documentation files (the "Software"), to deal //
11 // in the Software without restriction, including without limitation the rights //
12 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell //
13 // copies of the Software, and to permit persons to whom the Software is //
14 // furnished to do so, subject to the following conditions: //
15 // //
16 // The above copyright notice and this permission notice shall be included in all //
17 // copies or substantial portions of the Software. //
18 // //
19 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR //
20 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, //
21 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE //
22 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER //
23 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, //
24 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE //
25 // SOFTWARE. //
26 // //
27 //\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\//
28 
29 #ifndef __SERVICE_NETWORKSERVICE_H__
30 #define __SERVICE_NETWORKSERVICE_H__
31 
36 
37 namespace service {
38 
120 
121 public:
135 
138 
141 
144  };
145 
152  explicit NetworkService(const NetworkServiceParams& params);
153 
165  [[nodiscard]] int applyConfig(const std::string& configFile) const;
166 
167 private:
169 };
170 
173 }
174 
175 #endif
NetworkService(const NetworkServiceParams &params)
Create a NetworkService object.
const plugins::config::IConfig & config
Definition: NetworkService.h:137
const plugins::network::INetwork & network
Definition: NetworkService.h:140
const plugins::logger::ILogger & logger
Definition: NetworkService.h:134
Print logs to help understanding what the service is doing.
Definition: ILogger.h:71
A data structure containing all input parameters expected by the construtor.
Definition: NetworkService.h:132
int applyConfig(const std::string &configFile) const
Apply the network configuration given in provided file.
A factory class to help creating rules thus hiding low level details to the core service.
Definition: IRuleFactory.h:56
const plugins::firewall::IRuleFactory & ruleFactory
Definition: NetworkService.h:143
Configure the network (enable network interfaces, set IP addresses, add new network interfaces...
Definition: INetwork.h:62
Load the configuration used by the service to set up the network.
Definition: IConfig.h:66
Main class that directs operations.
Definition: NetworkService.h:119
const NetworkServiceParams & m_params
Definition: NetworkService.h:168