client-cpp  0.9.0
kaa::KaaClientProperties Class Reference

#include <KaaClientProperties.hpp>

+ Collaboration diagram for kaa::KaaClientProperties:

Public Member Functions

 KaaClientProperties ()
 
void setClientId (const std::string &clientId)
 Set client ID. More...
 
std::string getClientId () const
 Returns client id. More...
 
void setLogFileName (const std::string &logFileName)
 Set file name logs will be written to. More...
 
std::string getLogFileName () const
 Returns current path to the file which contains logs. More...
 
void setWorkingDirectoryPath (const std::string &path)
 Sets working directory path. More...
 
std::string getWorkingDirectoryPath () const
 Returns a path to the client's working directory. More...
 
void setStateFileName (const std::string &fileName)
 Sets state file name. More...
 
std::string getStateFileName () const
 Returns the path to the state file name. More...
 
void setPublicKeyFileName (const std::string &fileName)
 Sets public key file name. More...
 
std::string getPublicKeyFileName () const
 Returns the path to the client's public key file. More...
 
void setPrivateKeyFileName (const std::string &fileName)
 Sets private key file name. More...
 
std::string getPrivateKeyFileName () const
 Returns the path to the client's private key file. More...
 
void setLogsDatabaseFileName (const std::string &fileName)
 Sets database file name. More...
 
std::string getLogsDatabaseFileName () const
 Returns the path to the database's name where the logs are stored. More...
 
void setConfigurationFileName (const std::string &fileName)
 Sets configuration file name. More...
 
std::string getConfigurationFileName () const
 Returns the path to the configuration file. More...
 
void setProperty (const std::string &name, const std::string &value)
 Sets property. More...
 
std::string getProperty (const std::string &name, const std::string &defaultValue=std::string()) const
 Returns propety value. More...
 

Static Public Attributes

static const std::string PROP_WORKING_DIR
 
static const std::string PROP_STATE_FILE
 
static const std::string PROP_PUB_KEY_FILE
 
static const std::string PROP_PRIV_KEY_FILE
 
static const std::string PROP_LOGS_DB
 
static const std::string PROP_CONF_FILE
 
static const std::string PROP_CLIENT_ID
 
static const std::string PROP_LOG_FILE_NAME
 
static const std::string DEFAULT_WORKING_DIR
 
static const std::string DEFAULT_STATE_FILE
 
static const std::string DEFAULT_PUB_KEY_FILE
 
static const std::string DEFAULT_PRIV_KEY_FILE
 
static const std::string DEFAULT_LOGS_DB
 
static const std::string DEFAULT_CONF_FILE
 
static const std::string DEFAULT_CLIENT_ID
 
static const std::string DEFAULT_LOG_FILE_NAME
 

Detailed Description

Definition at line 25 of file KaaClientProperties.hpp.

Constructor & Destructor Documentation

kaa::KaaClientProperties::KaaClientProperties ( )
inline

Definition at line 27 of file KaaClientProperties.hpp.

Member Function Documentation

std::string kaa::KaaClientProperties::getClientId ( ) const
inline

Returns client id.

Returns
Client Id.

Definition at line 53 of file KaaClientProperties.hpp.

std::string kaa::KaaClientProperties::getConfigurationFileName ( ) const
inline

Returns the path to the configuration file.

Returns
The path to the configuration file.

Definition at line 185 of file KaaClientProperties.hpp.

std::string kaa::KaaClientProperties::getLogFileName ( ) const
inline

Returns current path to the file which contains logs.

Returns
The path to the file that stores logs. if the returned string is emty, logs are not written to a file.

Definition at line 73 of file KaaClientProperties.hpp.

std::string kaa::KaaClientProperties::getLogsDatabaseFileName ( ) const
inline

Returns the path to the database's name where the logs are stored.

Returns
The path to the database.

Definition at line 168 of file KaaClientProperties.hpp.

std::string kaa::KaaClientProperties::getPrivateKeyFileName ( ) const
inline

Returns the path to the client's private key file.

Returns
The path to the private key file.

Definition at line 150 of file KaaClientProperties.hpp.

std::string kaa::KaaClientProperties::getProperty ( const std::string &  name,
const std::string &  defaultValue = std::string() 
) const

Returns propety value.

Parameters
[in]nameProperty name.
[in]defaultValueThe value which will be returned in case if the property has no value set.
std::string kaa::KaaClientProperties::getPublicKeyFileName ( ) const
inline

Returns the path to the client's public key file.

Returns
The path to the public key file.

Definition at line 132 of file KaaClientProperties.hpp.

std::string kaa::KaaClientProperties::getStateFileName ( ) const
inline

