MythTV  master
Classes | Macros | Typedefs | 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  SharedData34
 
struct  TriggerData
 
struct  TriggerData26
 
struct  VideoStoreData
 
class  MONITOR
 
class  ZMServer
 

Macros

#define MAX_IMAGE_SIZE   (2048*1536*3)
 
#define DB_CHECK_TIME   60
 

Typedefs

using FrameData = std::array< uint8_t, MAX_IMAGE_SIZE >
 

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 std::string &configfile)
 
void connectToDatabase (void)
 
void kickDatabase (bool debug)
 

Variables

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

Macro Definition Documentation

◆ MAX_IMAGE_SIZE

#define MAX_IMAGE_SIZE   (2048*1536*3)

Definition at line 28 of file zmserver.h.

◆ DB_CHECK_TIME

#define DB_CHECK_TIME   60

Definition at line 50 of file zmserver.h.

Typedef Documentation

◆ FrameData

using FrameData = std::array<uint8_t,MAX_IMAGE_SIZE>

Definition at line 29 of file zmserver.h.

Enumeration Type Documentation

◆ State

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

Definition at line 64 of file zmserver.h.

◆ TriggerState

Enumerator
TRIGGER_CANCEL 
TRIGGER_ON 
TRIGGER_OFF 

Definition at line 219 of file zmserver.h.

Function Documentation

◆ checkVersion()

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

◆ loadZMConfig()

void loadZMConfig ( const std::string &  configfile)

Definition at line 104 of file zmserver.cpp.

Referenced by main().

◆ connectToDatabase()

void connectToDatabase ( void  )

Definition at line 176 of file zmserver.cpp.

Referenced by kickDatabase(), and main().

◆ kickDatabase()

void kickDatabase ( bool  debug)

Definition at line 201 of file zmserver.cpp.

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

Variable Documentation

◆ g_dbConn

MYSQL g_dbConn
extern

◆ g_zmversion

std::string g_zmversion
extern

Definition at line 80 of file zmserver.cpp.

Referenced by loadZMConfig(), and main().

◆ g_password

std::string g_password
extern

Definition at line 81 of file zmserver.cpp.

Referenced by connectToDatabase(), and loadZMConfig().

◆ g_server

std::string g_server
extern

Definition at line 82 of file zmserver.cpp.

Referenced by connectToDatabase(), and loadZMConfig().

◆ g_database

std::string g_database
extern

Definition at line 83 of file zmserver.cpp.

Referenced by connectToDatabase(), and loadZMConfig().

◆ g_webPath

std::string g_webPath
extern

◆ g_user

std::string g_user
extern

Definition at line 85 of file zmserver.cpp.

Referenced by connectToDatabase(), and loadZMConfig().

◆ g_webUser

std::string g_webUser
extern

Definition at line 86 of file zmserver.cpp.

Referenced by loadZMConfig().

◆ g_binPath

std::string g_binPath
extern

◆ g_majorVersion

int g_majorVersion
extern

Definition at line 90 of file zmserver.cpp.

Referenced by checkVersion(), and main().

◆ g_minorVersion

int g_minorVersion
extern

Definition at line 91 of file zmserver.cpp.

Referenced by checkVersion(), and main().

◆ g_revisionVersion

int g_revisionVersion
extern

Definition at line 92 of file zmserver.cpp.

Referenced by checkVersion(), and main().

◆ g_lastDBKick

time_t g_lastDBKick
extern

Definition at line 94 of file zmserver.cpp.

Referenced by kickDatabase().

◆ FUNCTION_MONITOR

const std::string FUNCTION_MONITOR = "Monitor"

Definition at line 53 of file zmserver.h.

Referenced by ZMServer::handleSetMonitorFunction().

◆ FUNCTION_MODECT

const std::string FUNCTION_MODECT = "Modect"

Definition at line 54 of file zmserver.h.

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

◆ FUNCTION_NODECT

const std::string FUNCTION_NODECT = "Nodect"

Definition at line 55 of file zmserver.h.

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

◆ FUNCTION_RECORD

const std::string FUNCTION_RECORD = "Record"

Definition at line 56 of file zmserver.h.

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

◆ FUNCTION_MOCORD

const std::string FUNCTION_MOCORD = "Mocord"

Definition at line 57 of file zmserver.h.

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

◆ FUNCTION_NONE

const std::string FUNCTION_NONE = "None"

Definition at line 58 of file zmserver.h.

Referenced by ZMServer::handleSetMonitorFunction().

◆ RESTART

const std::string RESTART = "restart"

◆ RELOAD

const std::string RELOAD = "reload"

Definition at line 61 of file zmserver.h.

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

◆ RUNNING

const std::string RUNNING = "running"

Definition at line 62 of file zmserver.h.

Referenced by ZMServer::handleSetMonitorFunction().