NetSDK  1.0.0.0
NetSDK开发文档
xvrsdk.h
1 #ifndef __IPC_SDK_H__
2 #define __IPC_SDK_H__
3 
4 #ifdef __cplusplus
5 extern "C"
6 {
7 #endif
8 
9 //---------------------------------------------------------------------------
10 // 错误号定义
11 //---------------------------------------------------------------------------
12 #define XVR_SDK_ERROR_NONE (0)
13 #define XVR_SDK_ERROR_NOINIT (-1)
14 #define XVR_SDK_ERROR_NOIMPLEMENT (-2)
15 #define XVR_SDK_ERROR_NOCONNECT (-3)
16 #define XVR_SDK_ERROR_NOLOGIN (-4)
17 #define XVR_SDK_ERROR_USERPASS (-5)
18 #define XVR_SDK_ERROR_VERSION (-6)
19 #define XVR_SDK_ERROR_RESOLVE (-7)
20 #define XVR_SDK_ERROR_SOCKET (-8)
21 #define XVR_SDK_ERROR_CONNECT (-9)
22 #define XVR_SDK_ERROR_TIMEDOUT (-10)
23 #define XVR_SDK_ERROR_RECV (-11)
24 #define XVR_SDK_ERROR_SEND (-12)
25 #define XVR_SDK_ERROR_MSGTOOBIG (-13)
26 #define XVR_SDK_ERROR_OOM (-14)
27 #define XVR_SDK_ERROR_PROTOCOL (-15)
28 #define XVR_SDK_ERROR_SYNC (-16)
29 #define XVR_SDK_ERROR_INVOPER (-17)
30 #define XVR_SDK_ERROR_REGISTER (-18)
31 #define XVR_SDK_ERROR_FAILED (-255)
32 
33 
37 {
38  time_t timestamp;
39  int timezone;
40 };
41 
45 typedef struct XSHANDLE XSHANDLE;
46 
50 typedef enum XVR_SDK_CONFIG_TYPE
51 {
52  XVR_SDK_CFG_SEND_TIMEOUT,
53  XVR_SDK_CFG_RECV_TIMEOUT,
54 } XVR_SDK_CONFIG_TYPE;
55 
60 typedef enum XVR_SDK_DEVICE_CONFIG_TYPE
61 {
62  XVR_SDK_DEVCFG_TIME,
63  XVR_SDK_DEVCFG_RTMP,
64 } XVR_SDK_DEVICE_CONFIG_TYPE;
65 
66 
72 int XVR_SDK_Init(void);
73 
79 int XVR_SDK_Cleanup(void);
80 
86 int XVR_SDK_Create(XSHANDLE **handle);
87 
93 int XVR_SDK_Destroy(XSHANDLE *handle);
94 
102 int XVR_SDK_Connect(XSHANDLE *handle, const char *address, const char *port);
103 
111 int XVR_SDK_Login(XSHANDLE *handle, const char *username, const char *password);
112 
119 int XVR_SDK_Process(XSHANDLE *handle, int timeout);
120 
129 int XVR_SDK_GetDeviceConfig(XSHANDLE *handle, XVR_SDK_DEVICE_CONFIG_TYPE cfg, char *buffer, int size);
130 
139 int XVR_SDK_SetDeviceConfig(XSHANDLE *handle, XVR_SDK_DEVICE_CONFIG_TYPE cfg, const char *data, int length);
140 
152 int XVR_SDK_FaceRegisterByImg(XSHANDLE *h, const char *person_id, const char *person_name, const char *img_data, int img_len, const char *extra, int exlen);
153 
161 int XVR_SDK_FaceUnregister(XSHANDLE *h, const char person_ids[][32], int person_cnt);
162 
170 int XVR_SDK_Control_Gateway(XSHANDLE *h, int gateway_index, int control_type);
171 
172 #ifdef __cplusplus
173 };
174 #endif
175 
176 #endif // __IPC_SDK_H__
time_t timestamp
时间戳
Definition: xvrsdk.h:38
设备时间配置
Definition: xvrsdk.h:36
int timezone
时区(秒)
Definition: xvrsdk.h:39