Home

Dokumentation

Impressum

Dokumentation VDR
 

Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals  

svdrp.h

Go to the documentation of this file.
00001 
00010 #ifndef __SVDRP_H
00011 #define __SVDRP_H
00012 
00013 #include "recording.h"
00014 #include "tools.h"
00015 
00017 class cSocket {
00018 private:
00019   int port;
00020   int sock;
00021   int queue;
00022   void Close(void);
00023 public:
00024   cSocket(int Port, int Queue = 1);
00025   ~cSocket();
00026   bool Open(void);
00027   int Accept(void);
00028   };
00029 
00031 class cPUTEhandler {
00032 private:
00033   FILE *f;
00034   int status;
00035   const char *message;
00036 public:
00037   cPUTEhandler(void);
00038   ~cPUTEhandler();
00039   bool Process(const char *s);
00040   int Status(void) { return status; }
00041   const char *Message(void) { return message; }
00042   };
00043 
00045 class cSVDRP {
00046 private:
00047   cSocket socket;
00048   cFile file;
00049   cRecordings Recordings;
00050   cPUTEhandler *PUTEhandler;
00051   uint numChars;
00052   char cmdLine[MAXPARSEBUFFER];
00053   char *message;
00054   time_t lastActivity;
00055   void Close(bool Timeout = false);
00056   bool Send(const char *s, int length = -1);
00057   void Reply(int Code, const char *fmt, ...);
00058   void CmdCHAN(const char *Option);
00059   void CmdCLRE(const char *Option);
00060   void CmdDELC(const char *Option);
00061   void CmdDELR(const char *Option);
00062   void CmdDELT(const char *Option);
00063   void CmdGRAB(const char *Option);
00064   void CmdHELP(const char *Option);
00065   void CmdHITK(const char *Option);
00066   void CmdLSTC(const char *Option);
00067   void CmdLSTE(const char *Option);
00068   void CmdLSTR(const char *Option);
00069   void CmdLSTT(const char *Option);
00070   void CmdMESG(const char *Option);
00071   void CmdMODC(const char *Option);
00072   void CmdMODT(const char *Option);
00073   void CmdMOVC(const char *Option);
00074   void CmdMOVT(const char *Option);
00075   void CmdNEWC(const char *Option);
00076   void CmdNEWT(const char *Option);
00077   void CmdNEXT(const char *Option);
00078   void CmdPUTE(const char *Option);
00079   void CmdUPDT(const char *Option);
00080   void CmdVOLU(const char *Option);
00081   void Execute(char *Cmd);
00082 public:
00083   cSVDRP(int Port);
00084   ~cSVDRP();
00085   bool HasConnection(void) { return file.IsOpen(); }
00086   bool Process(void);
00087   char *GetMessage(void);
00088   };
00089 
00090 #endif //__SVDRP_H
00091 

Generated on Wed Feb 5 23:30:12 2003 for VDR by doxygen1.3-rc2