MythTV
master
|
#include <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 240 of file zmclient.cpp.
|
static |
Definition at line 37 of file zmclient.cpp.
Referenced by ZMLivePlayer::changePlayerMonitor(), checkConnection(), ZMMiniPlayer::customEvent(), ZMEvents::deletePressed(), ZMPlayer::deletePressed(), ZMEvents::doDeleteAll(), 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().
|
static |
Definition at line 44 of file zmclient.cpp.
Referenced by checkConnection().
|
override |
Definition at line 962 of file zmclient.cpp.
bool ZMClient::connectToHost | ( | const QString & | hostname, |
unsigned int | port | ||
) |
Definition at line 61 of file zmclient.cpp.
Referenced by restartConnection(), sendReceiveStringList(), and setupZMClient().
|
inline |
Definition at line 38 of file zmclient.h.
bool ZMClient::checkProtoVersion | ( | void | ) |
Definition at line 179 of file zmclient.cpp.
Referenced by connectToHost().
void ZMClient::shutdown | ( | ) |
Definition at line 229 of file zmclient.cpp.
void ZMClient::getServerStatus | ( | QString & | status, |
QString & | cpuStat, | ||
QString & | diskStat | ||
) |
Definition at line 256 of file zmclient.cpp.
Referenced by ZMConsole::getDaemonStatus().
void ZMClient::updateMonitorStatus | ( | void | ) |
Definition at line 276 of file zmclient.cpp.
Referenced by ZMConsole::updateMonitorList().
void ZMClient::getEventList | ( | const QString & | monitorName, |
bool | oldestFirst, | ||
const QString & | date, | ||
bool | includeContinuous, | ||
std::vector< Event * > * | eventList | ||
) |
Definition at line 398 of file zmclient.cpp.
Definition at line 639 of file zmclient.cpp.
void ZMClient::getAnalyseFrame | ( | Event * | event, |
int | frameNo, | ||
QImage & | image | ||
) |
Definition at line 690 of file zmclient.cpp.
int ZMClient::getLiveFrame | ( | int | monitorID, |
QString & | status, | ||
FrameData & | buffer | ||
) |
Definition at line 737 of file zmclient.cpp.
Referenced by ZMLivePlayer::updateFrame().
void ZMClient::getFrameList | ( | int | eventID, |
std::vector< Frame * > * | frameList | ||
) |
Definition at line 499 of file zmclient.cpp.
void ZMClient::deleteEvent | ( | int | eventID | ) |
Definition at line 545 of file zmclient.cpp.
void ZMClient::deleteEventList | ( | std::vector< Event * > * | eventList | ) |
Definition at line 554 of file zmclient.cpp.
int ZMClient::getMonitorCount | ( | void | ) |
Definition at line 837 of file zmclient.cpp.
Referenced by ZMLivePlayer::changePlayerMonitor(), AlarmNotifyThread::run(), and ZMConsole::updateMonitorList().
Monitor * ZMClient::getMonitorAt | ( | int | pos | ) |
Definition at line 843 of file zmclient.cpp.
Referenced by ZMLivePlayer::changePlayerMonitor(), AlarmNotifyThread::run(), ZMLivePlayer::setMonitorLayout(), and ZMConsole::updateMonitorList().
Monitor * ZMClient::getMonitorByID | ( | int | monID | ) |
Definition at line 853 of file zmclient.cpp.
Referenced by ZMMiniPlayer::customEvent(), ZMLivePlayer::setMonitorLayout(), and ZMMiniPlayer::timerTimeout().
void ZMClient::getCameraList | ( | QStringList & | cameraList | ) |
Definition at line 795 of file zmclient.cpp.
void ZMClient::getEventDates | ( | const QString & | monitorName, |
bool | oldestFirst, | ||
QStringList & | dateList | ||
) |
Definition at line 453 of file zmclient.cpp.
void ZMClient::setMonitorFunction | ( | int | monitorID, |
const QString & | function, | ||
bool | enabled | ||
) |
Definition at line 930 of file zmclient.cpp.
Referenced by FunctionDialog::setMonitorFunction().
bool ZMClient::updateAlarmStates | ( | void | ) |
Definition at line 347 of file zmclient.cpp.
|
inline |
Definition at line 67 of file zmclient.h.
Referenced by showMiniPlayer().
|
inline |
Definition at line 68 of file zmclient.h.
Referenced by ZMLivePlayer::ZMLivePlayer(), and ZMLivePlayer::~ZMLivePlayer().
void ZMClient::saveNotificationMonitors | ( | void | ) |
Definition at line 943 of file zmclient.cpp.
Referenced by FunctionDialog::setMonitorFunction().
void ZMClient::showMiniPlayer | ( | int | monitorID | ) | const |
Definition at line 985 of file zmclient.cpp.
Referenced by customEvent().
|
privateslot |
Definition at line 219 of file zmclient.cpp.
Referenced by ZMClient().
|
private |
Definition at line 863 of file zmclient.cpp.
Referenced by connectToHost().
|
private |
Definition at line 582 of file zmclient.cpp.
Referenced by getAnalyseFrame(), getEventFrame(), and getLiveFrame().
|
private |
Definition at line 123 of file zmclient.cpp.
Referenced by checkProtoVersion(), deleteEvent(), deleteEventList(), doGetMonitorList(), getAnalyseFrame(), getCameraList(), getEventDates(), getEventFrame(), getEventList(), getFrameList(), getLiveFrame(), getServerStatus(), setMonitorFunction(), updateAlarmStates(), and updateMonitorStatus().
|
staticprotected |
Definition at line 26 of file zmclient.h.
Referenced by get(), and ~ZMClient().
|
private |
Definition at line 85 of file zmclient.h.
Referenced by doGetMonitorList(), getMonitorAt(), getMonitorByID(), getMonitorCount(), updateAlarmStates(), and updateMonitorStatus().
|
private |
Definition at line 86 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 doGetMonitorList(), getMonitorAt(), getMonitorCount(), and saveNotificationMonitors().
|
private |
Definition at line 89 of file zmclient.h.
Referenced by doGetMonitorList(), getMonitorByID(), updateAlarmStates(), and updateMonitorStatus().
|
private |
Definition at line 91 of file zmclient.h.
Referenced by connectToHost(), readData(), sendReceiveStringList(), shutdown(), and ~ZMClient().
|
private |
Definition at line 95 of file zmclient.h.
Referenced by connectToHost(), and shutdown().
|
private |
Definition at line 97 of file zmclient.h.
Referenced by connectToHost(), restartConnection(), and sendReceiveStringList().
|
private |
Definition at line 98 of file zmclient.h.
Referenced by connectToHost(), restartConnection(), and sendReceiveStringList().
Definition at line 99 of file zmclient.h.
Referenced by connectToHost(), restartConnection(), sendReceiveStringList(), and shutdown().
|
private |
Definition at line 100 of file zmclient.h.
Referenced by ZMClient(), and ~ZMClient().
Definition at line 101 of file zmclient.h.
Referenced by connectToHost(), restartConnection(), shutdown(), and ~ZMClient().
Definition at line 102 of file zmclient.h.