diff options
author | Frank Schmirler <schmirl@puter.linogate.de> | 2010-12-02 08:53:01 +0100 |
---|---|---|
committer | Frank Schmirler <schmirl@puter.linogate.de> | 2010-12-02 08:53:01 +0100 |
commit | 5e30711bfdb28085234a5ef6da4f4e44305ac3e4 (patch) | |
tree | d15809d23eeeed7fda55d9450b1af7c99d6eb5d6 /server/connectionVTP.h | |
download | vdr-plugin-streamdev-5e30711bfdb28085234a5ef6da4f4e44305ac3e4.tar.gz vdr-plugin-streamdev-5e30711bfdb28085234a5ef6da4f4e44305ac3e4.tar.bz2 |
Snapshot 2007-03-20
Diffstat (limited to 'server/connectionVTP.h')
-rw-r--r-- | server/connectionVTP.h | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/server/connectionVTP.h b/server/connectionVTP.h new file mode 100644 index 0000000..a8e76eb --- /dev/null +++ b/server/connectionVTP.h @@ -0,0 +1,75 @@ +#ifndef VDR_STREAMDEV_SERVERS_CONNECTIONVTP_H +#define VDR_STREAMDEV_SERVERS_CONNECTIONVTP_H + +#include "server/connection.h" + +class cTBSocket; +class cStreamdevLiveStreamer; +class cLSTEHandler; +class cLSTCHandler; +class cLSTTHandler; + +class cConnectionVTP: public cServerConnection { + friend class cLSTEHandler; + // if your compiler doesn't understand the following statement + // (e.g. gcc 2.x), simply remove it and try again ;-) + using cServerConnection::Respond; + +private: + cTBSocket *m_LiveSocket; + cStreamdevLiveStreamer *m_LiveStreamer; + + 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); + virtual ~cConnectionVTP(); + + virtual void Welcome(void); + virtual void Reject(void); + + virtual void Detach(void); + virtual void Attach(void); + + virtual bool Command(char *Cmd); + bool CmdCAPS(char *Opts); + bool CmdPROV(char *Opts); + bool CmdPORT(char *Opts); + bool CmdTUNE(char *Opts); + bool CmdADDP(char *Opts); + bool CmdDELP(char *Opts); + bool CmdADDF(char *Opts); + bool CmdDELF(char *Opts); + bool CmdABRT(char *Opts); + bool CmdQUIT(char *Opts); + bool CmdSUSP(char *Opts); + + // Thread-safe implementations of SVDRP commands + bool CmdLSTE(char *Opts); + bool CmdLSTC(char *Opts); + bool CmdLSTT(char *Opts); + + // 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 |