diff options
Diffstat (limited to 'server/connectionVTP.h')
-rw-r--r-- | server/connectionVTP.h | 42 |
1 files changed, 30 insertions, 12 deletions
diff --git a/server/connectionVTP.h b/server/connectionVTP.h index 4645b65..a0e6a9c 100644 --- a/server/connectionVTP.h +++ b/server/connectionVTP.h @@ -3,17 +3,31 @@ #include "server/connection.h" -class cDevice; class cTBSocket; class cStreamdevLiveStreamer; +class cLSTEHandler; +class cLSTCHandler; +class cLSTTHandler; class cConnectionVTP: public cServerConnection { + friend class cLSTEHandler; + private: - cTBSocket *m_DataSockets[si_Count]; + cTBSocket *m_LiveSocket; cStreamdevLiveStreamer *m_LiveStreamer; - // Members adopted from SVDRP + char *m_LastCommand; + bool m_NoTSPIDS; + + // Members adopted for SVDRP cRecordings Recordings; + cLSTEHandler *m_LSTEHandler; + cLSTCHandler *m_LSTCHandler; + cLSTTHandler *m_LSTTHandler; + +protected: + template<class cHandler> + bool CmdLSTX(cHandler *&Handler, char *Option); public: cConnectionVTP(void); @@ -25,7 +39,7 @@ public: virtual void Detach(void); virtual void Attach(void); - bool Command(char *Cmd); + virtual bool Command(char *Cmd); bool CmdCAPS(char *Opts); bool CmdPROV(char *Opts); bool CmdPORT(char *Opts); @@ -38,17 +52,21 @@ public: bool CmdQUIT(char *Opts); bool CmdSUSP(char *Opts); - // Commands adopted from SVDRP - bool ReplyWrapper(int Code, const char *fmt, ...); + // Thread-safe implementations of SVDRP commands bool CmdLSTE(char *Opts); - bool CmdLSTR(char *Opts); - bool CmdDELR(char *Opts); + bool CmdLSTC(char *Opts); bool CmdLSTT(char *Opts); - bool CmdMODT(char *Opts); - bool CmdNEWT(char *Opts); - bool CmdDELT(char *Opts); - bool Respond(int Code, const std::string &Message); + // Commands adopted from SVDRP + bool CmdMODT(const char *Option); + bool CmdNEWT(const char *Option); + bool CmdDELT(const char *Option); + + //bool CmdLSTR(char *Opts); + //bool CmdDELR(char *Opts); + + bool Respond(int Code, const char *Message, ...) + __attribute__ ((format (printf, 3, 4))); }; #endif // VDR_STREAMDEV_SERVERS_CONNECTIONVTP_H |