mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
- Fixed missing initialization of 'number' in cChannel (thanks to Martin Hammerschmid for reporting this one). - Fixed a misplaced ')' in the fix about the stale lock files (thanks again to Oliver Endriss for pointing this out - it was my fault). - Group delimiters in the 'channels.conf' file that have no text (like a simple ":" or ":@201") no longer show up in the Channels menu (suggested by Guy Roussin). - Added "Tele 5" to 'channels.conf' (thanks to Georg Hitsch). - Changed the source directory name for plugins from 'SRC' to 'src' (suggested by Clemens Kirchgatterer). - Removed transponders 10788, 11739 and 12266 from 'channels.conf' (apparently they are no longer active). - Deactivated some templates in tools.h in case some plugin needs to use the STL (suggested by Gerald Berwolf). - Timers now accept channel IDs even if the 'source' is 0 (thanks to Stefan Huelswitt for reporting this one). - Now taking an active SVDRP connection into account when doing shutdown or housekeeping (suggested by Emil Naepflein). - Macros in 'keymacros.conf' can now use "@plugin" to directly access the main menu function of a given plugin (see man vdr(5) for details). - The new plugin 'sky' can be used to integrate a Sky Digibox into the VDR system, using a Kfir MPEG2 encoder card (see PLUGINS/src/sky/README for details).
88 lines
2.0 KiB
C++
88 lines
2.0 KiB
C++
/*
|
|
* 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.18 2002/11/30 14:36:04 kls Exp $
|
|
*/
|
|
|
|
#ifndef __SVDRP_H
|
|
#define __SVDRP_H
|
|
|
|
#include "recording.h"
|
|
#include "tools.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 cPUTEhandler {
|
|
private:
|
|
FILE *f;
|
|
int status;
|
|
const char *message;
|
|
public:
|
|
cPUTEhandler(void);
|
|
~cPUTEhandler();
|
|
bool Process(const char *s);
|
|
int Status(void) { return status; }
|
|
const char *Message(void) { return message; }
|
|
};
|
|
|
|
class cSVDRP {
|
|
private:
|
|
cSocket socket;
|
|
cFile file;
|
|
cRecordings Recordings;
|
|
cPUTEhandler *PUTEhandler;
|
|
uint numChars;
|
|
char cmdLine[MAXPARSEBUFFER];
|
|
char *message;
|
|
time_t lastActivity;
|
|
void Close(bool Timeout = false);
|
|
bool Send(const char *s, int length = -1);
|
|
void Reply(int Code, const char *fmt, ...);
|
|
void CmdCHAN(const char *Option);
|
|
void CmdCLRE(const char *Option);
|
|
void CmdDELC(const char *Option);
|
|
void CmdDELR(const char *Option);
|
|
void CmdDELT(const char *Option);
|
|
void CmdGRAB(const char *Option);
|
|
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);
|
|
void CmdLSTT(const char *Option);
|
|
void CmdMESG(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 CmdNEXT(const char *Option);
|
|
void CmdPUTE(const char *Option);
|
|
void CmdUPDT(const char *Option);
|
|
void CmdVOLU(const char *Option);
|
|
void Execute(char *Cmd);
|
|
public:
|
|
cSVDRP(int Port);
|
|
~cSVDRP();
|
|
bool HasConnection(void) { return file.IsOpen(); }
|
|
bool Process(void);
|
|
char *GetMessage(void);
|
|
};
|
|
|
|
#endif //__SVDRP_H
|