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.

77 lines
2.1 KiB

7 years ago
​
​
​
7 years ago
​
​
​
​
7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __OBJECTEVENTREPORT_H_INCL__
  2. #define __OBJECTEVENTREPORT_H_INCL__
  3. #include <time.h>
  4. #include <vector>
  5. #include "../base/basicFunctionality.h"
  6. #include "../base/basicEventHandler.h"
  7. #include "../../data/storage/storageProvider.h"
  8. #include "../base/basicSettings.h"
  9. #include "../base/basicReportRecord.h"
  10. #include "../base/basicCamera.h"
  11. /**
  12. * TODO: Add class description
  13. *
  14. * @author Gagua
  15. */
  16. typedef struct S_REPORT_RECORD {
  17. uint32_t ms; //4
  18. uint16_t ums; //2
  19. uint8_t cls_id; //1
  20. uint8_t type; //1
  21. uint32_t src; //4
  22. uint8_t media_type; //1
  23. uint32_t media_marker; //4
  24. uint8_t media_count; //1
  25. //----------------------------------- 18 bytes = Fixed Size Header
  26. char ** media_names;
  27. uint16_t data_size;
  28. void * data;
  29. }REPORT_RECORD;
  30. typedef std::vector<char*> Rere;
  31. class mediaVideoSourceManager;
  32. class objectEventReport : public basicEventHandler {
  33. private:
  34. storageProvider * m_pStorageProvider;
  35. basicSettings * m_pSettingsEngine;
  36. mediaVideoSourceManager * m_pMediaManager;
  37. char m_pReportFileName[MAX_PATH];
  38. bool saveReportRecord(REPORT_RECORD *Record);
  39. bool getMedia(REPORT_RECORD* Record);
  40. bool prefill(REPORT_RECORD* Record);
  41. REPORT_RECORD * loadReportRecord(FILE* FD);
  42. Rere m_vLoaddedReports;
  43. public:
  44. static objectEventReport *getInstance(void);
  45. virtual ~objectEventReport(void);
  46. void dispatchEvent( basicEvent *Evt);
  47. bool loadReportList(struct tm *LTM);
  48. Rere * getLoaddedReports(void);
  49. private:
  50. static objectEventReport *_instance;
  51. protected:
  52. objectEventReport(void);
  53. };
  54. // TODO: Uncomment the copy constructor when you need it.
  55. //inline objectEventReport::objectEventReport(const objectEventReport& src)
  56. //{
  57. // // TODO: copy
  58. //}
  59. // TODO: Uncomment the assignment operator when you need it.
  60. //inline objectEventReport& objectEventReport::operator=(const objectEventReport& rhs)
  61. //{
  62. // if (this == &rhs) {
  63. // return *this;
  64. // }
  65. //
  66. // // TODO: assignment
  67. //
  68. // return *this;
  69. //}
  70. #endif // __OBJECTEVENTREPORT_H_INCL__