EII ConfigMgr C/C++ Reference
server_cfg.hpp
Go to the documentation of this file.
1 // Copyright (c) 2020 Intel Corporation.
2 //
3 // Permission is hereby granted, free of charge, to any person obtaining a copy
4 // of this software and associated documentation files (the "Software"), to
5 // deal in the Software without restriction, including without limitation the
6 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7 // sell copies of the Software, and to permit persons to whom the Software is
8 // furnished to do so, subject to the following conditions:
9 //
10 // The above copyright notice and this permission notice shall be included in
11 // all copies or substantial portions of the Software.
12 //
13 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18 // FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19 // IN THE SOFTWARE.
20 
21 
27 #ifndef _EII_CH_SERVER_CFG_H
28 #define _EII_CH_SERVER_CFG_H
29 
30 #include <string.h>
31 #include <cjson/cJSON.h>
32 #include <iostream>
33 #include <safe_lib.h>
34 #include <eii/utils/logger.h>
35 #include "eii/utils/json_config.h"
36 #include "eii/config_manager/kv_store_plugin/kv_store_plugin.h"
39 
40 
41 namespace eii {
42  namespace config_manager {
43 
44  class ServerCfg : public AppCfg {
45  private:
46 
47  // cfgmgr_interface_t object
48  cfgmgr_interface_t* m_cfgmgr_interface;
49 
53  ServerCfg(const ServerCfg& src);
54 
58  ServerCfg& operator=(const ServerCfg& src);
59  public:
66  explicit ServerCfg(cfgmgr_interface_t* cfgmgr_interface);
67 
73  config_t* getMsgBusConfig() override;
74 
81  config_value_t* getInterfaceValue(const char* key) override;
82 
88  std::string getEndpoint() override;
89 
95  std::vector<std::string> getAllowedClients() override;
96 
101 
105  ~ServerCfg();
106 
107  };
108  }
109 }
110 #endif
eii::config_manager::ServerCfg::getAllowedClients
std::vector< std::string > getAllowedClients() override
app_cfg.hpp
ConfigMgr AppCfg class.
cfgmgr_interface_t
Definition: cfgmgr.h:90
eii::config_manager::ServerCfg::~ServerCfg
~ServerCfg()
eii::config_manager::ServerCfg
Definition: server_cfg.hpp:44
eii::config_manager::ServerCfg::getServCfg
cfgmgr_interface_t * getServCfg()
eii::config_manager::ServerCfg::getMsgBusConfig
config_t * getMsgBusConfig() override
eii::config_manager::ServerCfg::getInterfaceValue
config_value_t * getInterfaceValue(const char *key) override
cfgmgr.h
Configuration Manager C APIs.
eii::config_manager::ServerCfg::getEndpoint
std::string getEndpoint() override
eii::config_manager::AppCfg
Definition: app_cfg.hpp:49