Returns the path to the state file name.

Returns
The path to the client's status file.

Definition at line 114 of file KaaClientProperties.hpp.

std::string kaa::KaaClientProperties::getWorkingDirectoryPath ( ) const
inline

Returns a path to the client's working directory.

Returns
The path to the client's working directory.

Definition at line 95 of file KaaClientProperties.hpp.

void kaa::KaaClientProperties::setClientId ( const std::string &  clientId)

Set client ID.

Parameters
[in]clientIdClient Id

A client id is used for logging purposes. Kaa supports a several client instances hence there is a need to distinguish them. Client id is introduced for this purpose. Each log line begins with client id:

[cliend id] [date] ....

By default client id is provided.

void kaa::KaaClientProperties::setConfigurationFileName ( const std::string &  fileName)

Sets configuration file name.

Parameters
[in]fileNameConfiguration file name.
void kaa::KaaClientProperties::setLogFileName ( const std::string &  logFileName)

Set file name logs will be written to.

Parameters
[in]logFileNameThe name of the file. If empty -
  • logs will be written to stdout. Otherwise - they will be duplicated to the specified file.
void kaa::KaaClientProperties::setLogsDatabaseFileName ( const std::string &  fileName)

Sets database file name.

Parameters
[in]fileNameThe name of the database where logs will be stored.
void kaa::KaaClientProperties::setPrivateKeyFileName ( const std::string &  fileName)

Sets private key file name.

Parameters
[in]fileNameThe name of the client's private key file.
void kaa::KaaClientProperties::setProperty ( const std::string &  name,
const std::string &  value 
)

Sets property.

Parameters
[in]nameProperty name.
[in]valueProperty value.
void kaa::KaaClientProperties::setPublicKeyFileName ( const std::string &  fileName)

Sets public key file name.

Parameters
[in]fileNameThe name of the client's public key file.
void kaa::KaaClientProperties::setStateFileName ( const std::string &  fileName)

Sets state file name.

Parameters
[in]fileNameThe name of the client's state file.

State file name is used to store client state info.

void kaa::KaaClientProperties::setWorkingDirectoryPath ( const std::string &  path)

Sets working directory path.

Parameters
[in]pathThe path to the working directory.

The path to the working directory is used to specify the directory where client's state and keys files will be stored.

Member Data Documentation

const std::string kaa::KaaClientProperties::DEFAULT_CLIENT_ID
static

Definition at line 223 of file KaaClientProperties.hpp.

const std::string kaa::KaaClientProperties::DEFAULT_CONF_FILE
static

Definition at line 222 of file KaaClientProperties.hpp.

const std::string kaa::KaaClientProperties::DEFAULT_LOG_FILE_NAME
static

Definition at line 224 of file KaaClientProperties.hpp.

const std::string kaa::KaaClientProperties::DEFAULT_LOGS_DB
static

Definition at line 221 of file KaaClientProperties.hpp.

const std::string kaa::KaaClientProperties::DEFAULT_PRIV_KEY_FILE
static

Definition at line 220 of file KaaClientProperties.hpp.

const std::string kaa::KaaClientProperties::DEFAULT_PUB_KEY_FILE
static

Definition at line 219 of file KaaClientProperties.hpp.

const std::string kaa::KaaClientProperties::DEFAULT_STATE_FILE
static

Definition at line 218 of file KaaClientProperties.hpp.

const std::string kaa::KaaClientProperties::DEFAULT_WORKING_DIR
static

Definition at line 217 of file KaaClientProperties.hpp.

const std::string kaa::KaaClientProperties::PROP_CLIENT_ID
static

Definition at line 214 of file KaaClientProperties.hpp.

const std::string kaa::KaaClientProperties::PROP_CONF_FILE
static

Definition at line 213 of file KaaClientProperties.hpp.

const std::string kaa::KaaClientProperties::PROP_LOG_FILE_NAME
static

Definition at line 215 of file KaaClientProperties.hpp.

const std::string kaa::KaaClientProperties::PROP_LOGS_DB
static

Definition at line 212 of file KaaClientProperties.hpp.

const std::string kaa::KaaClientProperties::PROP_PRIV_KEY_FILE
static

Definition at line 211 of file KaaClientProperties.hpp.

const std::string kaa::KaaClientProperties::PROP_PUB_KEY_FILE
static

Definition at line 210 of file KaaClientProperties.hpp.

const std::string kaa::KaaClientProperties::PROP_STATE_FILE
static

Definition at line 209 of file KaaClientProperties.hpp.

const std::string kaa::KaaClientProperties::PROP_WORKING_DIR
static

Definition at line 208 of file KaaClientProperties.hpp.


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