You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
#ifndef __OBJECTEVENTREPORT_H_INCL__
#define __OBJECTEVENTREPORT_H_INCL__
#include <time.h>
#ifdef __linux__
#include <sys/types.h>
#include <dirent.h>
#endif
#include <vector>
#include "../base/basicFunctionality.h"
#include "../base/basicEventHandler.h"
#include "../../data/storage/storageProvider.h"
#include "../base/basicSettings.h"
#include "../base/basicReportRecord.h"
#include "../base/basicCamera.h"
typedef struct S_REPORT_RECORD { uint32_t chunk_size; //4
uint32_t ms; //4
uint16_t ums; //2
uint8_t cls_id; //1
uint8_t type; //1
uint32_t src; //4
uint8_t media_type; //1
uint8_t media_count; //1
uint16_t data_size; //2
//----------------------------------- 20 bytes = Fixed Size Header
void * data; uint8_t media_allocated; char ** media_names; uint32_t * media_markers;}REPORT_RECORD;typedef struct S_REPORT_LIST_RECORD{ char text[CTEXT]; char path[CTEXT];}REPORT_LIST_RECORD;
#define REPORT_RECORD_HEADER_SIZE 20
//typedef std::vector<REPORT_LIST_RECORD *> vectorPeportsList;
typedef std::vector<char *> vectorPeportsList;typedef std::vector<REPORT_RECORD*> vectorReport;
class mediaVideoSourceManager;
/**
* TODO: Add class description * * @author Gagua */
class objectEventReport : public basicEventHandler { private: storageProvider * m_pStorageProvider; basicSettings * m_pSettingsEngine; mediaVideoSourceManager * m_pMediaManager; char m_pReportFileName[MAX_PATH]; bool saveReportRecord(REPORT_RECORD *Record); bool getMedia(REPORT_RECORD* Record); bool prefill(basicEvent* Evt, REPORT_RECORD* Record); bool utilize(REPORT_RECORD* Record); REPORT_RECORD * loadReportRecord(FILE* FD); vectorPeportsList m_vLoaddedReports; vectorReport m_vReport; public: static objectEventReport *getInstance(void); virtual ~objectEventReport(void); virtual void dispatchEvent( basicEvent *Evt); bool loadReportList( struct tm *LTM); bool loadReport( struct tm *LTM); vectorPeportsList * getLoaddedReports(void); vectorReport * getLoaddedReport(void); bool getReportBase(CSTR path, struct tm* LTM); private: static objectEventReport *_instance; protected: objectEventReport(void);};
#endif // __OBJECTEVENTREPORT_H_INCL__
|