ConfigurationDAO.hpp Example File
pushCollector/10.0/pushCollector/src/dao/ConfigurationDAO.hpp
#ifndef CONFIGURATIONDAO_HPP
#define CONFIGURATIONDAO_HPP
#define QSETTINGS_CONFIG_GROUP "configuration"
#define PROVIDER_APP_ID_KEY "providerAppId"
#define PPG_URL_KEY "ppgUrl"
#define PUSH_INITIATOR_URL_KEY "pushInitiatorUrl"
#define USING_PUBLIC_PPG_KEY "usingPublicPpg"
#define LAUNCH_APP_ON_PUSH_KEY "launchAppOnPush"
#define DEFAULT_PROVIDER_APP_ID ""
#define DEFAULT_PPG_URL ""
#define DEFAULT_PUSH_INITIATOR_URL ""
#define DEFAULT_USING_PUBLIC_PPG true
#define DEFAULT_LAUNCH_APP_ON_PUSH true
#include "../vo/Configuration.hpp"
class ConfigurationDAO
{
public:
ConfigurationDAO();
~ConfigurationDAO();
void save(const Configuration &config);
void remove();
Configuration& configuration();
bool hasConfiguration() const;
private:
Configuration m_config;
};
#endif