isup_sdk.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #ifndef ISUP_SDK_H
  2. #define ISUP_SDK_H
  3. #include "common.h"
  4. #include <stdint.h>
  5. /*
  6. * Real Hikvision ISUP(Ehome) SDK prototypes. Wrapped behind ISUP_SIM so the
  7. * project compiles & self-tests on Raspberry Pi 5 WITHOUT the proprietary
  8. * .so, then links against libHCNetSDK / ISUP libs when the real SDK is
  9. * dropped into libs/. Keeping every NET_E* declaration in ONE header
  10. * prevents the v1.0 "implicit declaration under -Werror" build break.
  11. */
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. typedef void* LPVOID; typedef char* LPSTR; typedef const char* LPCSTR;
  16. typedef int BOOL; typedef uint32_t DWORD; typedef uint64_t UINT64;
  17. typedef int64_t LONGLONG; typedef uint32_t LONG; typedef uint16_t WORD; typedef uint8_t BYTE;
  18. typedef struct tagNET_EHOME_CMS_LISTEN_PARAM{
  19. BYTE byProtocolVersion; WORD wTCPPort; WORD wUDPPort; BYTE byEncryptMode; BYTE byRes[100];
  20. char szAddress[64]; int iAddressPort; char szUserName[32]; char szPassword[32];
  21. LPVOID pUser; LPVOID CB_RegExpCB; /* registration callback */
  22. }NET_EHOME_CMS_LISTEN_PARAM;
  23. typedef struct tagNET_EHOME_STREAM_PARAM{
  24. int lChannel; DWORD dwSize; BYTE byProtype; BYTE byUseEhomeServer; BYTE byRes1;
  25. BYTE byRes[100]; char byStreamInfo[256]; LPVOID pUser; LPVOID CB_StreamData;
  26. }NET_EHOME_STREAM_PARAM;
  27. typedef struct tagNET_EHOME_PLAYBACK_LISTEN_PARAM{
  28. BYTE byProtocolVersion; char szIPAddr[64]; uint16_t wTCPPort; uint16_t wUDPPort;
  29. BYTE byRes[100]; LPVOID pUser; LPVOID CB_PlayBackStart;
  30. }NET_EHOME_PLAYBACK_LISTEN_PARAM;
  31. typedef struct tagNET_EHOME_PLAYBACKINFO{
  32. char szFileName[256]; int iChannel; LONGLONG nBeginTime; LONGLONG nEndTime;
  33. DWORD dwFileSize; BYTE byRes[64]; LPVOID pUser; LPVOID CB_PlayBackData;
  34. }NET_EHOME_PLAYBACKINFO;
  35. typedef struct tagNET_EHOME_ALARM_LISTEN_PARAM{
  36. BYTE byProtocolVersion; char szIPAddr[64]; uint16_t wTCPPort; uint16_t wUDPPort;
  37. BYTE byAlarmType[16]; BYTE byRes[82]; LPVOID pUser; LPVOID CB_AlarmMsg;
  38. }NET_EHOME_ALARM_LISTEN_PARAM;
  39. typedef struct tagNET_EHOME_ALARMINFO{
  40. int iSerialNo; int iCommand; DWORD dwAlarmType; LPVOID lpAlarmInfo; BYTE byRes[128];
  41. }NET_EHOME_ALARMINFO;
  42. /* ---- ISUP5.0 core entry points (names match vendor headers) ---- */
  43. int NET_ECMS_Init(void);
  44. int NET_ECMS_Fini(void);
  45. void* NET_ECMS_StartListen(NET_EHOME_CMS_LISTEN_PARAM*p);
  46. int NET_ECMS_StopListen(void*handle);
  47. int NET_ECMS_SetSDKLocalCfg(int cmd, LPVOID inbuffer);
  48. void* NET_ESTREAM_StartListenStream(NET_EHOME_STREAM_PARAM*p);
  49. int NET_ESTREAM_StopListenStream(void*handle);
  50. void* NET_ESTREAM_StartListenPlayBack(NET_EHOME_PLAYBACK_LISTEN_PARAM*p);
  51. int NET_ESTREAM_StopListenPlayBack(void*handle);
  52. void* NET_ECMS_StartPlayBack(void*cmsHandle, const char*ip,uint16_t tcp,uint16_t udp,int ch,
  53. LONGLONG begin,LONGLONG end,LPVOID pUser,LPVOID cb);
  54. int NET_ECMS_StopPlayBack(void*playbackHandle);
  55. int NET_ECMS_ForceLogout(void*handle);
  56. void* NET_EALARM_StartListen(NET_EHOME_ALARM_LISTEN_PARAM*p);
  57. int NET_EALARM_StopListen(void*handle);
  58. int NET_EALARM_WriteAlarmMsg(void*handle);
  59. const char* NET_ECMS_GetLastError(void);
  60. #ifdef __cplusplus
  61. }
  62. #endif
  63. #endif