MythTV  master
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Attributes | Private Slots | Private Member Functions | Private Attributes | List of all members
ZMClient Class Reference

#include <zmclient.h>

Inheritance diagram for ZMClient:
Inheritance graph
[legend]
Collaboration diagram for ZMClient:
Collaboration graph
[legend]

Public Member Functions

 ~ZMClient ()
 
void customEvent (QEvent *event) override
 
bool connectToHost (const QString &hostname, unsigned int port)
 
bool connected (void)
 
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, 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, unsigned char *buffer, int bufferSize)
 
void getFrameList (int eventID, vector< Frame * > *frameList)
 
void deleteEvent (int eventID)
 
void deleteEventList (vector< Event * > *eventList)
 
int getMonitorCount (void)
 
MonitorgetMonitorAt (int pos)
 
MonitorgetMonitorByID (int monID)
 
void getCameraList (QStringList &cameraList)
 
void getEventDates (const QString &monitorName, bool oldestFirst, QStringList &dateList)
 
void setMonitorFunction (const int monitorID, const QString &function, const bool enabled)
 
bool updateAlarmStates (void)
 
bool isMiniPlayerEnabled (void)
 
void setIsMiniPlayerEnabled (bool enabled)
 
void saveNotificationMonitors (void)
 
void showMiniPlayer (int monitorID)
 

Static Public Member Functions

static ZMClientget (void)
 
static bool setupZMClient (void)
 

Protected Member Functions

 ZMClient ()
 

Static Protected Attributes

static ZMClientm_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

QMutex m_listLock {QMutex::Recursive}
 
QMutex m_commandLock {QMutex::Recursive}
 
QList< Monitor * > m_monitorList
 
QMap< int, Monitor * > m_monitorMap
 
MythSocketm_socket {nullptr}
 
QMutex m_socketLock {QMutex::Recursive}
 
QString m_hostname {"localhost"}
 
uint m_port {6548}
 
bool m_bConnected {false}
 
QTimer * m_retryTimer {nullptr}
 
bool m_zmclientReady {false}
 
bool m_isMiniPlayerEnabled {true}
 

Detailed Description

Definition at line 16 of file zmclient.h.

Constructor & Destructor Documentation

◆ ZMClient()

ZMClient::ZMClient ( )
protected

Definition at line 26 of file zmclient.cpp.

Referenced by get().

◆ ~ZMClient()

ZMClient::~ZMClient ( )

Definition at line 241 of file zmclient.cpp.

Member Function Documentation

◆ get()

ZMClient * ZMClient::get ( void  )
static

◆ setupZMClient()

bool ZMClient::setupZMClient ( void  )
static

Definition at line 45 of file zmclient.cpp.

Referenced by checkConnection().

◆ customEvent()

void ZMClient::customEvent ( QEvent *  event)
override

Definition at line 964 of file zmclient.cpp.

◆ connectToHost()

bool ZMClient::connectToHost ( const QString &  hostname,
unsigned int  port 
)

Definition at line 62 of file zmclient.cpp.

Referenced by restartConnection(), sendReceiveStringList(), and setupZMClient().

◆ connected()

bool ZMClient::connected ( void  )
inline

Definition at line 35 of file zmclient.h.

◆ checkProtoVersion()

bool ZMClient::checkProtoVersion ( void  )

Definition at line 180 of file zmclient.cpp.

Referenced by connectToHost().

◆ shutdown()

void ZMClient::shutdown ( )

Definition at line 230 of file zmclient.cpp.

◆ getServerStatus()

void ZMClient::getServerStatus ( QString &  status,
QString &  cpuStat,
QString &  diskStat 
)

Definition at line 257 of file zmclient.cpp.

Referenced by ZMConsole::getDaemonStatus().

◆ updateMonitorStatus()

void ZMClient::updateMonitorStatus ( void  )

Definition at line 277 of file zmclient.cpp.

Referenced by ZMConsole::updateMonitorList().

◆ getEventList()

void ZMClient::getEventList ( const QString &  monitorName,
bool  oldestFirst,
const QString &  date,
bool  includeContinuous,
vector< Event * > *  eventList 
)

Definition at line 399 of file zmclient.cpp.

◆ getEventFrame()

void ZMClient::getEventFrame ( Event event,
int  frameNo,
MythImage **  image 
)

Definition at line 641 of file zmclient.cpp.

◆ getAnalyseFrame()

void ZMClient::getAnalyseFrame ( Event event,
int  frameNo,
QImage &  image 
)

Definition at line 692 of file zmclient.cpp.

◆ getLiveFrame()

int ZMClient::getLiveFrame ( int  monitorID,
QString &  status,
unsigned char *  buffer,
int  bufferSize 
)

Definition at line 739 of file zmclient.cpp.

Referenced by ZMLivePlayer::updateFrame().

◆ getFrameList()

void ZMClient::getFrameList ( int  eventID,
vector< Frame * > *  frameList 
)

Definition at line 500 of file zmclient.cpp.

◆ deleteEvent()

