ZMServer Class Reference

#include <zmserver.h>

List of all members.

Public Member Functions

 ZMServer (int sock, bool debug)
 ~ZMServer ()
void processRequest (char *buf, int nbytes)

Private Member Functions

string getZMSetting (const string &setting)
bool send (const string s) const
bool send (const string s, const unsigned char *buffer, int dataLen) const
void sendError (string error)
void getMonitorList (void)
void initMonitor (MONITOR *monitor)
int getFrame (unsigned char *buffer, int bufferSize, MONITOR *monitor)
long long getDiskSpace (const string &filename, long long &total, long long &used)
void tokenize (const string &command, vector< string > &tokens)
void handleHello (void)
string runCommand (string command)
void getMonitorStatus (string id, string type, string device, string host, string channel, string function, string &zmcStatus, string &zmaStatus, string enabled)
void handleGetServerStatus (void)
void handleGetMonitorStatus (void)
void handleGetMonitorList (void)
void handleGetCameraList (void)
void handleGetEventList (vector< string > tokens)
void handleGetEventFrame (vector< string > tokens)
void handleGetAnalyseFrame (vector< string > tokens)
void handleGetLiveFrame (vector< string > tokens)
void handleGetFrameList (vector< string > tokens)
void handleDeleteEvent (vector< string > tokens)
void handleDeleteEventList (vector< string > tokens)
void handleGetEventDates (vector< string > tokens)
void handleRunZMAudit (void)
void handleSetMonitorFunction (vector< string > tokens)
void zmcControl (MONITOR *monitor, const string &mode)
void zmaControl (MONITOR *monitor, const string &mode)

Private Attributes

bool m_debug
int m_sock
map< int, MONITOR * > m_monitors
bool m_useDeepStorage
string m_eventFileFormat
string m_analyseFileFormat
key_t m_shmKey
string m_mmapPath

Detailed Description

Definition at line 149 of file zmserver.h.


Constructor & Destructor Documentation

ZMServer::ZMServer ( int  sock,
bool  debug 
)

Definition at line 201 of file zmserver.cpp.

ZMServer::~ZMServer (  ) 

Definition at line 256 of file zmserver.cpp.


Member Function Documentation

void ZMServer::processRequest ( char *  buf,
int  nbytes 
)

Definition at line 284 of file zmserver.cpp.

Referenced by main().

string ZMServer::getZMSetting ( const string setting  )  [private]

Definition at line 1493 of file zmserver.cpp.

Referenced by zmaControl(), and ZMServer().

bool ZMServer::send ( const string  s  )  const [private]
bool ZMServer::send ( const string  s,
const unsigned char *  buffer,
int  dataLen 
) const [private]

Definition at line 357 of file zmserver.cpp.

void ZMServer::sendError ( string  error  )  [private]
void ZMServer::getMonitorList ( void   )  [private]

Definition at line 1285 of file zmserver.cpp.

Referenced by ZMServer().

void ZMServer::initMonitor ( MONITOR monitor  )  [private]

Definition at line 1341 of file zmserver.cpp.

Referenced by getMonitorList().

int ZMServer::getFrame ( unsigned char *  buffer,
int  bufferSize,
MONITOR monitor 
) [private]

Definition at line 1445 of file zmserver.cpp.

Referenced by handleGetLiveFrame().

long long ZMServer::getDiskSpace ( const string filename,
long long &  total,
long long &  used 
) [private]

Definition at line 397 of file zmserver.cpp.

Referenced by handleGetServerStatus().

void ZMServer::tokenize ( const string command,
vector< string > &  tokens 
) [private]

Definition at line 262 of file zmserver.cpp.

Referenced by processRequest().

void ZMServer::handleHello ( void   )  [private]

Definition at line 387 of file zmserver.cpp.

Referenced by processRequest().

string ZMServer::runCommand ( string  command  )  [private]
void ZMServer::getMonitorStatus ( string  id,
string  type,
string  device,
string  host,
string  channel,
string  function,
string zmcStatus,
string zmaStatus,
string  enabled 
) [private]

Definition at line 729 of file zmserver.cpp.

Referenced by handleGetMonitorStatus().

void ZMServer::handleGetServerStatus ( void   )  [private]

Definition at line 427 of file zmserver.cpp.

Referenced by processRequest().

void ZMServer::handleGetMonitorStatus ( void   )  [private]

Definition at line 616 of file zmserver.cpp.

Referenced by processRequest().

void ZMServer::handleGetMonitorList ( void   )  [private]

Definition at line 1132 of file zmserver.cpp.

Referenced by processRequest().

void ZMServer::handleGetCameraList ( void   )  [private]

Definition at line 1086 of file zmserver.cpp.

Referenced by processRequest().

void ZMServer::handleGetEventList ( vector< string tokens  )  [private]

Definition at line 460 of file zmserver.cpp.

Referenced by processRequest().

void ZMServer::handleGetEventFrame ( vector< string tokens  )  [private]

Definition at line 778 of file zmserver.cpp.

Referenced by processRequest().

void ZMServer::handleGetAnalyseFrame ( vector< string tokens  )  [private]

Definition at line 843 of file zmserver.cpp.

Referenced by processRequest().

void ZMServer::handleGetLiveFrame ( vector< string tokens  )  [private]

Definition at line 949 of file zmserver.cpp.

Referenced by processRequest().

void ZMServer::handleGetFrameList ( vector< string tokens  )  [private]

Definition at line 1022 of file zmserver.cpp.

Referenced by processRequest().

void ZMServer::handleDeleteEvent ( vector< string tokens  )  [private]

Definition at line 1195 of file zmserver.cpp.

Referenced by processRequest().

void ZMServer::handleDeleteEventList ( vector< string tokens  )  [private]

Definition at line 1232 of file zmserver.cpp.

Referenced by processRequest().

void ZMServer::handleGetEventDates ( vector< string tokens  )  [private]

Definition at line 547 of file zmserver.cpp.

Referenced by processRequest().

void ZMServer::handleRunZMAudit ( void   )  [private]

Definition at line 1267 of file zmserver.cpp.

Referenced by processRequest().

void ZMServer::handleSetMonitorFunction ( vector< string tokens  )  [private]

Definition at line 1528 of file zmserver.cpp.

Referenced by processRequest().

void ZMServer::zmcControl ( MONITOR monitor,
const string mode 
) [private]

Definition at line 1629 of file zmserver.cpp.

Referenced by handleSetMonitorFunction().

void ZMServer::zmaControl ( MONITOR monitor,
const string mode 
) [private]

Definition at line 1680 of file zmserver.cpp.

Referenced by handleSetMonitorFunction().


Member Data Documentation

int ZMServer::m_sock [private]

Definition at line 190 of file zmserver.h.

Referenced by send(), and ZMServer().

map<int, MONITOR *> ZMServer::m_monitors [private]

Definition at line 191 of file zmserver.h.

Referenced by getMonitorList(), handleGetLiveFrame(), and handleSetMonitorFunction().

Definition at line 192 of file zmserver.h.

Referenced by handleGetAnalyseFrame(), handleGetEventFrame(), and ZMServer().

Definition at line 193 of file zmserver.h.

Referenced by handleGetEventFrame(), and ZMServer().

Definition at line 194 of file zmserver.h.

Referenced by handleGetAnalyseFrame(), and ZMServer().

key_t ZMServer::m_shmKey [private]

Definition at line 195 of file zmserver.h.

Referenced by initMonitor(), and ZMServer().

Definition at line 196 of file zmserver.h.

Referenced by initMonitor(), and ZMServer().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Generated on Mon May 28 06:42:34 2012 for MythTV by  doxygen 1.6.3