isup_sdk.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #ifndef ISUP_SDK_H
  2. #define ISUP_SDK_H
  3. /**
  4. * @file isup_sdk.h
  5. * @brief 海康 HCNetSDK ISUP 接口统一声明
  6. *
  7. * [FIX] 原代码仅在 platform.c 里 extern 声明这些 NET_E* 函数,
  8. * 而 stream.c / alarm.c / playback.c 也调用它们, 导致 GCC-14 下
  9. * "implicit declaration of function" 硬错误。集中到头文件供所有
  10. * 翻译单元包含即可修复。
  11. *
  12. * 真实 SDK: 链接 libhcnetsdk.so 等, 由厂商头文件提供实现。
  13. * 无 SDK : 未定义 HAVE_HCNETSDK 时, 在 platform.c 编译内置 Mock。
  14. */
  15. #include "common.h"
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. /* ---------------- CMS(注册服务器)接口 ---------------- */
  20. int NET_ECMS_Init(void);
  21. void NET_ECMS_Clean(void);
  22. int NET_ECMS_StartListen(char* pszListenIP, short sListenPort, void* pUser);
  23. void NET_ECMS_StopListen(void);
  24. int NET_ECMS_Login(char* pszDVRIP, short sDVRPort, char* szUserName, char* szPassword, void* pUser);
  25. int NET_ECMS_Logout(int iUserID);
  26. int NET_ECMS_SetAutoReconnect(int iUserID, int bAutoReconnect, int iInterval);
  27. int NET_ECMS_SendHeartBeat(int iUserID);
  28. /* ---------------- STREAM(流媒体)接口 ---------------- */
  29. int NET_ESTREAM_Init(void);
  30. void NET_ESTREAM_Clean(void);
  31. int NET_ESTREAM_StartListenPlayBack(char* pszListenIP, short sListenPort, void* pCallback, void* pUser);
  32. void NET_ESTREAM_StopListenPlayBack(void);
  33. int NET_ESTREAM_SetPlayBackDataCB(int iStreamHandle, void* pCallback, void* pUser);
  34. /* ---------------- 回放(CMS 侧)接口 ---------------- */
  35. int NET_ECMS_StartPlayBack(int iUserID, char* pszDevIP, short sDevPort, char* pszPlayBackIP, short sPlayBackPort, int iChannel);
  36. int NET_ECMS_StopPlayBack(int iUserID);
  37. /* ---------------- ALARM(报警)接口 ---------------- */
  38. int NET_EALARM_Init(void);
  39. void NET_EALARM_Clean(void);
  40. int NET_EALARM_StartListen(char* pszListenIP, short sListenPort, void* pAlarmCallback, void* pUser);
  41. void NET_EALARM_StopListen(void);
  42. #ifdef __cplusplus
  43. }
  44. #endif
  45. #endif /* ISUP_SDK_H */