| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- #ifndef ISUP_SDK_H
- #define ISUP_SDK_H
- #include "common.h"
- #include <stdint.h>
- /*
- * Real Hikvision ISUP(Ehome) SDK prototypes. Wrapped behind ISUP_SIM so the
- * project compiles & self-tests on Raspberry Pi 5 WITHOUT the proprietary
- * .so, then links against libHCNetSDK / ISUP libs when the real SDK is
- * dropped into libs/. Keeping every NET_E* declaration in ONE header
- * prevents the v1.0 "implicit declaration under -Werror" build break.
- */
- #ifdef __cplusplus
- extern "C" {
- #endif
- typedef void* LPVOID; typedef char* LPSTR; typedef const char* LPCSTR;
- typedef int BOOL; typedef uint32_t DWORD; typedef uint64_t UINT64;
- typedef int64_t LONGLONG; typedef uint32_t LONG; typedef uint16_t WORD; typedef uint8_t BYTE;
- typedef struct tagNET_EHOME_CMS_LISTEN_PARAM{
- BYTE byProtocolVersion; WORD wTCPPort; WORD wUDPPort; BYTE byEncryptMode; BYTE byRes[100];
- char szAddress[64]; int iAddressPort; char szUserName[32]; char szPassword[32];
- LPVOID pUser; LPVOID CB_RegExpCB; /* registration callback */
- }NET_EHOME_CMS_LISTEN_PARAM;
- typedef struct tagNET_EHOME_STREAM_PARAM{
- int lChannel; DWORD dwSize; BYTE byProtype; BYTE byUseEhomeServer; BYTE byRes1;
- BYTE byRes[100]; char byStreamInfo[256]; LPVOID pUser; LPVOID CB_StreamData;
- }NET_EHOME_STREAM_PARAM;
- typedef struct tagNET_EHOME_PLAYBACK_LISTEN_PARAM{
- BYTE byProtocolVersion; char szIPAddr[64]; uint16_t wTCPPort; uint16_t wUDPPort;
- BYTE byRes[100]; LPVOID pUser; LPVOID CB_PlayBackStart;
- }NET_EHOME_PLAYBACK_LISTEN_PARAM;
- typedef struct tagNET_EHOME_PLAYBACKINFO{
- char szFileName[256]; int iChannel; LONGLONG nBeginTime; LONGLONG nEndTime;
- DWORD dwFileSize; BYTE byRes[64]; LPVOID pUser; LPVOID CB_PlayBackData;
- }NET_EHOME_PLAYBACKINFO;
- typedef struct tagNET_EHOME_ALARM_LISTEN_PARAM{
- BYTE byProtocolVersion; char szIPAddr[64]; uint16_t wTCPPort; uint16_t wUDPPort;
- BYTE byAlarmType[16]; BYTE byRes[82]; LPVOID pUser; LPVOID CB_AlarmMsg;
- }NET_EHOME_ALARM_LISTEN_PARAM;
- typedef struct tagNET_EHOME_ALARMINFO{
- int iSerialNo; int iCommand; DWORD dwAlarmType; LPVOID lpAlarmInfo; BYTE byRes[128];
- }NET_EHOME_ALARMINFO;
- /* ---- ISUP5.0 core entry points (names match vendor headers) ---- */
- int NET_ECMS_Init(void);
- int NET_ECMS_Fini(void);
- void* NET_ECMS_StartListen(NET_EHOME_CMS_LISTEN_PARAM*p);
- int NET_ECMS_StopListen(void*handle);
- int NET_ECMS_SetSDKLocalCfg(int cmd, LPVOID inbuffer);
- void* NET_ESTREAM_StartListenStream(NET_EHOME_STREAM_PARAM*p);
- int NET_ESTREAM_StopListenStream(void*handle);
- void* NET_ESTREAM_StartListenPlayBack(NET_EHOME_PLAYBACK_LISTEN_PARAM*p);
- int NET_ESTREAM_StopListenPlayBack(void*handle);
- void* NET_ECMS_StartPlayBack(void*cmsHandle, const char*ip,uint16_t tcp,uint16_t udp,int ch,
- LONGLONG begin,LONGLONG end,LPVOID pUser,LPVOID cb);
- int NET_ECMS_StopPlayBack(void*playbackHandle);
- int NET_ECMS_ForceLogout(void*handle);
- void* NET_EALARM_StartListen(NET_EHOME_ALARM_LISTEN_PARAM*p);
- int NET_EALARM_StopListen(void*handle);
- int NET_EALARM_WriteAlarmMsg(void*handle);
- const char* NET_ECMS_GetLastError(void);
- #ifdef __cplusplus
- }
- #endif
- #endif
|