2014-10-25 20:10:00 +02:00
|
|
|
#ifndef __VIEWHELPERS_H
|
|
|
|
#define __VIEWHELPERS_H
|
|
|
|
|
2014-11-01 13:19:07 +01:00
|
|
|
class cViewHelpers {
|
2014-10-25 20:10:00 +02:00
|
|
|
private:
|
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;
|
2015-03-28 11:57:51 +01:00
|
|
|
int lSignalDisplay;
|
|
|
|
int lSignalStrength;
|
|
|
|
int lSignalQuality;
|
2015-01-06 06:07:48 +01:00
|
|
|
int lastSecond;
|
|
|
|
int lastMinute;
|
2015-03-28 11:57:51 +01:00
|
|
|
double lastSystemLoad;
|
|
|
|
int lastMemUsage;
|
2015-03-29 13:29:59 +02:00
|
|
|
void RecName(string &path, string &name, string &folder);
|
|
|
|
void RecPoster(const cRecording *rec, int &posterWidth, int &posterHeight, string &path, bool &hasPoster);
|
2015-04-01 10:14:26 +02:00
|
|
|
void SetCurrentScheduleFromChannel(const cChannel *channel, map < string, string > &stringTokens, map < string, int > &intTokens);
|
|
|
|
void SetCurrentScheduleFromRecording(const cRecording *recording, map < string, string > &stringTokens, map < string, int > &intTokens);
|
2014-10-25 20:10:00 +02:00
|
|
|
protected:
|
2014-10-28 16:39:42 +01:00
|
|
|
void InitDevices(void);
|
2015-04-01 13:26:36 +02:00
|
|
|
bool SetDevices(bool initial, bool light, map<string,int> *intTokens, vector<map<string,string> > *devices);
|
2015-03-28 11:57:51 +01:00
|
|
|
bool SetSignal(map < string, int > &intTokens);
|
2014-11-15 16:24:07 +01:00
|
|
|
bool CheckNewMails(void);
|
2014-11-29 11:23:54 +01:00
|
|
|
void SetScraperTokens(const cEvent *event, const cRecording *recording, map < string, string > &stringTokens, map < string, int > &intTokens, map < string, vector< map< string, string > > > &loopTokens);
|
2015-03-28 11:57:51 +01:00
|
|
|
void SetPosterBanner(const cEvent *event, map < string, string > &stringTokens, map < string, int > &intTokens);
|
2015-01-06 06:07:48 +01:00
|
|
|
bool SetTime(map < string, string > &stringTokens, map < string, int > &intTokens);
|
|
|
|
bool SetDate(map < string, string > &stringTokens, map < string, int > &intTokens);
|
2015-01-14 14:20:22 +01:00
|
|
|
bool SetCurrentWeatherTokens(map < string, string > &stringTokens, map < string, int > &intTokens);
|
2015-03-28 11:57:51 +01:00
|
|
|
void SetTimers(map<string,int> *intTokens, map<string,string> *stringTokens, vector<map<string,string> > *timers);
|
2015-03-29 13:29:59 +02:00
|
|
|
void SetLastRecordings(map<string,int> *intTokens, map<string,string> *stringTokens, vector<map<string,string> > *lastRecordings);
|
2015-03-28 11:57:51 +01:00
|
|
|
void SetMenuHeader(eMenuCategory cat, string menuTitle, map < string, string > &stringTokens, map < string, int > &intTokens);
|
|
|
|
void SetDiscUsage(map < string, string > &stringTokens, map < string, int > &intTokens);
|
|
|
|
bool SetSystemLoad(map < string, string > &stringTokens, map < string, int > &intTokens);
|
|
|
|
bool SetSystemMemory(map < string, string > &stringTokens, map < string, int > &intTokens);
|
|
|
|
bool SetSystemTemperatures(map < string, string > &stringTokens, map < string, int > &intTokens);
|
2015-04-01 10:14:26 +02:00
|
|
|
void SetCurrentSchedule(string recName, map < string, string > &stringTokens, map < string, int > &intTokens);
|
2014-10-25 20:10:00 +02:00
|
|
|
public:
|
|
|
|
cViewHelpers(void);
|
|
|
|
virtual ~cViewHelpers(void);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif //__VIEWHELPERS_H
|