-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathextdata.h
46 lines (37 loc) · 1.26 KB
/
extdata.h
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(const std::string & key, const std::string & value, const std::string & scope, uint32_t expire = 0 );
bool Unset(const std::string & key, const std::string & scope);
bool IsSet(const std::string & key, const std::string & scope);
std::string Get(const std::string & key, const std::string & scope);
};
#endif