1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00
vdr/svdrp.h

77 lines
1.8 KiB
C
Raw Normal View History

2000-07-23 15:01:31 +02:00
/*
* 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.12 2001/10/27 11:36:49 kls Exp $
2000-07-23 15:01:31 +02:00
*/
#ifndef __SVDRP_H
#define __SVDRP_H
2000-09-17 13:47:06 +02:00
#include "dvbapi.h"
#include "recording.h"
#include "tools.h"
2000-07-23 15:01:31 +02:00
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;
cFile file;
2000-09-17 13:47:06 +02:00
CRect ovlClipRects[MAXCLIPRECTS];
cRecordings Recordings;
uint numChars;
char cmdLine[MAXPARSEBUFFER];
char *message;
time_t lastActivity;
void Close(bool Timeout = false);
2000-07-23 15:01:31 +02:00
bool Send(const char *s, int length = -1);
void Reply(int Code, const char *fmt, ...);
2000-09-17 09:36:50 +02:00
void CmdCHAN(const char *Option);
void CmdDELC(const char *Option);
void CmdDELR(const char *Option);
2000-09-17 09:36:50 +02:00
void CmdDELT(const char *Option);
2000-09-17 11:53:35 +02:00
void CmdGRAB(const char *Option);
2000-09-17 09:36:50 +02:00
void CmdHELP(const char *Option);
void CmdHITK(const char *Option);
void CmdLSTC(const char *Option);
void CmdLSTE(const char *Option);
void CmdLSTR(const char *Option);
2000-09-17 09:36:50 +02:00
void CmdLSTT(const char *Option);
void CmdMESG(const char *Option);
2000-09-17 09:36:50 +02:00
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 CmdNEXT(const char *Option);
2000-09-17 13:47:06 +02:00
void CmdOVLF(const char *Option);
void CmdOVLG(const char *Option);
void CmdOVLC(const char *Option);
void CmdOVLP(const char *Option);
void CmdOVLO(const char *Option);
2000-09-17 09:36:50 +02:00
void CmdUPDT(const char *Option);
2000-07-23 15:01:31 +02:00
void Execute(char *Cmd);
public:
cSVDRP(int Port);
~cSVDRP();
void Process(void);
char *GetMessage(void);
2000-07-23 15:01:31 +02:00
};
#endif //__SVDRP_H