rough in the storage object
This commit is contained in:
parent
0c18f11764
commit
a02744bf2a
|
@ -175,6 +175,7 @@ protected:
|
||||||
|
|
||||||
int last_state;
|
int last_state;
|
||||||
int last_event;
|
int last_event;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MonitorLink( int p_id, const char *p_name );
|
MonitorLink( int p_id, const char *p_name );
|
||||||
|
@ -210,6 +211,7 @@ protected:
|
||||||
// These are read from the DB and thereafter remain unchanged
|
// These are read from the DB and thereafter remain unchanged
|
||||||
unsigned int id;
|
unsigned int id;
|
||||||
char name[64];
|
char name[64];
|
||||||
|
unsigned int storage_id; // Id of the Storage Object, which currently will just provide a path, but in future may do more.
|
||||||
Function function; // What the monitor is doing
|
Function function; // What the monitor is doing
|
||||||
bool enabled; // Whether the monitor is enabled or asleep
|
bool enabled; // Whether the monitor is enabled or asleep
|
||||||
unsigned int width; // Normally the same as the camera, but not if partly rotated
|
unsigned int width; // Normally the same as the camera, but not if partly rotated
|
||||||
|
@ -287,7 +289,7 @@ protected:
|
||||||
public:
|
public:
|
||||||
// OurCheckAlarms seems to be unused. Check it on zm_monitor.cpp for more info.
|
// OurCheckAlarms seems to be unused. Check it on zm_monitor.cpp for more info.
|
||||||
//bool OurCheckAlarms( Zone *zone, const Image *pImage );
|
//bool OurCheckAlarms( Zone *zone, const Image *pImage );
|
||||||
Monitor( int p_id, const char *p_name, int p_function, bool p_enabled, const char *p_linked_monitors, Camera *p_camera, int p_orientation, unsigned int p_deinterlacing, const char *p_event_prefix, const char *p_label_format, const Coord &p_label_coord, int p_image_buffer_count, int p_warmup_count, int p_pre_event_count, int p_post_event_count, int p_stream_replay_buffer, int p_alarm_frame_count, int p_section_length, int p_frame_skip, int p_capture_delay, int p_alarm_capture_delay, int p_fps_report_interval, int p_ref_blend_perc, bool p_track_motion, Rgb p_signal_check_colour, Purpose p_purpose, int p_n_zones=0, Zone *p_zones[]=0 );
|
Monitor( int p_id, const char *p_name, int p_function, bool p_enabled, const char *p_linked_monitors, Camera *p_camera, int p_orientation, unsigned int p_deinterlacing, const char *p_event_prefix, const char *p_label_format, const Coord &p_label_coord, int p_image_buffer_count, int p_warmup_count, int p_pre_event_count, int p_post_event_count, int p_stream_replay_buffer, int p_alarm_frame_count, int p_section_length, int p_frame_skip, int p_capture_delay, int p_alarm_capture_delay, int p_fps_report_interval, int p_ref_blend_perc, bool p_track_motion, Rgb p_signal_check_colour, Purpose p_purpose, int p_n_zones=0, Zone *p_zones[]=0, unsigned int storage_id );
|
||||||
~Monitor();
|
~Monitor();
|
||||||
|
|
||||||
void AddZones( int p_n_zones, Zone *p_zones[] );
|
void AddZones( int p_n_zones, Zone *p_zones[] );
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
/*
|
||||||
|
* ZoneMinder regular expression class implementation, $Date$, $Revision$
|
||||||
|
* Copyright (C) 2001-2008 Philip Coombes
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "zm_db.h"
|
||||||
|
|
||||||
|
#include "zm_storage.h"
|
||||||
|
|
||||||
|
Storage::Storage() {
|
||||||
|
id = user[0] = path[0] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
Storage::Storage( MYSQL_ROW &dbrow ) {
|
||||||
|
unsigned int index = 0;
|
||||||
|
id = dbrow[index++];
|
||||||
|
strncpy( name, dbrow[index++], sizeof(name) );
|
||||||
|
strncpy( path, dbrow[index++], sizeof(path) );
|
||||||
|
}
|
||||||
|
|
||||||
|
Storage::~Storage() {
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
/*
|
||||||
|
* ZoneMinder Storage Class Interface, $Date$, $Revision$
|
||||||
|
* Copyright (C) 2001-2008 Philip Coombes
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "zm_db.h"
|
||||||
|
|
||||||
|
#ifndef ZM_STORAGE_H
|
||||||
|
#define ZM_STORAGE_H
|
||||||
|
|
||||||
|
class Storage {
|
||||||
|
public:
|
||||||
|
|
||||||
|
protected:
|
||||||
|
unsigned int id;
|
||||||
|
char name[64+1];
|
||||||
|
char path[64+1];
|
||||||
|
|
||||||
|
public:
|
||||||
|
Storage();
|
||||||
|
Storage( MYSQL_ROW &dbrow );
|
||||||
|
~Storage();
|
||||||
|
|
||||||
|
unsigned int getId() const { return( id ); }
|
||||||
|
const char *getName() const { return( name ); }
|
||||||
|
const char *getPath() const { return( path ); }
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ZM_STORAGE_H
|
Loading…
Reference in New Issue