-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdvr.h
42 lines (29 loc) · 872 Bytes
/
dvr.h
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
#pragma once
#include "HCNetSDK.h"
#include <string>
#include <ctime>
namespace ASI
{
class NET_SDK
{
public:
NET_SDK();
~NET_SDK();
};
class NET_DVR
{
public:
NET_DVR(const char *ip, const WORD port, const std::string & username, const std::string & password);
const NET_DVR_DEVICEINFO_V40 & getDeviceInfo() const;
void info() const;
void capturePicture(const LONG channel, const std::string & filename) const;
void downloadFiles(const LONG channel, const std::tm & start, const std::tm & end, const std::string & filename) const;
void liveStream(const LONG channel, const int seconds, const std::string & filename) const;
~NET_DVR();
private:
[[ noreturn ]] void error(const char * msg) const;
void debug(const char * msg) const;
LONG myUserID;
NET_DVR_DEVICEINFO_V40 myDeviceInfo;
};
}