vdr 2.7.7
|
#include "svdrp.h"
#include <arpa/inet.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <ifaddrs.h>
#include <netinet/in.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <unistd.h>
#include "channels.h"
#include "config.h"
#include "device.h"
#include "eitscan.h"
#include "keys.h"
#include "menu.h"
#include "plugin.h"
#include "recording.h"
#include "remote.h"
#include "skins.h"
#include "timers.h"
#include "videodir.h"
Go to the source code of this file.
Classes | |
class | cIpAddress |
class | cSocket |
class | cSVDRPClient |
class | cSVDRPServerParams |
class | cSVDRPClientHandler |
class | cPUTEhandler |
class | cSVDRPServer |
class | cSVDRPServerHandler |
Macros | |
#define | dbgsvdrp(a...) |
#define | MAXUDPBUF 1024 |
#define | SVDRPResonseTimeout 5000 |
#define | SVDRPDiscoverDelta 60 |
#define | MAXHELPTOPIC 10 |
#define | EITDISABLETIME 10 |
#define | CMD(c) |
Enumerations | |
enum | eSvdrpFetchFlags { sffNone = 0b00000000 , sffConn = 0b00000001 , sffPing = 0b00000010 , sffTimers = 0b00000100 } |
Functions | |
cStateKey | StateKeySVDRPRemoteTimersPoll (true) |
const char * | GetHelpTopic (const char *HelpPage) |
const char * | GetHelpPage (const char *Cmd, const char **p) |
static cString | RecordingInUseMessage (int Reason, const char *RecordingId, cRecording *Recording) |
void | SetSVDRPPorts (int TcpPort, int UdpPort) |
void | SetSVDRPGrabImageDir (const char *GrabImageDir) |
void | StartSVDRPHandler (void) |
void | StopSVDRPHandler (void) |
bool | GetSVDRPServerNames (cStringList *ServerNames) |
bool | ExecSVDRPCommand (const char *ServerName, const char *Command, cStringList *Response) |
void | BroadcastSVDRPCommand (const char *Command) |
Variables | |
static bool | DumpSVDRPDataTransfer = false |
static int | SVDRPTcpPort = 0 |
static int | SVDRPUdpPort = 0 |
static cPoller | SVDRPClientPoller |
static cSVDRPClientHandler * | SVDRPClientHandler = NULL |
const char * | HelpPages [] |
static cString | grabImageDir |
static cPoller | SVDRPServerPoller |
static cSVDRPServerHandler * | SVDRPServerHandler = NULL |
static cMutex | SVDRPHandlerMutex |
#define CMD | ( | c | ) |
Definition at line 2673 of file svdrp.c.
Referenced by cSVDRPServer::Execute().
#define dbgsvdrp | ( | a... | ) |
Definition at line 45 of file svdrp.c.
Referenced by cSocket::Accept(), cSocket::Connect(), cSocket::Discover(), cSVDRPClient::Process(), cSVDRPServer::Process(), cSVDRPClient::Send(), cSVDRPServer::Send(), and cSocket::SendDgram().
#define EITDISABLETIME 10 |
Definition at line 839 of file svdrp.c.
Referenced by cSVDRPServer::CmdCLRE(), and cSVDRPServer::Execute().
#define MAXHELPTOPIC 10 |
Definition at line 838 of file svdrp.c.
Referenced by GetHelpTopic(), and cSVDRPServer::PrintHelpTopics().
#define MAXUDPBUF 1024 |
Definition at line 99 of file svdrp.c.
Referenced by cSocket::Discover().
#define SVDRPDiscoverDelta 60 |
Referenced by cSVDRPClientHandler::Action().
#define SVDRPResonseTimeout 5000 |
Referenced by cSVDRPClient::Process().
enum eSvdrpFetchFlags |
void BroadcastSVDRPCommand | ( | const char * | Command | ) |
Sends the given SVDRP Command string to all remote VDRs.
Definition at line 2934 of file svdrp.c.
References ExecSVDRPCommand(), cVector< T >::Size(), SVDRPClientHandler, and SVDRPHandlerMutex.
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 the response strings in Response.
If no Response parameter is given, the response from command execution is ignored. Returns true if the data exchange was successful. Whether or not the actual SVDRP command was successful depends on the resulting strings from the remote VDR, which can be accessed through Response. If Response is given, it will be cleared before the command is actually executed.
Definition at line 2925 of file svdrp.c.
References SVDRPClientHandler, and SVDRPHandlerMutex.
Referenced by BroadcastSVDRPCommand(), HandleRemoteTimerModifications(), and cMenuTimers::OnOff().
const char * GetHelpPage | ( | const char * | Cmd, |
const char ** | p ) |
Definition at line 1073 of file svdrp.c.
References GetHelpTopic().
Referenced by cSVDRPServer::CmdHELP(), and cSVDRPServer::CmdPLUG().
const char * GetHelpTopic | ( | const char * | HelpPage | ) |
Definition at line 1055 of file svdrp.c.
References MAXHELPTOPIC.
Referenced by GetHelpPage(), and cSVDRPServer::PrintHelpTopics().
bool GetSVDRPServerNames | ( | cStringList * | ServerNames | ) |
Gets a list of all available VDRs this VDR is connected to via SVDRP, and stores it in the given ServerNames list.
The list is cleared before getting the server names. Returns true if the resulting list is not empty.
Definition at line 2916 of file svdrp.c.
References SVDRPClientHandler, and SVDRPHandlerMutex.
Referenced by cMenuEditTimer::cMenuEditTimer(), and cMenuSetupMisc::Set().
|
static |
Definition at line 1497 of file svdrp.c.
References cRecording::FileName(), cRecordControls::GetRecordControl(), cTimer::Id(), ruCopy, ruCut, ruMove, ruReplay, ruTimer, cString::sprintf(), and cRecordControl::Timer().
Referenced by cSVDRPServer::CmdCPYR(), cSVDRPServer::CmdDELR(), and cSVDRPServer::CmdMOVR().
void SetSVDRPGrabImageDir | ( | const char * | GrabImageDir | ) |
void SetSVDRPPorts | ( | int | TcpPort, |
int | UdpPort ) |
Definition at line 2801 of file svdrp.c.
References SVDRPTcpPort, and SVDRPUdpPort.
Referenced by main().
void StartSVDRPHandler | ( | void | ) |
Definition at line 2891 of file svdrp.c.
References Setup, SVDRPClientHandler, SVDRPHandlerMutex, SVDRPServerHandler, SVDRPTcpPort, and SVDRPUdpPort.
Referenced by main(), and cMenuSetupMisc::ProcessKey().
cStateKey StateKeySVDRPRemoteTimersPoll | ( | true | ) |
Referenced by cSVDRPClientHandler::ProcessConnections().
void StopSVDRPHandler | ( | void | ) |
Definition at line 2907 of file svdrp.c.
References SVDRPClientHandler, SVDRPHandlerMutex, and SVDRPServerHandler.
Referenced by main(), and cMenuSetupMisc::ProcessKey().
|
static |
Definition at line 1086 of file svdrp.c.
Referenced by cSVDRPServer::CmdGRAB(), and SetSVDRPGrabImageDir().
const char* HelpPages[] |
Definition at line 842 of file svdrp.c.
Referenced by cSVDRPServer::CmdHELP(), and cPluginSvdrpdemo::SVDRPHelpPages().
|
static |
Definition at line 613 of file svdrp.c.
Referenced by BroadcastSVDRPCommand(), cSVDRPServer::CmdCONN(), cSVDRPServer::CmdPOLL(), ExecSVDRPCommand(), GetSVDRPServerNames(), cSVDRPServerHandler::ProcessConnections(), StartSVDRPHandler(), and StopSVDRPHandler().
|
static |
Definition at line 342 of file svdrp.c.
Referenced by cSVDRPClientHandler::Action(), cSVDRPClient::Close(), and cSVDRPClient::cSVDRPClient().
|
static |
Definition at line 2889 of file svdrp.c.
Referenced by BroadcastSVDRPCommand(), ExecSVDRPCommand(), GetSVDRPServerNames(), StartSVDRPHandler(), and StopSVDRPHandler().
|
static |
Definition at line 2829 of file svdrp.c.
Referenced by StartSVDRPHandler(), and StopSVDRPHandler().
|
static |
Definition at line 1149 of file svdrp.c.
Referenced by cSVDRPServerHandler::Action(), cSVDRPServer::Close(), and cSVDRPServer::cSVDRPServer().
|
static |
Definition at line 47 of file svdrp.c.
Referenced by cSVDRPClientHandler::ProcessConnections(), SetSVDRPPorts(), and StartSVDRPHandler().
|
static |
Definition at line 48 of file svdrp.c.
Referenced by SetSVDRPPorts(), and StartSVDRPHandler().