1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- #ifndef GLOBALINFO_H
- #define GLOBALINFO_H
- #include <QString>
- #include <QDateTime>
- #include "HCNetSDK.h"
- const QString g_videoName = "videoAll.mp4";
- /* 定义回调函数 */
- using Play_CallBack = void(void* hHandle,long lCmd,unsigned char *pMsg,long lSize,void *pContext);
- using Download_CallBack = void(void* hHandle,long lCmd,unsigned char *pMsg,long lSize,void *pContext);
- /**
- * @brief 登录摄像头的相关信息
- *
- */
- struct HKLoginInfo
- {
- QString HostName;
- int Port;
- QString UserName;
- QString Password;
-
- HKLoginInfo& operator=(const HKLoginInfo& info) {
- if(&info == this)
- return *this;
- HostName = info.HostName;
- Port = info.Port;
- UserName = info.UserName;
- Password = info.Password;
- return *this;
- }
- };
- /**
- * @brief 登录设备返回的设备信息
- *
- */
- struct DeviceInfo{
- quint32 AChannelNum; /* 模拟通道个数,貌似就是最大模拟通道个数 */
- quint32 AChannelStart; /* 模拟起始通道号 */
- quint32 DChannelNum; /* 数字通道个数,貌似就是最大模拟通道个数 */
- quint32 DChannelStart; /* 数字起始通道号 */
- };
- /**
- * @brief 搜索录像文件返回的信息
- *
- */
- struct RetFileInfo
- {
- QString fileName; /* 文件名称 */
- QDateTime startTime; /* 开始时间 */
- QDateTime endTime; /* 结束时间 */
- quint64 fileSize; /* 文件大小 */
- public:
- RetFileInfo();
- ~RetFileInfo();
- RetFileInfo& operator=(const RetFileInfo& info) {
- if(&info == this)
- return *this;
- fileName = info.fileName;
- startTime = info.startTime;
- endTime = info.endTime;
- fileSize = info.fileSize;
- return *this;
- }
- /* DVR_TIME转换成QDateTime */
- static QDateTime DVRTimeToDateTime(const NET_DVR_TIME_SEARCH &dvrTime);
- /* 设置开始时间 */
- void setStartTime(const NET_DVR_TIME_SEARCH &dvrTime);
- /* 设置结束时间 */
- void setEndTime(const NET_DVR_TIME_SEARCH &dvrTime);
- };
- #endif /* GLOBALINFO_H */
|