vdr-plugin-skindesigner/views/viewhelpers.h

62 lines
3.1 KiB
C
Raw Normal View History

2014-10-25 20:10:00 +02:00
#ifndef __VIEWHELPERS_H
#define __VIEWHELPERS_H
#include "../services/dvbapi.h"
2015-05-10 12:55:23 +02:00
typedef map<string,string> stringmap;
typedef map<string,int> intmap;
typedef pair<string,string> stringpair;
2015-05-10 12:55:23 +02:00
class cViewHelpers {
2014-10-25 20:10:00 +02:00
private:
2015-07-16 18:08:22 +02:00
cMutex mutexDevices;
2015-03-22 08:29:52 +01:00
int numDevices;
2014-10-25 20:10:00 +02:00
bool devicesInit;
int* lastSignalStrength;
int* lastSignalQuality;
bool* recDevices;
int lSignalDisplay;
int lSignalStrength;
int lSignalQuality;
2015-01-06 06:07:48 +01:00
int lastSecond;
int lastMinute;
double lastSystemLoad;
int lastMemUsage;
string lastVdrCPU;
string lastVdrMEM;
sDVBAPIEcmInfo lastEcmInfo;
void RecName(string &path, string &name, string &folder);
void RecPoster(const cRecording *rec, int &posterWidth, int &posterHeight, string &path, bool &hasPoster);
2015-05-10 12:55:23 +02:00
void SetCurrentScheduleFromChannel(const cChannel *channel, stringmap &stringTokens, intmap &intTokens);
void SetCurrentScheduleFromRecording(const cRecording *recording, stringmap &stringTokens, intmap &intTokens);
bool CompareECMInfos(sDVBAPIEcmInfo *ecmInfo);
2014-10-25 20:10:00 +02:00
protected:
void InitDevices(void);
2015-05-10 12:55:23 +02:00
bool SetDevices(bool initial, bool light, intmap *intTokens, vector<stringmap> *devices);
bool CheckNewMails(void);
int GetLiveBuffer(void);
2015-05-10 12:55:23 +02:00
void SetScraperTokens(const cEvent *event, const cRecording *recording, stringmap &stringTokens, intmap &intTokens, map < string, vector<stringmap> > &loopTokens);
void SetPosterBanner(const cEvent *event, stringmap &stringTokens, intmap &intTokens);
void SetPosterBannerV2(const cRecording *recording, stringmap &stringTokens, intmap &intTokens);
2015-05-10 12:55:23 +02:00
void SetTimers(map<string,int> *intTokens, map<string,string> *stringTokens, vector<stringmap> *timers);
void SetLastRecordings(map<string,int> *intTokens, map<string,string> *stringTokens, vector<stringmap> *lastRecordings);
void SetMenuHeader(eMenuCategory cat, string menuTitle, stringmap &stringTokens, intmap &intTokens);
void SetCurrentSchedule(string recName, stringmap &stringTokens, intmap &intTokens);
bool SetEcmInfos(int channelSid, stringmap &stringTokens, intmap &intTokens);
void SetMenuMessage(eMessageType type, string text, stringmap &stringTokens, intmap &intTokens);
2014-10-25 20:10:00 +02:00
public:
cViewHelpers(void);
virtual ~cViewHelpers(void);
2015-05-10 12:55:23 +02:00
bool SetDate (bool forced, stringmap &stringTokens, intmap &intTokens);
bool SetTime (bool forced, stringmap &stringTokens, intmap &intTokens);
bool SetSignal (bool forced, stringmap &stringTokens, intmap &intTokens);
bool SetCurrentWeatherTokens(bool forced, stringmap &stringTokens, intmap &intTokens);
bool SetDiscUsage (bool forced, stringmap &stringTokens, intmap &intTokens);
bool SetSystemLoad (bool forced, stringmap &stringTokens, intmap &intTokens);
bool SetSystemMemory (bool forced, stringmap &stringTokens, intmap &intTokens);
bool SetSystemTemperatures (bool forced, stringmap &stringTokens, intmap &intTokens);
bool SetVDRStats (bool forced, stringmap &stringTokens, intmap &intTokens);
2015-05-10 12:55:23 +02:00
bool SetDummy (bool forced, stringmap &stringTokens, intmap &intTokens);
2014-10-25 20:10:00 +02:00
};
#endif //__VIEWHELPERS_H