libPocuter  1.0
Support library for programming the Pocuter
PocuterConfig.h
Go to the documentation of this file.
1 #ifndef POCUTERCONFIG_H
2 #define POCUTERCONFIG_H
3 #include <stdint.h>
4 #include <stddef.h>
5 
11 public:
22  PocuterConfig(const uint8_t* configName, uint64_t* appID = NULL);
23 
24 
34  PocuterConfig(uint64_t appID);
35 
49  bool get(const uint8_t* section, const uint8_t* name, uint8_t* result, size_t maxLength, bool decrypt = false);
62  bool set(const uint8_t* section, const uint8_t* name, const uint8_t* value, bool encrypt = false);
63 
64 
74  bool del(const uint8_t* section, const uint8_t* name);
75 
76 
77 
88  uint32_t get(const uint8_t* section, const uint8_t* name);
89 
90 
101  bool set(const uint8_t* section, const uint8_t* name, uint32_t value);
102 
103 
117  bool getBinary(const uint8_t* section, const uint8_t* name, void* result, size_t maxLength, bool decrypt = false);
118 
132  bool setBinary(const uint8_t* section, const uint8_t* name, const void* value, size_t valueLength, bool encrypt = false);
133 
134  virtual ~PocuterConfig();
135 
140 private:
141  bool getEncrypted(const uint8_t* section, const uint8_t* name, uint8_t* result, size_t maxLength);
142  bool setEncrypted(const uint8_t* section, const uint8_t* name, const uint8_t* value);
143 
144  uint8_t* m_configFile;
145  bool m_readony;
146 };
147 
148 #endif /* POCUTERCONFIG_H */
149 
PocuterConfig::PocuterConfig
PocuterConfig(const uint8_t *configName, uint64_t *appID=NULL)
constructor for a new config instance
PocuterConfig::del
bool del(const uint8_t *section, const uint8_t *name)
delete a value
PocuterConfig::set
bool set(const uint8_t *section, const uint8_t *name, const uint8_t *value, bool encrypt=false)
set string data
PocuterConfig::setBinary
bool setBinary(const uint8_t *section, const uint8_t *name, const void *value, size_t valueLength, bool encrypt=false)
set a binary data blob
PocuterConfig::getBinary
bool getBinary(const uint8_t *section, const uint8_t *name, void *result, size_t maxLength, bool decrypt=false)
get a binary data blob
PocuterConfig::~PocuterConfig
virtual ~PocuterConfig()
PocuterConfig
save configuration on the SD Card or get app specific configuration data
Definition: PocuterConfig.h:10
PocuterConfig::get
bool get(const uint8_t *section, const uint8_t *name, uint8_t *result, size_t maxLength, bool decrypt=false)
get string data