vdr 2.7.6
|
Public Member Functions | |
cSVDRPClientHandler (int TcpPort, int UdpPort) | |
virtual | ~cSVDRPClientHandler () override |
void | AddClient (cSVDRPServerParams &ServerParams, const char *IpAddress) |
bool | Execute (const char *ServerName, const char *Command, cStringList *Response=NULL) |
bool | GetServerNames (cStringList *ServerNames) |
bool | TriggerFetchingTimers (const char *ServerName) |
Public Member Functions inherited from cThread | |
cThread (const char *Description=NULL, bool LowPriority=false) | |
virtual | ~cThread () |
void | SetDescription (const char *Description,...) __attribute__((format(printf |
void bool | Start (void) |
bool | Active (void) |
Protected Member Functions | |
virtual void | Action (void) override |
Protected Member Functions inherited from cThread | |
void | SetPriority (int Priority) |
void | SetIOPriority (int Priority) |
void | Lock (void) |
void | Unlock (void) |
bool | Running (void) |
void | Cancel (int WaitSeconds=0) |
Private Member Functions | |
void | SendDiscover (void) |
void | HandleClientConnection (void) |
void | ProcessConnections (void) |
cSVDRPClient * | GetClientForServer (const char *ServerName) |
Private Attributes | |
cMutex | mutex |
int | tcpPort |
cSocket | udpSocket |
cVector< cSVDRPClient * > | clientConnections |
Additional Inherited Members | |
Static Public Member Functions inherited from cThread | |
static tThreadId | ThreadId (void) |
static tThreadId | IsMainThread (void) |
static void | SetMainThreadId (void) |
cSVDRPClientHandler::cSVDRPClientHandler | ( | int | TcpPort, |
int | UdpPort ) |
Definition at line 615 of file svdrp.c.
References cThread::cThread(), tcpPort, and udpSocket.
|
overridevirtual |
Definition at line 622 of file svdrp.c.
References cThread::Cancel(), and clientConnections.
|
overrideprotectedvirtual |
A derived cThread class must implement the code it wants to execute as a separate thread in this function.
If this is a loop, it must check Running() repeatedly to see whether it's time to stop.
Implements cThread.
Definition at line 713 of file svdrp.c.
References HandleClientConnection(), mutex, ProcessConnections(), cThread::Running(), SendDiscover(), SVDRPClientPoller, and udpSocket.
void cSVDRPClientHandler::AddClient | ( | cSVDRPServerParams & | ServerParams, |
const char * | IpAddress ) |
Definition at line 687 of file svdrp.c.
References clientConnections, cSVDRPServerParams::Host(), mutex, cSVDRPServerParams::Name(), cSVDRPServerParams::Port(), Setup, spmOnly, and cSVDRPServerParams::Timeout().
Referenced by HandleClientConnection().
bool cSVDRPClientHandler::Execute | ( | const char * | ServerName, |
const char * | Command, | ||
cStringList * | Response = NULL ) |
Definition at line 729 of file svdrp.c.
References GetClientForServer(), and mutex.
|
private |
Definition at line 629 of file svdrp.c.
References clientConnections.
Referenced by Execute(), and TriggerFetchingTimers().
bool cSVDRPClientHandler::GetServerNames | ( | cStringList * | ServerNames | ) |
Definition at line 737 of file svdrp.c.
References cVector< T >::Append(), cStringList::Clear(), clientConnections, cSVDRPClient::Connected(), mutex, cSVDRPClient::ServerName(), and cVector< T >::Size().
|
private |
Definition at line 701 of file svdrp.c.
References AddClient(), cSVDRPServerParams::Error(), esyslog, cSVDRPServerParams::Ok(), Setup, and udpSocket.
Referenced by Action().
|
private |
Definition at line 644 of file svdrp.c.
References APIVERSNUM, clientConnections, esyslog, cSVDRPClient::Execute(), cSVDRPClient::GetRemoteTimers(), cTimers::GetTimersRead(), cTimers::GetTimersWrite(), cSVDRPClient::HasFetchFlag(), cSVDRPClient::Process(), cSVDRPClient::ServerName(), cSVDRPClient::SetFetchFlag(), Setup, sffConn, sffPing, sffTimers, cString::sprintf(), StateKeySVDRPRemoteTimersPoll(), cTimers::StoreRemoteTimers(), SVDRPTcpPort, and VDRVERSNUM.
Referenced by Action().
|
private |
Definition at line 638 of file svdrp.c.
References APIVERSNUM, Setup, spmOnly, cString::sprintf(), tcpPort, udpSocket, and VDRVERSNUM.
Referenced by Action().
bool cSVDRPClientHandler::TriggerFetchingTimers | ( | const char * | ServerName | ) |
Definition at line 749 of file svdrp.c.
References GetClientForServer(), mutex, and sffTimers.
|
private |
Definition at line 597 of file svdrp.c.
Referenced by AddClient(), GetClientForServer(), GetServerNames(), ProcessConnections(), and ~cSVDRPClientHandler().
|
private |
Definition at line 594 of file svdrp.c.
Referenced by Action(), AddClient(), Execute(), GetServerNames(), and TriggerFetchingTimers().
|
private |
Definition at line 595 of file svdrp.c.
Referenced by cSVDRPClientHandler(), and SendDiscover().
|
private |
Definition at line 596 of file svdrp.c.
Referenced by Action(), cSVDRPClientHandler(), HandleClientConnection(), and SendDiscover().