diff options
author | thlo <smarttv640@gmail.com> | 2013-08-17 21:55:16 +0200 |
---|---|---|
committer | thlo <smarttv640@gmail.com> | 2013-08-17 21:55:16 +0200 |
commit | ad45f2d55557a83a1fb45ca70d35453fd83d3973 (patch) | |
tree | a9f5f7cac456008d3c4b035dda8b272ec7baf0b0 /smarttvfactory.h | |
parent | e4f6f53197f655f63fff7422634e4f622a4fa91c (diff) | |
download | vdr-plugin-smarttvweb-ad45f2d55557a83a1fb45ca70d35453fd83d3973.tar.gz vdr-plugin-smarttvweb-ad45f2d55557a83a1fb45ca70d35453fd83d3973.tar.bz2 |
RecCmds APIs.
Diffstat (limited to 'smarttvfactory.h')
-rwxr-xr-x[-rw-r--r--] | smarttvfactory.h | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/smarttvfactory.h b/smarttvfactory.h index 0a86545..ab46e2b 100644..100755 --- a/smarttvfactory.h +++ b/smarttvfactory.h @@ -38,6 +38,7 @@ #ifndef STANDALONE #include <vdr/recording.h> +#include <vdr/config.h> #include <vdr/status.h> #else @@ -57,6 +58,16 @@ struct sClientEntry { sClientEntry(string m, string i, time_t t ): mac(m), ip(i), lastKeepAlive(t) {}; }; +class cCmd { + public: + cCmd(string t); + void trim(string& t); + + string mTitle; + string mCommand; + bool mConfirm; +}; + class SmartTvServer : public cStatus { public: @@ -90,17 +101,24 @@ class SmartTvServer : public cStatus { void pushCfgServerAddressToTv( string tv_addr); + string getRecCmdsMsg() { return mRecMsg; }; + vector<cCmd*>* getRecCmds() { return &mRecCmds; }; + + void OsdStatusMessage(const char *Message); + private: void addHttpResource(int fd, cHttpResourceBase* resource); void pushToClients(cHttpResourceBase* resource); int connectToClient(string peer, time_t last_update); void setNonBlocking(int fd); - + + void initRecCmds(); // status callbacks void Recording(const cDevice *Device, const char *Name, const char *FileName, bool On); void TimerChange(const cTimer *Timer, eTimerChange Change); - void OsdStatusMessage(const char *Message); + + string processNestedItemList(string, cList<cNestedItem> *, vector<cCmd*>*); pthread_t mThreadId; int mRequestCount; @@ -114,6 +132,9 @@ class SmartTvServer : public cStatus { vector<cHttpResourceBase*> clientList; vector<sClientEntry*> mConTvClients; + vector<cCmd*> mRecCmds; + string mRecMsg; + int mActiveSessions; int mHttpClientId; @@ -125,6 +146,9 @@ class SmartTvServer : public cStatus { fd_set mWriteState; cManageUrls* mManagedUrls; + + string mRecCmdMsg; + vector<string> mRecCmdList; }; |