vdr
1.7.27
|
#include <svdrp.h>
Public Member Functions | |
cSVDRP (int Port) | |
~cSVDRP () | |
bool | HasConnection (void) |
bool | Process (void) |
cSVDRP (int Port) | |
~cSVDRP () | |
bool | HasConnection (void) |
bool | Process (void) |
Static Public Member Functions | |
static void | SetGrabImageDir (const char *GrabImageDir) |
static void | SetGrabImageDir (const char *GrabImageDir) |
Private Member Functions | |
void | Close (bool SendReply=false, bool Timeout=false) |
bool | Send (const char *s, int length=-1) |
void | Reply (int Code, const char *fmt,...) __attribute__((format(printf |
void void | PrintHelpTopics (const char **hp) |
void | CmdCHAN (const char *Option) |
void | CmdCLRE (const char *Option) |
void | CmdCPYR (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 | 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 | CmdPLAY (const char *Option) |
void | CmdPLUG (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) |
void | Close (bool SendReply=false, bool Timeout=false) |
bool | Send (const char *s, int length=-1) |
void | Reply (int Code, const char *fmt,...) __attribute__((format(printf |
void void | PrintHelpTopics (const char **hp) |
void | CmdCHAN (const char *Option) |
void | CmdCLRE (const char *Option) |
void | CmdCPYR (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 | 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 | CmdPLAY (const char *Option) |
void | CmdPLUG (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 | |
cSocket | socket |
cFile | file |
cRecordings | Recordings |
cPUTEhandler * | PUTEhandler |
int | numChars |
int | length |
char * | cmdLine |
time_t | lastActivity |
Static Private Attributes | |
static char * | grabImageDir = NULL |
Definition at line 42 of file include/vdr/svdrp.h.
cSVDRP::cSVDRP | ( | int | Port | ) |
Definition at line 396 of file svdrp.c.
References cmdLine, isyslog, lastActivity, length, MALLOC, numChars, and PUTEhandler.
cSVDRP::~cSVDRP | ( | ) |
cSVDRP::cSVDRP | ( | int | Port | ) |
cSVDRP::~cSVDRP | ( | ) |
void cSVDRP::Close | ( | bool | SendReply = false , |
bool | Timeout = false |
||
) | [private] |
Definition at line 413 of file svdrp.c.
References cFile::Close(), DELETENULL(), file, cFile::IsOpen(), isyslog, PUTEhandler, and Reply().
void cSVDRP::Close | ( | bool | SendReply = false , |
bool | Timeout = false |
||
) | [private] |
void cSVDRP::CmdCHAN | ( | const char * | Option | ) | [private] |
Definition at line 494 of file svdrp.c.
References Channels, cDevice::CurrentChannel(), cList< T >::First(), tChannelID::FromString(), cChannels::GetByChannelID(), cChannels::GetByNumber(), cChannel::GroupSep(), isnumber(), cChannels::MaxNumber(), cChannel::Name(), cList< T >::Next(), cChannel::Number(), cDevice::PrimaryDevice(), Reply(), and cDevice::SwitchChannel().
Referenced by Execute().
void cSVDRP::CmdCHAN | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdCLRE | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdCLRE | ( | const char * | Option | ) | [private] |
Definition at line 560 of file svdrp.c.
References Channels, cSchedule::Cleanup(), cSchedules::ClearAll(), tChannelID::ClrRid(), EITDISABLETIME, cList< T >::First(), tChannelID::FromString(), cChannels::GetByNumber(), cChannel::GetChannelID(), tChannelID::InvalidID, isnumber(), cChannels::MaxNumber(), cList< T >::Next(), Reply(), cSchedules::Schedules(), cEitFilter::SetDisableUntil(), and Timers.
Referenced by Execute().
void cSVDRP::CmdCPYR | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdCPYR | ( | const char * | Option | ) | [private] |
Definition at line 625 of file svdrp.c.
References cFileTransfer::Active(), cListBase::Count(), cList< T >::Get(), cRecording::Name(), Recordings, Reply(), skipspace(), and cFileTransfer::Start().
Referenced by Execute().
void cSVDRP::CmdDELC | ( | const char * | Option | ) | [private] |
Definition at line 651 of file svdrp.c.
References cChannels::BeingEdited(), Channels, cDevice::CurrentChannel(), cListBase::Del(), cList< T >::First(), cList< T >::Get(), cChannels::GetByNumber(), cChannels::GetNextNormal(), cChannels::GetPrevNormal(), cListObject::Index(), isnumber(), isyslog, cList< T >::Next(), cChannel::Number(), cDevice::PrimaryDevice(), cChannels::ReNumber(), cDevice::Replaying(), Reply(), cDevice::SetCurrentChannel(), cChannels::SetModified(), cChannels::SwitchTo(), Timers, and cDevice::Transferring().
Referenced by Execute().
void cSVDRP::CmdDELC | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdDELR | ( | const char * | Option | ) | [private] |
Definition at line 698 of file svdrp.c.
References cCutter::Active(), cListBase::Count(), cRecordings::DelByName(), cRecording::Delete(), cRecording::FileName(), cList< T >::Get(), cRecordControls::GetRecordControl(), cListObject::Index(), isnumber(), Recordings, Reply(), and cRecordControl::Timer().
Referenced by Execute().
void cSVDRP::CmdDELR | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdDELT | ( | const char * | Option | ) | [private] |
Definition at line 730 of file svdrp.c.
References cTimers::BeingEdited(), cTimers::Del(), cList< T >::Get(), isnumber(), isyslog, cTimer::Recording(), Reply(), cTimers::SetModified(), Timers, and cTimer::ToDescr().
Referenced by Execute().
void cSVDRP::CmdDELT | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdEDIT | ( | const char * | Option | ) | [private] |
Definition at line 759 of file svdrp.c.
References cCutter::Active(), cListBase::Count(), cRecording::FileName(), cRecording::FramesPerSecond(), cList< T >::Get(), isnumber(), cRecording::IsPesRecording(), cMarks::Load(), Recordings, Reply(), cCutter::Start(), and cRecording::Title().
Referenced by Execute().
void cSVDRP::CmdEDIT | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdGRAB | ( | const char * | Option | ) | [private] |
Definition at line 789 of file svdrp.c.
References AddDirectory(), dsyslog, cDevice::GrabImage(), grabImageDir, isnumber(), LOG_ERROR_STR, cBase64Encoder::NextLine(), cDevice::PrimaryDevice(), Reply(), safe_write(), and cString::Truncate().
Referenced by Execute().
void cSVDRP::CmdGRAB | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdHELP | ( | const char * | Option | ) | [private] |
Definition at line 926 of file svdrp.c.
References cPlugin::Description(), GetHelpPage(), cPluginManager::GetPlugin(), HelpPages, cPlugin::Name(), PrintHelpTopics(), Reply(), cPlugin::SVDRPHelpPages(), VDRVERSION, and cPlugin::Version().
Referenced by Execute().
void cSVDRP::CmdHELP | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdHITK | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdHITK | ( | const char * | Option | ) | [private] |
Definition at line 954 of file svdrp.c.
References cKey::FromString(), kNone, cRemote::Put(), Reply(), and cKey::ToString().
Referenced by Execute().
void cSVDRP::CmdLSTC | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdLSTC | ( | const char * | Option | ) | [private] |
Definition at line 989 of file svdrp.c.
References Channels, cList< T >::First(), tChannelID::FromString(), cChannels::GetByChannelID(), cChannels::GetByNumber(), isnumber(), cChannels::MaxNumber(), cList< T >::Next(), cChannel::Number(), Reply(), and cChannel::ToText().
Referenced by Execute().
void cSVDRP::CmdLSTE | ( | const char * | Option | ) | [private] |
Definition at line 1031 of file svdrp.c.
References Channels, dmAll, dmAtTime, dmFollowing, dmPresent, cSchedule::Dump(), cSchedules::Dump(), file, tChannelID::FromString(), cChannels::GetByChannelID(), cChannels::GetByNumber(), cSchedules::GetSchedule(), isnumber(), Reply(), and cSchedules::Schedules().
Referenced by Execute().
void cSVDRP::CmdLSTE | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdLSTR | ( | const char * | Option | ) | [private] |
Definition at line 1114 of file svdrp.c.
References file, cList< T >::First(), cList< T >::Get(), cListObject::Index(), cRecording::Info(), isnumber(), cList< T >::Last(), cList< T >::Next(), Recordings, Reply(), cRecording::Title(), cRecordings::Update(), and cRecordingInfo::Write().
Referenced by Execute().
void cSVDRP::CmdLSTR | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdLSTT | ( | const char * | Option | ) | [private] |
Definition at line 1148 of file svdrp.c.
References cListBase::Count(), cList< T >::Get(), cListObject::Index(), isnumber(), Reply(), Timers, and cTimer::ToText().
Referenced by Execute().
void cSVDRP::CmdLSTT | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdMESG | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdMESG | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdMODC | ( | const char * | Option | ) | [private] |
Definition at line 1201 of file svdrp.c.
References cChannels::BeingEdited(), Channels, cChannels::GetByNumber(), cChannels::HasUniqueChannelID(), isyslog, cChannel::Number(), cChannel::Parse(), cChannels::ReNumber(), Reply(), cChannels::SetModified(), skipspace(), and cChannel::ToText().
Referenced by Execute().
void cSVDRP::CmdMODC | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdMODT | ( | const char * | Option | ) | [private] |
Definition at line 1239 of file svdrp.c.
References cTimers::BeingEdited(), cTimer::ClrFlags(), cList< T >::Get(), cTimer::HasFlags(), cListObject::Index(), isyslog, cTimer::Parse(), Reply(), cTimer::SetFlags(), cTimers::SetModified(), skipspace(), tfActive, Timers, cTimer::ToDescr(), and cTimer::ToText().
Referenced by Execute().
void cSVDRP::CmdMODT | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdMOVC | ( | const char * | Option | ) | [private] |
Definition at line 1276 of file svdrp.c.
References cTimers::BeingEdited(), cChannels::BeingEdited(), Channels, cDevice::CurrentChannel(), cChannels::GetByNumber(), isyslog, cListBase::Move(), cChannel::Number(), cDevice::PrimaryDevice(), cChannels::ReNumber(), cDevice::Replaying(), Reply(), cDevice::SetCurrentChannel(), cChannels::SetModified(), skipspace(), cChannels::SwitchTo(), Timers, and cDevice::Transferring().
Referenced by Execute().
void cSVDRP::CmdMOVC | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdMOVR | ( | const char * | Option | ) | [private] |
Definition at line 1329 of file svdrp.c.
References cFileTransfer::Active(), cListBase::Count(), cList< T >::Get(), cRecording::Name(), Recordings, Reply(), skipspace(), and cFileTransfer::Start().
Referenced by Execute().
void cSVDRP::CmdMOVR | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdNEWC | ( | const char * | Option | ) | [private] |
Definition at line 1355 of file svdrp.c.
References cListBase::Add(), Channels, cChannels::HasUniqueChannelID(), isyslog, cChannel::Number(), cChannel::Parse(), cChannels::ReNumber(), Reply(), cChannels::SetModified(), and cChannel::ToText().
Referenced by Execute().
void cSVDRP::CmdNEWC | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdNEWT | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdNEWT | ( | const char * | Option | ) | [private] |
Definition at line 1379 of file svdrp.c.
References cTimers::Add(), cTimers::GetTimer(), cListObject::Index(), isyslog, cTimer::Parse(), Reply(), cTimers::SetModified(), Timers, cTimer::ToDescr(), and cTimer::ToText().
Referenced by Execute().
void cSVDRP::CmdNEXT | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdNEXT | ( | const char * | Option | ) | [private] |
Definition at line 1403 of file svdrp.c.
References cTimers::GetNextActiveTimer(), cListObject::Index(), Reply(), cTimer::StartTime(), Timers, and TimeToString().
Referenced by Execute().
void cSVDRP::CmdPLAY | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdPLAY | ( | const char * | Option | ) | [private] |
Definition at line 1422 of file svdrp.c.
References cControl::Attach(), cListBase::Count(), cResumeFile::Delete(), cRecording::FileName(), cRecording::FramesPerSecond(), cList< T >::Get(), HMSFToIndex(), isnumber(), cRecording::IsPesRecording(), cControl::Launch(), Recordings, Reply(), cReplayControl::SetRecording(), cControl::Shutdown(), skipspace(), and cRecording::Title().
Referenced by Execute().
void cSVDRP::CmdPLUG | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdPLUG | ( | const char * | Option | ) | [private] |
Definition at line 1465 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().
void cSVDRP::CmdPUTE | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdPUTE | ( | const char * | Option | ) | [private] |
Definition at line 1536 of file svdrp.c.
References cSchedules::Cleanup(), DELETENULL(), cPUTEhandler::Message(), PUTEhandler, cSchedules::Read(), Reply(), and cPUTEhandler::Status().
Referenced by Execute().
void cSVDRP::CmdREMO | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdREMO | ( | const char * | Option | ) | [private] |
Definition at line 1561 of file svdrp.c.
References cRemote::Enabled(), Reply(), and cRemote::SetEnabled().
Referenced by Execute().
void cSVDRP::CmdSCAN | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdSCAN | ( | const char * | Option | ) | [private] |
Definition at line 1579 of file svdrp.c.
References EITScanner, cEITScanner::ForceScan(), and Reply().
Referenced by Execute().
void cSVDRP::CmdSTAT | ( | const char * | Option | ) | [private] |
Definition at line 1585 of file svdrp.c.
References Reply(), and VideoDiskSpace().
Referenced by Execute().
void cSVDRP::CmdSTAT | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdUPDR | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdUPDR | ( | const char * | Option | ) | [private] |
Definition at line 1632 of file svdrp.c.
References Recordings, Reply(), and cRecordings::Update().
Referenced by Execute().
void cSVDRP::CmdUPDT | ( | const char * | Option | ) | [private] |
void cSVDRP::CmdUPDT | ( | const char * | Option | ) | [private] |
Definition at line 1600 of file svdrp.c.
References cTimers::Add(), cTimers::BeingEdited(), cTimers::GetTimer(), cListObject::Index(), isyslog, cTimer::Parse(), Reply(), cTimers::SetModified(), Timers, cTimer::ToDescr(), and cTimer::ToText().
Referenced by Execute().
void cSVDRP::CmdVOLU | ( | const char * | Option | ) | [private] |
Definition at line 1638 of file svdrp.c.
References cDevice::CurrentVolume(), isnumber(), cDevice::PrimaryDevice(), Reply(), cDevice::SetVolume(), cDevice::ToggleMute(), and VOLUMEDELTA.
Referenced by Execute().
void cSVDRP::CmdVOLU | ( | const char * | Option | ) | [private] |
void cSVDRP::Execute | ( | char * | Cmd | ) | [private] |
Definition at line 1662 of file svdrp.c.
References Close(), CMD, CmdCHAN(), CmdCLRE(), CmdCPYR(), CmdDELC(), CmdDELR(), CmdDELT(), CmdEDIT(), CmdGRAB(), CmdHELP(), CmdHITK(), CmdLSTC(), CmdLSTE(), CmdLSTR(), CmdLSTT(), CmdMESG(), CmdMODC(), CmdMODT(), CmdMOVC(), CmdMOVR(), CmdNEWC(), CmdNEWT(), CmdNEXT(), CmdPLAY(), CmdPLUG(), CmdPUTE(), CmdREMO(), CmdSCAN(), CmdSTAT(), CmdUPDR(), CmdUPDT(), CmdVOLU(), DELETENULL(), EITDISABLETIME, cPUTEhandler::Message(), cPUTEhandler::Process(), PUTEhandler, Reply(), cEitFilter::SetDisableUntil(), skipspace(), and cPUTEhandler::Status().
Referenced by Process().
void cSVDRP::Execute | ( | char * | Cmd | ) | [private] |
bool cSVDRP::HasConnection | ( | void | ) | [inline] |
Definition at line 92 of file svdrp.h.
References file, and cFile::IsOpen().
bool cSVDRP::HasConnection | ( | void | ) | [inline] |
Definition at line 92 of file include/vdr/svdrp.h.
References file, and cFile::IsOpen().
Referenced by cInterface::HasSVDRPConnection().
void void cSVDRP::PrintHelpTopics | ( | const char ** | hp | ) | [private] |
void cSVDRP::PrintHelpTopics | ( | const char ** | hp | ) | [private] |
Definition at line 468 of file svdrp.c.
References GetHelpTopic(), MAXHELPTOPIC, and Reply().
bool cSVDRP::Process | ( | void | ) |
bool cSVDRP::Process | ( | void | ) |
Definition at line 1717 of file svdrp.c.
References cSocket::Accept(), Close(), cmdLine, esyslog, Execute(), file, cFile::IsOpen(), isyslog, lastActivity, length, MALLOC, numChars, cFile::Open(), cFile::Ready(), Reply(), safe_read(), Setup, socket, cSetup::SVDRPTimeout, cCharSetConv::SystemCharacterTable(), TimeToString(), and VDRVERSION.
Referenced by cInterface::GetKey().
void cSVDRP::Reply | ( | int | Code, |
const char * | fmt, | ||
... | |||
) | [private] |
Definition at line 440 of file svdrp.c.
References esyslog, file, cFile::IsOpen(), Send(), and cString::sprintf().
Referenced by Close(), CmdCHAN(), CmdCLRE(), CmdCPYR(), CmdDELC(), CmdDELR(), CmdDELT(), CmdEDIT(), CmdGRAB(), CmdHELP(), CmdHITK(), CmdLSTC(), CmdLSTE(), CmdLSTR(), CmdLSTT(), CmdMESG(), CmdMODC(), CmdMODT(), CmdMOVC(), CmdMOVR(), CmdNEWC(), CmdNEWT(), CmdNEXT(), CmdPLAY(), CmdPLUG(), CmdPUTE(), CmdREMO(), CmdSCAN(), CmdSTAT(), CmdUPDR(), CmdUPDT(), CmdVOLU(), Execute(), PrintHelpTopics(), and Process().
void cSVDRP::Reply | ( | int | Code, |
const char * | fmt, | ||
... | |||
) | [private] |
bool cSVDRP::Send | ( | const char * | s, |
int | length = -1 |
||
) | [private] |
bool cSVDRP::Send | ( | const char * | s, |
int | length = -1 |
||
) | [private] |
static void cSVDRP::SetGrabImageDir | ( | const char * | GrabImageDir | ) | [static] |
void cSVDRP::SetGrabImageDir | ( | const char * | GrabImageDir | ) | [static] |
char * cSVDRP::cmdLine [private] |
Definition at line 50 of file include/vdr/svdrp.h.
cFile cSVDRP::file [private] |
Definition at line 45 of file include/vdr/svdrp.h.
Referenced by Close(), CmdLSTE(), CmdLSTR(), HasConnection(), Process(), Reply(), and Send().
static char * cSVDRP::grabImageDir = NULL [static, private] |
Definition at line 52 of file include/vdr/svdrp.h.
Referenced by CmdGRAB(), and SetGrabImageDir().
time_t cSVDRP::lastActivity [private] |
Definition at line 51 of file include/vdr/svdrp.h.
int cSVDRP::length [private] |
Definition at line 49 of file include/vdr/svdrp.h.
int cSVDRP::numChars [private] |
Definition at line 48 of file include/vdr/svdrp.h.
cPUTEhandler * cSVDRP::PUTEhandler [private] |
cRecordings cSVDRP::Recordings [private] |
cSocket cSVDRP::socket [private] |
Definition at line 44 of file include/vdr/svdrp.h.
Referenced by Process().