globalInfo.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. #ifndef GLOBALINFO_H
  2. #define GLOBALINFO_H
  3. #include <QString>
  4. #include <QDateTime>
  5. #include "HCNetSDK.h"
  6. const QString g_videoName = "videoAll.mp4";
  7. /* 定义回调函数 */
  8. using Play_CallBack = void(void* hHandle,long lCmd,unsigned char *pMsg,long lSize,void *pContext);
  9. using Download_CallBack = void(void* hHandle,long lCmd,unsigned char *pMsg,long lSize,void *pContext);
  10. /**
  11. * @brief 登录摄像头的相关信息
  12. *
  13. */
  14. struct HKLoginInfo
  15. {
  16. QString HostName;
  17. int Port;
  18. QString UserName;
  19. QString Password;
  20. HKLoginInfo& operator=(const HKLoginInfo& info) {
  21. if(&info == this)
  22. return *this;
  23. HostName = info.HostName;
  24. Port = info.Port;
  25. UserName = info.UserName;
  26. Password = info.Password;
  27. return *this;
  28. }
  29. };
  30. /**
  31. * @brief 登录设备返回的设备信息
  32. *
  33. */
  34. struct DeviceInfo{
  35. quint32 AChannelNum; /* 模拟通道个数,貌似就是最大模拟通道个数 */
  36. quint32 AChannelStart; /* 模拟起始通道号 */
  37. quint32 DChannelNum; /* 数字通道个数,貌似就是最大模拟通道个数 */
  38. quint32 DChannelStart; /* 数字起始通道号 */
  39. };
  40. /**
  41. * @brief 搜索录像文件返回的信息
  42. *
  43. */
  44. struct RetFileInfo
  45. {
  46. QString fileName; /* 文件名称 */
  47. QDateTime startTime; /* 开始时间 */
  48. QDateTime endTime; /* 结束时间 */
  49. quint64 fileSize; /* 文件大小 */
  50. public:
  51. RetFileInfo();
  52. ~RetFileInfo();
  53. RetFileInfo& operator=(const RetFileInfo& info) {
  54. if(&info == this)
  55. return *this;
  56. fileName = info.fileName;
  57. startTime = info.startTime;
  58. endTime = info.endTime;
  59. fileSize = info.fileSize;
  60. return *this;
  61. }
  62. /* DVR_TIME转换成QDateTime */
  63. static QDateTime DVRTimeToDateTime(const NET_DVR_TIME_SEARCH &dvrTime);
  64. /* 设置开始时间 */
  65. void setStartTime(const NET_DVR_TIME_SEARCH &dvrTime);
  66. /* 设置结束时间 */
  67. void setEndTime(const NET_DVR_TIME_SEARCH &dvrTime);
  68. };
  69. #endif /* GLOBALINFO_H */