summaryrefslogtreecommitdiff
path: root/svdrp.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2000-07-23 15:01:31 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2000-07-23 15:01:31 +0200
commit52514313fbb740517a65da615de18d3e6e9e151a (patch)
treeea146bb811e2d3910b02b200dadc8e92a3eeab30 /svdrp.h
parenta91ff70bf20ec3ed0d53a40b688c31206e79d35f (diff)
downloadvdr-52514313fbb740517a65da615de18d3e6e9e151a.tar.gz
vdr-52514313fbb740517a65da615de18d3e6e9e151a.tar.bz2
Implemented SVDRP
Diffstat (limited to 'svdrp.h')
-rw-r--r--svdrp.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/svdrp.h b/svdrp.h
new file mode 100644
index 00000000..c6385424
--- /dev/null
+++ b/svdrp.h
@@ -0,0 +1,52 @@
+/*
+ * svdrp.h: Simple Video Disk Recorder Protocol
+ *
+ * See the main source file 'vdr.c' for copyright information and
+ * how to reach the author.
+ *
+ * $Id: svdrp.h 1.1 2000/07/23 14:49:30 kls Exp $
+ */
+
+#ifndef __SVDRP_H
+#define __SVDRP_H
+
+class cSocket {
+private:
+ int port;
+ int sock;
+ int queue;
+ void Close(void);
+public:
+ cSocket(int Port, int Queue = 1);
+ ~cSocket();
+ bool Open(void);
+ int Accept(void);
+ };
+
+class cSVDRP {
+private:
+ cSocket socket;
+ int filedes;
+ void Close(void);
+ bool Send(const char *s, int length = -1);
+ void Reply(int Code, const char *fmt, ...);
+ void CmdChan(const char *Option);
+ void CmdDelc(const char *Option);
+ void CmdDelt(const char *Option);
+ void CmdHelp(const char *Option);
+ void CmdLstc(const char *Option);
+ void CmdLstt(const char *Option);
+ void CmdModc(const char *Option);
+ void CmdModt(const char *Option);
+ void CmdMovc(const char *Option);
+ void CmdMovt(const char *Option);
+ void CmdNewc(const char *Option);
+ void CmdNewt(const char *Option);
+ void Execute(char *Cmd);
+public:
+ cSVDRP(int Port);
+ ~cSVDRP();
+ void Process(void);
+ };
+
+#endif //__SVDRP_H