vdr  2.4.0
svdrp.h
Go to the documentation of this file.
1 /*
2  * svdrp.h: Simple Video Disk Recorder Protocol
3  *
4  * See the main source file 'vdr.c' for copyright information and
5  * how to reach the author.
6  *
7  * $Id: svdrp.h 4.11 2018/03/15 16:30:29 kls Exp $
8  */
9 
10 #ifndef __SVDRP_H
11 #define __SVDRP_H
12 
13 #include "thread.h"
14 #include "tools.h"
15 
17  spmOff = 0,
18  spmAny = 1,
19  spmOnly = 2,
20  };
21 
25 
26 void SetSVDRPPorts(int TcpPort, int UdpPort);
27 void SetSVDRPGrabImageDir(const char *GrabImageDir);
28 void StartSVDRPHandler(void);
29 void StopSVDRPHandler(void);
30 bool GetSVDRPServerNames(cStringList *ServerNames);
35 bool ExecSVDRPCommand(const char *ServerName, const char *Command, cStringList *Response = NULL);
45 void BroadcastSVDRPCommand(const char *Command);
47 inline int SVDRPCode(const char *s) { return s ? atoi(s) : 0; }
50 inline const char *SVDRPValue(const char *s) { return s && s[0] && s[1] && s[2] && s[3] ? s + 4 : NULL; }
53 
54 #endif //__SVDRP_H
void BroadcastSVDRPCommand(const char *Command)
Sends the given SVDRP Command string to all remote VDRs.
Definition: svdrp.c:2861
Definition: svdrp.h:17
eSvdrpPeerModes
Definition: svdrp.h:16
Definition: svdrp.h:19
bool GetSVDRPServerNames(cStringList *ServerNames)
Gets a list of all available VDRs this VDR is connected to via SVDRP, and stores it in the given Serv...
Definition: svdrp.c:2837
bool ExecSVDRPCommand(const char *ServerName, const char *Command, cStringList *Response=NULL)
Sends the given SVDRP Command string to the remote VDR identified by ServerName and collects all of t...
Definition: svdrp.c:2849
cStateKey StateKeySVDRPRemoteTimersPoll
Controls whether a change to the local list of timers needs to result in sending a POLL to the remote...
const char * SVDRPValue(const char *s)
Returns the actual value of the given SVDRP response string, skipping the three digit reply code and ...
Definition: svdrp.h:50
void StartSVDRPHandler(void)
Definition: svdrp.c:2812
void SetSVDRPGrabImageDir(const char *GrabImageDir)
Definition: svdrp.c:2730
void StopSVDRPHandler(void)
Definition: svdrp.c:2828
void SetSVDRPPorts(int TcpPort, int UdpPort)
Definition: svdrp.c:2724
Definition: svdrp.h:18
int SVDRPCode(const char *s)
Returns the value of the three digit reply code of the given SVDRP response string.
Definition: svdrp.h:47