MythTV  master
Classes | Macros | Enumerations | Functions | Variables
zmserver.h File Reference
#include <cstdint>
#include <map>
#include <mysql/mysql.h>
#include <sstream>
#include <string>
#include <unistd.h>
#include <vector>
Include dependency graph for zmserver.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SharedData
 
struct  SharedData26
 
struct  SharedData32
 
struct  TriggerData
 
struct  TriggerData26
 
struct  VideoStoreData
 
class  MONITOR
 
class  ZMServer
 

Macros

#define DB_CHECK_TIME   60
 

Enumerations

enum  State {
  IDLE, PREALARM, ALARM, ALERT,
  TAPE, IDLE, PREALARM, ALARM,
  ALERT, TAPE
}
 
enum  TriggerState { TRIGGER_CANCEL, TRIGGER_ON, TRIGGER_OFF }
 

Functions

bool checkVersion (int major, int minor, int revision)
 
void loadZMConfig (const string &configfile)
 
void connectToDatabase (void)
 
void kickDatabase (bool debug)
 

Variables

MYSQL g_dbConn
 
string g_zmversion
 
string g_password
 
string g_server
 
string g_database
 
string g_webPath
 
string g_user
 
string g_webUser
 
string g_binPath
 
int g_majorVersion
 
int g_minorVersion
 
int g_revisionVersion
 
time_t g_lastDBKick
 
const string FUNCTION_MONITOR = "Monitor"
 
const string FUNCTION_MODECT = "Modect"
 
const string FUNCTION_NODECT = "Nodect"
 
const string FUNCTION_RECORD = "Record"
 
const string FUNCTION_MOCORD = "Mocord"
 
const string FUNCTION_NONE = "None"
 
const string RESTART = "restart"
 
const string RELOAD = "reload"
 
const string RUNNING = "running"
 

Macro Definition Documentation

◆ DB_CHECK_TIME

#define DB_CHECK_TIME   60

Definition at line 48 of file zmserver.h.

Enumeration Type Documentation

◆ State

enum State
Enumerator
IDLE 
PREALARM 
ALARM 
ALERT 
TAPE 
IDLE 
PREALARM 
ALARM 
ALERT 
TAPE 

Definition at line 62 of file zmserver.h.

◆ TriggerState

Enumerator
TRIGGER_CANCEL 
TRIGGER_ON 
TRIGGER_OFF 

Definition at line 165 of file zmserver.h.

Function Documentation

◆ checkVersion()

bool checkVersion ( int  major,
int  minor,
int  revision 
)

◆ loadZMConfig()

void loadZMConfig ( const string &  configfile)

Definition at line 106 of file zmserver.cpp.

Referenced by main().

◆ connectToDatabase()

void connectToDatabase ( void  )

Definition at line 186 of file zmserver.cpp.

Referenced by kickDatabase(), and main().

◆ kickDatabase()

void kickDatabase ( bool  debug)

Definition at line 211 of file zmserver.cpp.

Referenced by ZMServer::handleGetLiveFrame(), and main().

Variable Documentation

◆ g_dbConn

MYSQL g_dbConn

◆ g_zmversion

string g_zmversion

Definition at line 82 of file zmserver.cpp.

Referenced by loadZMConfig(), and main().

◆ g_password

string g_password

Definition at line 83 of file zmserver.cpp.

Referenced by connectToDatabase(), and loadZMConfig().

◆ g_server

string g_server

Definition at line 84 of file zmserver.cpp.

Referenced by connectToDatabase(), and loadZMConfig().

◆ g_database

string g_database

Definition at line 85 of file zmserver.cpp.

Referenced by connectToDatabase(), and loadZMConfig().

◆ g_webPath

string g_webPath

◆ g_user

string g_user

Definition at line 87 of file zmserver.cpp.

Referenced by connectToDatabase(), and loadZMConfig().

◆ g_webUser

string g_webUser

Definition at line 88 of file zmserver.cpp.

Referenced by loadZMConfig().

◆ g_binPath

string g_binPath

◆ g_majorVersion

int g_majorVersion

Definition at line 92 of file zmserver.cpp.

Referenced by checkVersion(), and main().

◆ g_minorVersion

int g_minorVersion

Definition at line 93 of file zmserver.cpp.

Referenced by checkVersion(), and main().

◆ g_revisionVersion

int g_revisionVersion

Definition at line 94 of file zmserver.cpp.

Referenced by checkVersion(), and main().

◆ g_lastDBKick

time_t g_lastDBKick

Definition at line 96 of file zmserver.cpp.

Referenced by kickDatabase().

◆ FUNCTION_MONITOR

const string FUNCTION_MONITOR = "Monitor"

Definition at line 51 of file zmserver.h.

Referenced by ZMServer::handleSetMonitorFunction().

◆ FUNCTION_MODECT

const string FUNCTION_MODECT = "Modect"

Definition at line 52 of file zmserver.h.

Referenced by ZMServer::handleSetMonitorFunction(), and ZMServer::zmaControl().

◆ FUNCTION_NODECT

const string FUNCTION_NODECT = "Nodect"

Definition at line 53 of file zmserver.h.

Referenced by ZMServer::handleSetMonitorFunction(), and ZMServer::zmaControl().

◆ FUNCTION_RECORD

const string FUNCTION_RECORD = "Record"

Definition at line 54 of file zmserver.h.

Referenced by ZMServer::handleSetMonitorFunction(), and ZMServer::zmaControl().

◆ FUNCTION_MOCORD

const string FUNCTION_MOCORD = "Mocord"

Definition at line 55 of file zmserver.h.

Referenced by ZMServer::handleSetMonitorFunction(), and ZMServer::zmaControl().

◆ FUNCTION_NONE

const string FUNCTION_NONE = "None"

Definition at line 56 of file zmserver.h.

Referenced by ZMServer::handleSetMonitorFunction().

◆ RESTART

const string RESTART = "restart"

◆ RELOAD

const string RELOAD = "reload"

Definition at line 59 of file zmserver.h.

Referenced by ZMServer::handleSetMonitorFunction(), and ZMServer::zmaControl().

◆ RUNNING

const string RUNNING = "running"

Definition at line 60 of file zmserver.h.

Referenced by ZMServer::handleSetMonitorFunction().