client-cpp  0.7.4
KaaClientProperties.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2014-2015 CyberVision, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef KAACLIENTPROPERTIES_HPP_
18 #define KAACLIENTPROPERTIES_HPP_
19 
20 #include <string>
21 #include <unordered_map>
22 
23 namespace kaa {
24 
26 public:
28  {
29  initByDefaults();
30  }
31 
32  void setWorkingDirectoryPath(const std::string& path);
33  std::string getWorkingDirectoryPath() const
34  {
36  }
37 
38  void setStateFileName(const std::string& fileName);
39  std::string getStateFileName() const
40  {
42  }
43 
44  void setPublicKeyFileName(const std::string& fileName);
45  std::string getPublicKeyFileName() const
46  {
48  }
49 
50  void setPrivateKeyFileName(const std::string& fileName);
51  std::string getPrivateKeyFileName() const
52  {
54  }
55 
56  void setLogsDatabaseFileName(const std::string& fileName);
57  std::string getLogsDatabaseFileName() const
58  {
60  }
61 
62  void setConfigurationFileName(const std::string& fileName);
63  std::string getConfigurationFileName() const
64  {
66  }
67 
68  void setProperty(const std::string& name, const std::string& value);
69  std::string getProperty(const std::string& name, const std::string& defaultValue = std::string()) const;
70 
71 public:
72  static const std::string PROP_WORKING_DIR;
73  static const std::string PROP_STATE_FILE;
74  static const std::string PROP_PUB_KEY_FILE;
75  static const std::string PROP_PRIV_KEY_FILE;
76  static const std::string PROP_LOGS_DB;
77  static const std::string PROP_CONF_FILE;
78 
79  static const std::string DEFAULT_WORKING_DIR;
80  static const std::string DEFAULT_STATE_FILE;
81  static const std::string DEFAULT_PUB_KEY_FILE;
82  static const std::string DEFAULT_PRIV_KEY_FILE;
83  static const std::string DEFAULT_LOGS_DB;
84  static const std::string DEFAULT_CONF_FILE;
85 
86 private:
87  void initByDefaults();
88 
89 private:
90  std::unordered_map<std::string, std::string> properties_;
91 };
92 
93 } /* namespace kaa */
94 
95 #endif /* KAACLIENTPROPERTIES_HPP_ */
static const std::string PROP_PRIV_KEY_FILE
std::string getLogsDatabaseFileName() const
void setConfigurationFileName(const std::string &fileName)
static const std::string PROP_LOGS_DB
static const std::string DEFAULT_WORKING_DIR
std::string getWorkingDirectoryPath() const
static const std::string PROP_CONF_FILE
void setStateFileName(const std::string &fileName)
std::string getStateFileName() const
static const std::string DEFAULT_PRIV_KEY_FILE
void setPublicKeyFileName(const std::string &fileName)
void setProperty(const std::string &name, const std::string &value)
void setWorkingDirectoryPath(const std::string &path)
static const std::string PROP_WORKING_DIR
std::string getPublicKeyFileName() const
static const std::string DEFAULT_LOGS_DB
std::string getPrivateKeyFileName() const
static const std::string PROP_STATE_FILE
static const std::string DEFAULT_STATE_FILE
std::string getProperty(const std::string &name, const std::string &defaultValue=std::string()) const
static const std::string PROP_PUB_KEY_FILE
void setLogsDatabaseFileName(const std::string &fileName)
static const std::string DEFAULT_CONF_FILE
void setPrivateKeyFileName(const std::string &fileName)
std::string getConfigurationFileName() const
static const std::string DEFAULT_PUB_KEY_FILE