networkservice
Classes | Public Member Functions | Private Attributes | List of all members
service::NetworkService Class Reference

Main class that directs operations. More...

#include "service/NetworkService.h"

Collaboration diagram for service::NetworkService:
Collaboration graph
[legend]

Classes

struct  NetworkServiceParams
 A data structure containing all input parameters expected by the construtor. More...
 

Public Member Functions

 NetworkService (const NetworkServiceParams &params)
 Create a NetworkService object. More...
 
int applyConfig (const std::string &configFile) const
 Apply the network configuration given in provided file. More...
 

Private Attributes

const NetworkServiceParamsm_params
 

Detailed Description

Main class that directs operations.

//Core

Following a (kind of) Dependency Injection Principle, required objects to interact with the plugins are provided to this class through its constructor. Configuring the network and firewall is done in a certain order and handling that is the main purpose of this class.

Author
Boubacar DIENE bouba.nosp@m.car..nosp@m.diene.nosp@m.@gma.nosp@m.il.co.nosp@m.m
Date
April 2020

Constructor & Destructor Documentation

◆ NetworkService()

service::NetworkService::NetworkService ( const NetworkServiceParams params)
explicit

Create a NetworkService object.

Parameters
paramsA structure of type NetworkServiceParams with all expected parameters

Member Function Documentation

◆ applyConfig()

int service::NetworkService::applyConfig ( const std::string &  configFile) const

Apply the network configuration given in provided file.

Parameters
configFileA valid path to a file in the filesystem containing configuration to apply or any other specific data the will be understood by the low level configuration reader (E.g. database name, tables name, etc. in case the config is retrieved from a database)
Returns
EXIT_SUCCESS on success, EXIT_FAILURE on failure

Member Data Documentation

◆ m_params

const NetworkServiceParams& service::NetworkService::m_params
private

The documentation for this class was generated from the following file: