|
vdr 2.8.4
|
Public Member Functions | |
| cSVDRPServer (int Socket, const cIpAddress *ClientIpAddress) | |
| ~cSVDRPServer () | |
| const char * | ClientName (void) const |
| bool | HasConnection (void) |
| bool | Process (void) |
Private Member Functions | |
| void | Close (bool SendReply=false, bool Timeout=false) |
| bool | Send (const char *s) |
| void | Reply (int Code, const char *fmt,...) __attribute__((format(printf |
| void void | PrintHelpTopics (const char **hp) |
| void | CmdAUDI (const char *Option) |
| void | CmdCHAN (const char *Option) |
| void | CmdCLRE (const char *Option) |
| void | CmdCONN (const char *Option) |
| void | CmdDELC (const char *Option) |
| void | CmdDELR (const char *Option) |
| void | CmdDELT (const char *Option) |
| void | CmdEDIT (const char *Option) |
| void | CmdGRAB (const char *Option) |
| void | CmdHELP (const char *Option) |
| void | CmdHITK (const char *Option) |
| void | CmdLSTC (const char *Option) |
| void | CmdLSTD (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 | CmdMOVR (const char *Option) |
| void | CmdNEWC (const char *Option) |
| void | CmdNEWT (const char *Option) |
| void | CmdNEXT (const char *Option) |
| void | CmdPING (const char *Option) |
| void | CmdPLAY (const char *Option) |
| void | CmdPLUG (const char *Option) |
| void | CmdPOLL (const char *Option) |
| void | CmdPRIM (const char *Option) |
| void | CmdPUTE (const char *Option) |
| void | CmdREMO (const char *Option) |
| void | CmdSCAN (const char *Option) |
| void | CmdSTAT (const char *Option) |
| void | CmdUPDT (const char *Option) |
| void | CmdUPDR (const char *Option) |
| void | CmdVOLU (const char *Option) |
| void | Execute (char *Cmd) |
Private Attributes | |
| cIpAddress | clientIpAddress |
| cString | clientName |
| cFile | file |
| cPUTEhandler * | PUTEhandler |
| int | numChars |
| int | length |
| char * | cmdLine |
| time_t | lastActivity |
| cSVDRPServer::cSVDRPServer | ( | int | Socket, |
| const cIpAddress * | ClientIpAddress ) |
Definition at line 1161 of file svdrp.c.
References cPoller::Add(), clientIpAddress, clientName, cmdLine, cIpAddress::Connection(), dsyslog, file, lastActivity, length, MALLOC, numChars, cFile::Open(), PUTEhandler, Reply(), Setup, cSetup::SVDRPHostName, SVDRPServerPoller, cCharSetConv::SystemCharacterTable(), TimeToString(), and VDRVERSION.
Referenced by cSVDRPServerHandler::HandleServerConnection().
| cSVDRPServer::~cSVDRPServer | ( | ) |
Definition at line 1178 of file svdrp.c.
References clientName, Close(), cmdLine, dsyslog, Setup, and cSetup::SVDRPHostName.
|
inline |
Definition at line 1154 of file svdrp.c.
References ClientName(), and clientName.
Referenced by ClientName().
|
private |
Definition at line 1185 of file svdrp.c.
References clientName, cFile::Close(), cPoller::Del(), DELETENULL(), file, cFile::IsOpen(), isyslog, PUTEhandler, Reply(), Setup, cSetup::SVDRPHostName, and SVDRPServerPoller.
Referenced by Execute(), Process(), Send(), and ~cSVDRPServer().
|
private |
Definition at line 1270 of file svdrp.c.
References cDevice::CurrentChannel(), tTrackId::description, cDevice::GetCurrentAudioTrack(), cDevice::GetTrack(), tTrackId::id, isnumber(), tTrackId::language, cDevice::PrimaryDevice(), Reply(), cDevice::SetCurrentAudioTrack(), SetTrackDescriptions(), cString::sprintf(), ttAudioFirst, and ttDolbyLast.
Referenced by Execute().
|
private |
Definition at line 1309 of file svdrp.c.
References cDevice::CurrentChannel(), tChannelID::FromString(), isnumber(), LOCK_CHANNELS_READ, cChannels::MaxNumber(), cListObject::Next(), cDevice::PrimaryDevice(), Reply(), and cDevice::SwitchChannel().
Referenced by Execute().
|
private |
Definition at line 1371 of file svdrp.c.
References cSchedule::Cleanup(), tChannelID::ClrRid(), EITDISABLETIME, tChannelID::FromString(), tChannelID::InvalidID, isnumber(), LOCK_CHANNELS_READ, LOCK_SCHEDULES_WRITE, LOCK_TIMERS_WRITE, cChannels::MaxNumber(), cListObject::Next(), Reply(), and cEitFilter::SetDisableUntil().
Referenced by Execute().
|
private |
Definition at line 1436 of file svdrp.c.
References cSVDRPClientHandler::AddClient(), cIpAddress::Address(), clientIpAddress, clientName, cSVDRPServerParams::Error(), cSVDRPServerParams::Name(), cSVDRPServerParams::Ok(), Reply(), and SVDRPClientHandler.
Referenced by Execute().
|
private |
Definition at line 1456 of file svdrp.c.
References clientName, cDevice::CurrentChannel(), tChannelID::FromString(), cListObject::Index(), isnumber(), isyslog, LOCK_CHANNELS_WRITE, LOCK_TIMERS_READ, cChannel::Number(), cDevice::PrimaryDevice(), Reply(), cDevice::SetCurrentChannel(), Setup, and cSetup::SVDRPHostName.
Referenced by Execute().
|
private |
Definition at line 1521 of file svdrp.c.
References clientName, isnumber(), isyslog, LOCK_DELETEDRECORDINGS_WRITE, LOCK_RECORDINGS_WRITE, RecordingInUseMessage(), Reply(), Setup, and cSetup::SVDRPHostName.
Referenced by Execute().
|
private |
Definition at line 1553 of file svdrp.c.
References clientName, isnumber(), isyslog, LOCK_TIMERS_WRITE, Reply(), Setup, cRecordControls::Stop(), and cSetup::SVDRPHostName.
Referenced by Execute().
|
private |
Definition at line 1578 of file svdrp.c.
References cRecordingsHandler::Add(), cListBase::Count(), EnoughFreeDiskSpaceForEdit(), isnumber(), cMarks::Load(), LOCK_RECORDINGS_READ, RecordingsHandler, Reply(), and ruCut.
Referenced by Execute().
|
private |
Definition at line 1606 of file svdrp.c.
References AddDirectory(), clientName, dsyslog, cDevice::GrabImage(), grabImageDir, isnumber(), LOG_ERROR_STR, cBase64Encoder::NextLine(), cDevice::PrimaryDevice(), Reply(), safe_write(), Setup, cSetup::SVDRPHostName, and cString::Truncate().
Referenced by Execute().
|
private |
Definition at line 1743 of file svdrp.c.
References cPlugin::Description(), GetHelpPage(), cPluginManager::GetPlugin(), HelpPages, cPlugin::Name(), PrintHelpTopics(), Reply(), cPlugin::SVDRPHelpPages(), VDRVERSION, and cPlugin::Version().
Referenced by Execute().
|
private |
Definition at line 1771 of file svdrp.c.
References cRemote::Enabled(), cKey::FromString(), kNone, cRemote::Put(), Reply(), and cKey::ToString().
Referenced by Execute().
|
private |
Definition at line 1810 of file svdrp.c.
References cDevice::CurrentChannel(), tChannelID::FromString(), cChannel::GetChannelID(), isnumber(), LOCK_CHANNELS_READ, cChannels::MaxNumber(), cListObject::Next(), cChannel::Number(), Reply(), skipspace(), startswith(), tChannelID::ToString(), and cChannel::ToText().
Referenced by Execute().
|
private |
Definition at line 1858 of file svdrp.c.
References cDevice::GetDevice(), cDevice::NumDevices(), cSetup::PrimaryDVB, Reply(), and Setup.
Referenced by Execute().
|
private |
Definition at line 1870 of file svdrp.c.
References dmAll, dmAtTime, dmFollowing, dmPresent, cSchedule::Dump(), file, tChannelID::FromString(), isnumber(), LOCK_CHANNELS_READ, LOCK_SCHEDULES_READ, and Reply().
Referenced by Execute().
|
private |
Definition at line 1949 of file svdrp.c.
References file, cRecording::Id(), isnumber(), LOCK_RECORDINGS_READ, cListObject::Next(), Reply(), and cRecording::Title().
Referenced by Execute().
|
private |
Definition at line 2008 of file svdrp.c.
References cTimer::Id(), isnumber(), LOCK_TIMERS_READ, cListObject::Next(), cListObject::Prev(), cTimer::Remote(), and Reply().
Referenced by Execute().
|
private |
Definition at line 2064 of file svdrp.c.
References clientName, isyslog, mtInfo, cSkins::QueueMessage(), Reply(), Setup, Skins, and cSetup::SVDRPHostName.
Referenced by Execute().
|
private |
Definition at line 2075 of file svdrp.c.
References clientName, isyslog, LOCK_CHANNELS_WRITE, cChannel::Parse(), Reply(), Setup, skipspace(), and cSetup::SVDRPHostName.
Referenced by Execute().
|
private |
Definition at line 2111 of file svdrp.c.
References clientName, cTimer::ClrFlags(), cTimer::IsPatternTimer(), isyslog, LOCK_TIMERS_WRITE, cTimer::Parse(), Reply(), cTimer::SetFlags(), Setup, skipspace(), cSetup::SVDRPHostName, tfActive, and tfRecording.
Referenced by Execute().
|
private |
Definition at line 2157 of file svdrp.c.
References clientName, cDevice::CurrentChannel(), isyslog, LOCK_CHANNELS_WRITE, LOCK_TIMERS_READ, cChannel::Number(), cListObject::Prev(), cDevice::PrimaryDevice(), Reply(), cDevice::SetCurrentChannel(), Setup, skipspace(), and cSetup::SVDRPHostName.
Referenced by Execute().
|
private |
Definition at line 2212 of file svdrp.c.
References isnumber(), LOCK_RECORDINGS_WRITE, RecordingInUseMessage(), Reply(), and skipspace().
Referenced by Execute().
|
private |
Definition at line 2256 of file svdrp.c.
References clientName, isyslog, LOCK_CHANNELS_WRITE, cChannel::Number(), cChannel::Parse(), Reply(), Setup, cSetup::SVDRPHostName, and cChannel::ToText().
Referenced by Execute().
|
private |
Definition at line 2283 of file svdrp.c.
References clientName, cTimer::ClrFlags(), cTimer::Id(), cTimer::IsPatternTimer(), isyslog, LOCK_TIMERS_WRITE, cTimer::Parse(), Reply(), Setup, cSetup::SVDRPHostName, tfRecording, cTimer::ToDescr(), and cTimer::ToText().
Referenced by Execute().
|
private |
Definition at line 2312 of file svdrp.c.
References LOCK_TIMERS_READ, Reply(), and TimeToString().
Referenced by Execute().
|
private |
|
private |
Definition at line 2336 of file svdrp.c.
References cControl::Attach(), cResumeFile::Delete(), cRecordings::GetRecordingsRead(), HMSFToIndex(), isnumber(), cControl::Launch(), LOCK_RECORDINGS_READ, cReplayControl::NowReplaying(), cStateKey::Remove(), Reply(), cResumeFile::Save(), cReplayControl::SetRecording(), cControl::Shutdown(), and skipspace().
Referenced by Execute().
|
private |
Definition at line 2395 of file svdrp.c.
References cRemote::CallPlugin(), cPlugin::Description(), GetHelpPage(), cPluginManager::GetPlugin(), cPlugin::Name(), PrintHelpTopics(), Reply(), skipspace(), cPlugin::SVDRPCommand(), cPlugin::SVDRPHelpPages(), and cPlugin::Version().
Referenced by Execute().
|
private |
Definition at line 2466 of file svdrp.c.
References Reply(), SVDRPClientHandler, and cSVDRPClientHandler::TriggerFetchingTimers().
Referenced by Execute().
|
private |
Definition at line 2494 of file svdrp.c.
References isnumber(), cDevice::NumDevices(), cDevice::PrimaryDevice(), cSetup::PrimaryDVB, Reply(), and Setup.
Referenced by Execute().
|
private |
Definition at line 2520 of file svdrp.c.
References cSchedules::Cleanup(), DELETENULL(), cPUTEhandler::Message(), PUTEhandler, cSchedules::Read(), Reply(), and cPUTEhandler::Status().
Referenced by Execute().
|
private |
Definition at line 2545 of file svdrp.c.
References cRemote::Enabled(), Reply(), and cRemote::SetEnabled().
Referenced by Execute().
|
private |
Definition at line 2563 of file svdrp.c.
References EITScanner, cEITScanner::ForceScan(), and Reply().
Referenced by Execute().
|
private |
Definition at line 2569 of file svdrp.c.
References Reply(), and cVideoDirectory::VideoDiskSpace().
Referenced by Execute().
|
private |
Definition at line 2617 of file svdrp.c.
References LOCK_RECORDINGS_WRITE, and Reply().
Referenced by Execute().
|
private |
Definition at line 2584 of file svdrp.c.
References clientName, cTimer::ClrFlags(), cTimer::Id(), isyslog, LOCK_TIMERS_WRITE, cTimer::Parse(), Reply(), cTimer::SetFlags(), Setup, cSetup::SVDRPHostName, tfRecording, cTimer::ToDescr(), and cTimer::ToText().
Referenced by Execute().
|
private |
Definition at line 2624 of file svdrp.c.
References cDevice::CurrentVolume(), isnumber(), cDevice::PrimaryDevice(), Reply(), cDevice::SetVolume(), cDevice::ToggleMute(), and VOLUMEDELTA.
Referenced by Execute().
|
private |
Definition at line 2648 of file svdrp.c.
References Close(), CMD, CmdAUDI(), CmdCHAN(), CmdCLRE(), CmdCONN(), CmdDELC(), CmdDELR(), CmdDELT(), CmdEDIT(), CmdGRAB(), CmdHELP(), CmdHITK(), CmdLSTC(), CmdLSTD(), CmdLSTE(), CmdLSTR(), CmdLSTT(), CmdMESG(), CmdMODC(), CmdMODT(), CmdMOVC(), CmdMOVR(), CmdNEWC(), CmdNEWT(), CmdNEXT(), CmdPING(), CmdPLAY(), CmdPLUG(), CmdPOLL(), CmdPRIM(), CmdPUTE(), CmdREMO(), CmdSCAN(), CmdSTAT(), CmdUPDR(), CmdUPDT(), CmdVOLU(), DELETENULL(), EITDISABLETIME, cPUTEhandler::Message(), cPUTEhandler::Process(), PUTEhandler, Reply(), cEitFilter::SetDisableUntil(), skipspace(), and cPUTEhandler::Status().
Referenced by Process().
|
inline |
Definition at line 1155 of file svdrp.c.
References file, and cFile::IsOpen().
|
private |
Definition at line 1244 of file svdrp.c.
References GetHelpTopic(), MAXHELPTOPIC, and Reply().
| bool cSVDRPServer::Process | ( | void | ) |
Definition at line 2708 of file svdrp.c.
References clientName, Close(), cmdLine, dbgsvdrp, esyslog, Execute(), file, cFile::IsOpen(), isyslog, lastActivity, length, MALLOC, numChars, cFile::Ready(), safe_read(), Setup, cSetup::SVDRPHostName, and cSetup::SVDRPTimeout.
|
private |
Definition at line 1209 of file svdrp.c.
References clientName, esyslog, file, cFile::IsOpen(), Reply(), Send(), Setup, cString::sprintf(), and cSetup::SVDRPHostName.
Referenced by Close(), CmdAUDI(), CmdCHAN(), CmdCLRE(), CmdCONN(), CmdDELC(), CmdDELR(), CmdDELT(), CmdEDIT(), CmdGRAB(), CmdHELP(), CmdHITK(), CmdLSTC(), CmdLSTD(), CmdLSTE(), CmdLSTR(), CmdLSTT(), CmdMESG(), CmdMODC(), CmdMODT(), CmdMOVC(), CmdMOVR(), CmdNEWC(), CmdNEWT(), CmdNEXT(), CmdPING(), CmdPLAY(), CmdPLUG(), CmdPOLL(), CmdPRIM(), CmdPUTE(), CmdREMO(), CmdSCAN(), CmdSTAT(), CmdUPDR(), CmdUPDT(), CmdVOLU(), cSVDRPServer(), Execute(), PrintHelpTopics(), and Reply().
|
private |
Definition at line 1198 of file svdrp.c.
References clientName, Close(), dbgsvdrp, file, LOG_ERROR, and safe_write().
Referenced by Reply().
|
private |
Definition at line 1102 of file svdrp.c.
Referenced by CmdCONN(), and cSVDRPServer().
|
private |
|
private |
Definition at line 1108 of file svdrp.c.
Referenced by cSVDRPServer(), Process(), and ~cSVDRPServer().
|
private |
Definition at line 1104 of file svdrp.c.
Referenced by Close(), CmdLSTE(), CmdLSTR(), cSVDRPServer(), HasConnection(), Process(), Reply(), and Send().
|
private |
Definition at line 1109 of file svdrp.c.
Referenced by cSVDRPServer(), and Process().
|
private |
Definition at line 1107 of file svdrp.c.
Referenced by cSVDRPServer(), and Process().
|
private |
Definition at line 1106 of file svdrp.c.
Referenced by cSVDRPServer(), and Process().
|
private |