void ZMClient::deleteEvent ( int  eventID)

Definition at line 546 of file zmclient.cpp.

◆ deleteEventList()

void ZMClient::deleteEventList ( vector< Event * > *  eventList)

Definition at line 555 of file zmclient.cpp.

◆ getMonitorCount()

int ZMClient::getMonitorCount ( void  )

◆ getMonitorAt()

Monitor * ZMClient::getMonitorAt ( int  pos)

◆ getMonitorByID()

Monitor * ZMClient::getMonitorByID ( int  monID)

◆ getCameraList()

void ZMClient::getCameraList ( QStringList &  cameraList)

Definition at line 797 of file zmclient.cpp.

◆ getEventDates()

void ZMClient::getEventDates ( const QString &  monitorName,
bool  oldestFirst,
QStringList &  dateList 
)

Definition at line 454 of file zmclient.cpp.

◆ setMonitorFunction()

void ZMClient::setMonitorFunction ( const int  monitorID,
const QString &  function,
const bool  enabled 
)

Definition at line 932 of file zmclient.cpp.

Referenced by FunctionDialog::setMonitorFunction().

◆ updateAlarmStates()

bool ZMClient::updateAlarmStates ( void  )

Definition at line 348 of file zmclient.cpp.

◆ isMiniPlayerEnabled()

bool ZMClient::isMiniPlayerEnabled ( void  )
inline

Definition at line 64 of file zmclient.h.

Referenced by showMiniPlayer().

◆ setIsMiniPlayerEnabled()

void ZMClient::setIsMiniPlayerEnabled ( bool  enabled)
inline

Definition at line 65 of file zmclient.h.

Referenced by ZMLivePlayer::ZMLivePlayer(), and ZMLivePlayer::~ZMLivePlayer().

◆ saveNotificationMonitors()

void ZMClient::saveNotificationMonitors ( void  )

Definition at line 945 of file zmclient.cpp.

Referenced by FunctionDialog::setMonitorFunction().

◆ showMiniPlayer()

void ZMClient::showMiniPlayer ( int  monitorID)

Definition at line 987 of file zmclient.cpp.

Referenced by customEvent().

◆ restartConnection

void ZMClient::restartConnection ( void  )
privateslot

Definition at line 220 of file zmclient.cpp.

Referenced by ZMClient().

◆ doGetMonitorList()

void ZMClient::doGetMonitorList ( void  )
private

Definition at line 865 of file zmclient.cpp.

Referenced by connectToHost().

◆ readData()

bool ZMClient::readData ( unsigned char *  data,
int  dataSize 
)
private

Definition at line 583 of file zmclient.cpp.

Referenced by getAnalyseFrame(), getEventFrame(), and getLiveFrame().

◆ sendReceiveStringList()

bool ZMClient::sendReceiveStringList ( QStringList &  strList)
private

Member Data Documentation

◆ m_zmclient

ZMClient * ZMClient::m_zmclient = nullptr
staticprotected

Definition at line 23 of file zmclient.h.

Referenced by get(), and ~ZMClient().

◆ m_listLock

QMutex ZMClient::m_listLock {QMutex::Recursive}
private

◆ m_commandLock

QMutex ZMClient::m_commandLock {QMutex::Recursive}
private

◆ m_monitorList

QList<Monitor*> ZMClient::m_monitorList
private

◆ m_monitorMap

QMap<int, Monitor*> ZMClient::m_monitorMap
private

◆ m_socket

MythSocket* ZMClient::m_socket {nullptr}
private

Definition at line 83 of file zmclient.h.

Referenced by connectToHost(), readData(), sendReceiveStringList(), shutdown(), and ~ZMClient().

◆ m_socketLock

QMutex ZMClient::m_socketLock {QMutex::Recursive}
private

Definition at line 84 of file zmclient.h.

Referenced by connectToHost(), and shutdown().

◆ m_hostname

QString ZMClient::m_hostname {"localhost"}
private

Definition at line 85 of file zmclient.h.

Referenced by connectToHost(), restartConnection(), and sendReceiveStringList().

◆ m_port

uint ZMClient::m_port {6548}
private

Definition at line 86 of file zmclient.h.

Referenced by connectToHost(), restartConnection(), and sendReceiveStringList().

◆ m_bConnected

bool ZMClient::m_bConnected {false}
private

Definition at line 87 of file zmclient.h.

Referenced by connectToHost(), restartConnection(), sendReceiveStringList(), and shutdown().

◆ m_retryTimer

QTimer* ZMClient::m_retryTimer {nullptr}
private

Definition at line 88 of file zmclient.h.

Referenced by ZMClient(), and ~ZMClient().

◆ m_zmclientReady

bool ZMClient::m_zmclientReady {false}
private

Definition at line 89 of file zmclient.h.

Referenced by connectToHost(), restartConnection(), shutdown(), and ~ZMClient().

◆ m_isMiniPlayerEnabled

bool ZMClient::m_isMiniPlayerEnabled {true}
private

Definition at line 90 of file zmclient.h.


The documentation for this class was generated from the following files: