vdr-plugin-streamdev/server/connectionVTP.h

81 lines
1.9 KiB
C
Raw Normal View History

2010-12-02 08:53:01 +01:00
#ifndef VDR_STREAMDEV_SERVERS_CONNECTIONVTP_H
#define VDR_STREAMDEV_SERVERS_CONNECTIONVTP_H
#include "server/connection.h"
class cTBSocket;
2010-12-02 08:59:14 +01:00
class cStreamdevLiveStreamer;
class cStreamdevFilterStreamer;
2010-12-02 08:53:01 +01:00
class cLSTEHandler;
class cLSTCHandler;
class cLSTTHandler;
class cConnectionVTP: public cServerConnection {
friend class cLSTEHandler;
2010-12-02 09:43:13 +01:00
#if !defined __GNUC__ || __GNUC__ >= 3
2010-12-02 08:53:01 +01:00
using cServerConnection::Respond;
2010-12-02 09:43:13 +01:00
#endif
2010-12-02 08:53:01 +01:00
private:
2010-12-02 08:59:14 +01:00
cTBSocket *m_LiveSocket;
cStreamdevLiveStreamer *m_LiveStreamer;
cTBSocket *m_FilterSocket;
cStreamdevFilterStreamer *m_FilterStreamer;
2010-12-02 08:53:01 +01:00
char *m_LastCommand;
2010-12-02 09:00:32 +01:00
eStreamType m_StreamType;
2010-12-02 09:02:31 +01:00
bool m_FiltersSupport;
2010-12-02 08:53:01 +01:00
// 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);
2010-12-02 08:56:19 +01:00
virtual bool Abort(void) const;
2010-12-02 08:53:01 +01:00
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);
2010-12-02 08:59:14 +01:00
bool CmdQUIT(void);
bool CmdSUSP(void);
2010-12-02 08:53:01 +01:00
// 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