|
MythTV master
|
#include <mythplugins/mythzoneminder/mythzoneminder/zmclient.h>
Public Member Functions | |
| ~ZMClient () override | |
| void | customEvent (QEvent *event) override |
| bool | connectToHost (const QString &hostname, unsigned int port) |
| bool | connected (void) const |
| bool | checkProtoVersion (void) |
| void | shutdown () |
| void | getServerStatus (QString &status, QString &cpuStat, QString &diskStat) |
| void | updateMonitorStatus (void) |
| void | getEventList (const QString &monitorName, bool oldestFirst, const QString &date, bool includeContinuous, std::vector< Event * > *eventList) |
| void | getEventFrame (Event *event, int frameNo, MythImage **image) |
| void | getAnalyseFrame (Event *event, int frameNo, QImage &image) |
| int | getLiveFrame (int monitorID, QString &status, FrameData &buffer) |
| void | getFrameList (int eventID, std::vector< Frame * > *frameList) |
| void | deleteEvent (int eventID) |
| void | deleteEventList (std::vector< Event * > *eventList) |
| int | getMonitorCount (void) |
| Monitor * | getMonitorAt (int pos) |
| Monitor * | getMonitorByID (int monID) |
| void | getCameraList (QStringList &cameraList) |
| void | getEventDates (const QString &monitorName, bool oldestFirst, QStringList &dateList) |
| void | setMonitorFunction (int monitorID, const QString &function, bool enabled) |
| bool | updateAlarmStates (void) |
| bool | isMiniPlayerEnabled (void) const |
| void | setIsMiniPlayerEnabled (bool enabled) |
| void | saveNotificationMonitors (void) |
| void | showMiniPlayer (int monitorID) const |
Static Public Member Functions | |
| static ZMClient * | get (void) |
| static bool | setupZMClient (void) |
Protected Member Functions | |
| ZMClient () | |
Static Protected Attributes | |
| static ZMClient * | m_zmclient = nullptr |
Private Slots | |
| void | restartConnection (void) |
Private Member Functions | |
| void | doGetMonitorList (void) |
| bool | readData (unsigned char *data, int dataSize) |
| bool | sendReceiveStringList (QStringList &strList) |
Private Attributes | |
| QRecursiveMutex | m_listLock |
| QRecursiveMutex | m_commandLock |
| QList< Monitor * > | m_monitorList |
| QMap< int, Monitor * > | m_monitorMap |
| MythSocket * | m_socket {nullptr} |
| QRecursiveMutex | m_socketLock |
| QString | m_hostname {"localhost"} |
| uint | m_port {6548} |
| bool | m_bConnected {false} |
| QTimer * | m_retryTimer {nullptr} |
| bool | m_zmclientReady {false} |
| bool | m_isMiniPlayerEnabled {true} |
Definition at line 19 of file zmclient.h.
|
protected |
Definition at line 25 of file zmclient.cpp.
Referenced by get().
|
override |
Definition at line 239 of file zmclient.cpp.
| bool ZMClient::checkProtoVersion | ( | void | ) |
Definition at line 178 of file zmclient.cpp.
Referenced by connectToHost().
|
inline |
Definition at line 38 of file zmclient.h.
| bool ZMClient::connectToHost | ( | const QString & | hostname, |
| unsigned int | port | ||
| ) |
Definition at line 61 of file zmclient.cpp.
Referenced by restartConnection(), sendReceiveStringList(), and setupZMClient().
|
override |
Definition at line 971 of file zmclient.cpp.
| void ZMClient::deleteEvent | ( | int | eventID | ) |
Definition at line 544 of file zmclient.cpp.
| void ZMClient::deleteEventList | ( | std::vector< Event * > * | eventList | ) |
Definition at line 553 of file zmclient.cpp.
|
private |
Definition at line 872 of file zmclient.cpp.
Referenced by connectToHost().
|
static |
Definition at line 37 of file zmclient.cpp.
Referenced by ZMLivePlayer::changePlayerMonitor(), checkConnection(), ZMMiniPlayer::customEvent(), ZMEvents::deletePressed(), ZMPlayer::deletePressed(), ZMEvents::doDeleteAll(), hardwareprofile.distros.mythtv_data.makeopts.MakeOpts::dump(), ZMEvents::eventVisible(), ZMEvents::getCameraList(), ZMConsole::getDaemonStatus(), ZMEvents::getDateList(), ZMPlayer::getEventInfo(), ZMEvents::getEventList(), ZMPlayer::getFrame(), ZMLivePlayer::initMonitorLayout(), hardwareprofile.distros.mythtv_data.orddict.OrdDict::itervalues(), mythplugin_destroy(), AlarmNotifyThread::run(), runZMMiniPlayer(), FunctionDialog::setMonitorFunction(), ZMLivePlayer::setMonitorLayout(), setupZMClient(), ZMMiniPlayer::timerTimeout(), ZMLivePlayer::updateFrame(), ZMConsole::updateMonitorList(), ZMLivePlayer::ZMLivePlayer(), and ZMLivePlayer::~ZMLivePlayer().
| void ZMClient::getAnalyseFrame | ( | Event * | event, |
| int | frameNo, | ||
| QImage & | image | ||
| ) |
Definition at line 694 of file zmclient.cpp.
| void ZMClient::getCameraList | ( | QStringList & | cameraList | ) |
Definition at line 804 of file zmclient.cpp.
| void ZMClient::getEventDates | ( | const QString & | monitorName, |
| bool | oldestFirst, | ||
| QStringList & | dateList | ||
| ) |
Definition at line 452 of file zmclient.cpp.
Definition at line 638 of file zmclient.cpp.
| void ZMClient::getEventList | ( | const QString & | monitorName, |
| bool | oldestFirst, | ||
| const QString & | date, | ||
| bool | includeContinuous, | ||
| std::vector< Event * > * | eventList | ||
| ) |
Definition at line 397 of file zmclient.cpp.
| void ZMClient::getFrameList | ( | int | eventID, |
| std::vector< Frame * > * | frameList | ||
| ) |
Definition at line 498 of file zmclient.cpp.
| int ZMClient::getLiveFrame | ( | int | monitorID, |
| QString & | status, | ||
| FrameData & | buffer | ||
| ) |
Definition at line 746 of file zmclient.cpp.
Referenced by ZMLivePlayer::updateFrame().
| Monitor * ZMClient::getMonitorAt | ( | int | pos | ) |
Definition at line 852 of file zmclient.cpp.
Referenced by ZMLivePlayer::changePlayerMonitor(), AlarmNotifyThread::run(), ZMLivePlayer::setMonitorLayout(), and ZMConsole::updateMonitorList().
| Monitor * ZMClient::getMonitorByID | ( | int | monID | ) |
Definition at line 862 of file zmclient.cpp.
Referenced by ZMMiniPlayer::customEvent(), ZMLivePlayer::setMonitorLayout(), and ZMMiniPlayer::timerTimeout().
| int ZMClient::getMonitorCount | ( | void | ) |
Definition at line 846 of file zmclient.cpp.
Referenced by ZMLivePlayer::changePlayerMonitor(), AlarmNotifyThread::run(), and ZMConsole::updateMonitorList().
| void ZMClient::getServerStatus | ( | QString & | status, |
| QString & | cpuStat, | ||
| QString & | diskStat | ||
| ) |
Definition at line 255 of file zmclient.cpp.
Referenced by ZMConsole::getDaemonStatus().
|
inline |
Definition at line 67 of file zmclient.h.
Referenced by showMiniPlayer().
|
private |
Definition at line 581 of file zmclient.cpp.
Referenced by getAnalyseFrame(), getEventFrame(), and getLiveFrame().
|
privateslot |
Definition at line 218 of file zmclient.cpp.
Referenced by ZMClient().
| void ZMClient::saveNotificationMonitors | ( | void | ) |
Definition at line 952 of file zmclient.cpp.
Referenced by FunctionDialog::setMonitorFunction().
|
private |
Definition at line 122 of file zmclient.cpp.
Referenced by checkProtoVersion(), deleteEvent(), deleteEventList(), doGetMonitorList(), getAnalyseFrame(), getCameraList(), getEventDates(), getEventFrame(), getEventList(), getFrameList(), getLiveFrame(), getServerStatus(), setMonitorFunction(), updateAlarmStates(), and updateMonitorStatus().
|
inline |
Definition at line 68 of file zmclient.h.
Referenced by ZMLivePlayer::ZMLivePlayer(), and ZMLivePlayer::~ZMLivePlayer().
| void ZMClient::setMonitorFunction | ( | int | monitorID, |
| const QString & | function, | ||
| bool | enabled | ||
| ) |
Definition at line 939 of file zmclient.cpp.
Referenced by FunctionDialog::setMonitorFunction().
|
static |
Definition at line 44 of file zmclient.cpp.
Referenced by checkConnection().
| void ZMClient::showMiniPlayer | ( | int | monitorID | ) | const |
Definition at line 994 of file zmclient.cpp.
Referenced by customEvent().
| void ZMClient::shutdown | ( | ) |
Definition at line 228 of file zmclient.cpp.
| bool ZMClient::updateAlarmStates | ( | void | ) |
Definition at line 346 of file zmclient.cpp.
| void ZMClient::updateMonitorStatus | ( | void | ) |
Definition at line 275 of file zmclient.cpp.
Referenced by ZMConsole::updateMonitorList().
Definition at line 90 of file zmclient.h.
Referenced by connectToHost(), restartConnection(), sendReceiveStringList(), and shutdown().
|
private |
Definition at line 82 of file zmclient.h.
Referenced by checkProtoVersion(), deleteEvent(), deleteEventList(), doGetMonitorList(), getAnalyseFrame(), getCameraList(), getEventDates(), getEventFrame(), getEventList(), getFrameList(), getLiveFrame(), getServerStatus(), setMonitorFunction(), updateAlarmStates(), and updateMonitorStatus().
|
private |
Definition at line 88 of file zmclient.h.
Referenced by connectToHost(), restartConnection(), and sendReceiveStringList().
Definition at line 93 of file zmclient.h.
|
private |
Definition at line 81 of file zmclient.h.
Referenced by doGetMonitorList(), getMonitorAt(), getMonitorByID(), getMonitorCount(), updateAlarmStates(), and updateMonitorStatus().
|
private |
Definition at line 83 of file zmclient.h.
Referenced by doGetMonitorList(), getMonitorAt(), getMonitorCount(), and saveNotificationMonitors().
|
private |
Definition at line 84 of file zmclient.h.
Referenced by doGetMonitorList(), getMonitorByID(), updateAlarmStates(), and updateMonitorStatus().
|
private |
Definition at line 89 of file zmclient.h.
Referenced by connectToHost(), restartConnection(), and sendReceiveStringList().
|
private |
Definition at line 91 of file zmclient.h.
Referenced by ZMClient(), and ~ZMClient().
|
private |
Definition at line 86 of file zmclient.h.
Referenced by connectToHost(), readData(), sendReceiveStringList(), shutdown(), and ~ZMClient().
|
private |
Definition at line 87 of file zmclient.h.
Referenced by connectToHost(), and shutdown().
|
staticprotected |
Definition at line 26 of file zmclient.h.
Referenced by get(), and ~ZMClient().
Definition at line 92 of file zmclient.h.
Referenced by connectToHost(), restartConnection(), shutdown(), and ~ZMClient().