| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- #ifndef ISUP_SDK_H
- #define ISUP_SDK_H
- /**
- * @file isup_sdk.h
- * @brief 海康 HCNetSDK ISUP 接口统一声明
- *
- * [FIX] 原代码仅在 platform.c 里 extern 声明这些 NET_E* 函数,
- * 而 stream.c / alarm.c / playback.c 也调用它们, 导致 GCC-14 下
- * "implicit declaration of function" 硬错误。集中到头文件供所有
- * 翻译单元包含即可修复。
- *
- * 真实 SDK: 链接 libhcnetsdk.so 等, 由厂商头文件提供实现。
- * 无 SDK : 未定义 HAVE_HCNETSDK 时, 在 platform.c 编译内置 Mock。
- */
- #include "common.h"
- #ifdef __cplusplus
- extern "C" {
- #endif
- /* ---------------- CMS(注册服务器)接口 ---------------- */
- int NET_ECMS_Init(void);
- void NET_ECMS_Clean(void);
- int NET_ECMS_StartListen(char* pszListenIP, short sListenPort, void* pUser);
- void NET_ECMS_StopListen(void);
- int NET_ECMS_Login(char* pszDVRIP, short sDVRPort, char* szUserName, char* szPassword, void* pUser);
- int NET_ECMS_Logout(int iUserID);
- int NET_ECMS_SetAutoReconnect(int iUserID, int bAutoReconnect, int iInterval);
- int NET_ECMS_SendHeartBeat(int iUserID);
- /* ---------------- STREAM(流媒体)接口 ---------------- */
- int NET_ESTREAM_Init(void);
- void NET_ESTREAM_Clean(void);
- int NET_ESTREAM_StartListenPlayBack(char* pszListenIP, short sListenPort, void* pCallback, void* pUser);
- void NET_ESTREAM_StopListenPlayBack(void);
- int NET_ESTREAM_SetPlayBackDataCB(int iStreamHandle, void* pCallback, void* pUser);
- /* ---------------- 回放(CMS 侧)接口 ---------------- */
- int NET_ECMS_StartPlayBack(int iUserID, char* pszDevIP, short sDevPort, char* pszPlayBackIP, short sPlayBackPort, int iChannel);
- int NET_ECMS_StopPlayBack(int iUserID);
- /* ---------------- ALARM(报警)接口 ---------------- */
- int NET_EALARM_Init(void);
- void NET_EALARM_Clean(void);
- int NET_EALARM_StartListen(char* pszListenIP, short sListenPort, void* pAlarmCallback, void* pUser);
- void NET_EALARM_StopListen(void);
- #ifdef __cplusplus
- }
- #endif
- #endif /* ISUP_SDK_H */
|