blob: 2e2dd8c68d06b7dde6c6591ee1f7bc3a3600a2d5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
/*
* GraphLCD plugin for the Video Disk Recorder
*
* extdata.h - external data sent via SVDRP
*
* This file is released under the GNU General Public License. Refer
* to the COPYING file distributed with this package.
*
* (c) 2011 Wolfgang Astleitner <mrwastl AT users sourceforge net>
*/
#ifndef _GRAPHLCD_EXTDATA_H_
#define _GRAPHLCD_EXTDATA_H_
#include <stdint.h>
#include <string>
#include <map>
// external data set via SVDRP
class cExtData {
friend class cGraphLCDSkinConfig;
friend class cPluginGraphLCD;
private:
std::map<std::string,std::string> data;
std::map<std::string,std::string>::iterator it;
std::map<std::string,uint64_t> expData;
std::map<std::string,uint64_t>::iterator expDataIt;
static cExtData * mExtDataInstance;
cExtData(void) {}
~cExtData(void);
protected:
static cExtData * GetExtData(void);
static void ReleaseExtData(void);
public:
bool Set(std::string key, std::string value, uint32_t expire = 0);
bool Unset(std::string key);
bool IsSet(std::string key);
std::string Get(std::string key);
};
#endif
|