派生自 development/c++

miyanhui
2019-02-13 dccc8c41c31866785fdaf5cba40354cdc7afbd8f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef HCRECORD_H_XZL_201808081648
#define HCRECORD_H_XZL_201808081648
 
#include "HCNetSDK.h"
#include <QDateTime>
#include <string>
#include <vector>
 
class HcRecord {
public:
    HcRecord() : m_lUserID(-1) {}
 
    ~HcRecord() {}
 
    int init(const char *ip, unsigned short port, const char *usrname, const char *passwd);
 
    int unInit();
 
    int downloadfiles(const std::string &strDevID, const int nChannel, const LPNET_DVR_TIME,
                      const LPNET_DVR_TIME, std::string &);
 
    int saveRecordFile(int userId, char *srcfile, char *destfile);
 
    std::vector<int> getUsefulChans() const;
 
    std::string getSerialNumber() const;
 
private:
    void UsefulChans();
 
    std::string makeDirs(const std::string &strDevID, const int nChannel, const LPNET_DVR_TIME pStartTime,
                         const LPNET_DVR_TIME pEndTime);
 
    std::string makeDir(const std::string &strType, const std::string &strDevID, const int nChannel,
                        const LPNET_DVR_TIME pStartTime,
                        const LPNET_DVR_TIME pEndTime);
 
    std::string toString(const int src);
 
    int Downloadfile(const std::string &, const int nChannel, const LPNET_DVR_TIME, const LPNET_DVR_TIME,
                     std::string &);
 
    int
    RecursiveByTimeDownloadfiles(const std::string &, const int nChannel, QDateTime, QDateTime, std::string &);
 
private:
    LONG m_lUserID;
    std::vector<int> m_vecUsefulChans;
    std::string devSerialNumber;
};
 
#endif