Manages SMS service configuration files.

#include <smsListConfiguration.h>

Inheritance diagram for SmsListConfiguration:

Public Member Functions

int getSmsCounter ()
 
bool getSmsById (boost::system::error_code &ec, const std::string &smsid, boost::shared_ptr< Sms > &sms)
 
void getStoredSmsList (std::map< std::string, std::list< boost::shared_ptr< Sms >>> &sourcesmsList)
 
bool saveSmsInList (boost::system::error_code &ec, const std::string &sourceId, const boost::shared_ptr< Sms > sms)
 
bool deleteSmsFromList (boost::system::error_code &ec, const std::string &sourceId, const boost::shared_ptr< Sms > sms)
 
bool parseConfiguration (boost::system::error_code &ec, const char *configuration)
 

Static Public Member Functions

static SmsListConfigurationgetInstance ()
 Obtain singleton instance. More...
 

Protected Member Functions

virtual bool readConfiguration (boost::system::error_code &ec, std::string path=mConfigurationFilePath)
 Reads the service configuration. More...
 
virtual bool writeConfiguration (boost::system::error_code &ec, std::string path=mConfigurationFilePath)
 Writes the service configuration. More...
 
virtual bool writeDefaultConfiguration (boost::system::error_code &ec, std::string path=mConfigurationFilePath)
 
- Protected Member Functions inherited from Configuration
virtual bool init (boost::system::error_code &ec, std::string path)
 Inits configuration reading from file in path. More...
 
virtual bool getMember (const rapidjson::Value &conf, boost::system::error_code &ec, std::string member, int &value)
 Gets a INT member in rapidjson value. More...
 
virtual bool getMember (const rapidjson::Value &conf, boost::system::error_code &ec, std::string member, std::string &value)
 Gets a STRING member in rapidjson value. More...
 
virtual bool getMember (const rapidjson::Value &conf, boost::system::error_code &ec, std::string member, bool &value)
 Gets a BOOL in rapidjson value. More...
 
virtual bool writeConfigurationToFile (boost::system::error_code &ec, const rapidjson::Document &doc, std::string path)
 Writes the configuration stored in doc to the path file. More...
 
virtual bool writeConfigurationToFile (boost::system::error_code &ec, const std::string &doc, std::string path)
 Writes the configuration stored in data to the path file. More...
 
virtual bool getDocfromPath (boost::system::error_code &ec, rapidjson::Document &doc, std::string path)
 Parse the data from the file existing in the path and introduce it into a rapidjson document object. More...
 

Member Function Documentation

static SmsListConfiguration* getInstance ( )
static
Returns
SmsListConfiguration instance
virtual bool readConfiguration ( boost::system::error_code &  ec,
std::string  path = mConfigurationFilePath 
)
protectedvirtual
Parameters
ecerror code
pathconfiguration file path
Returns
true if configuration is read, false otherwise

Implements Configuration.

virtual bool writeConfiguration ( boost::system::error_code &  ec,
std::string  path = mConfigurationFilePath 
)
protectedvirtual
Parameters
ecerror code
pathconfiguration file path
Returns
true if configuration is written, false otherwise

Implements Configuration.

virtual bool writeDefaultConfiguration ( boost::system::error_code &  ec,
std::string  path = mConfigurationFilePath 
)
protectedvirtual

Writes default configuration to file

Parameters
ecerror code
pathconfiguration file path
Returns
true if configuration is written, false otherwise

Implements Configuration.