123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- //
- // connectDeviceManager.h
- // 隐私保护
- //
- // Created by xd h on 2023/10/9.
- //
- #import <Foundation/Foundation.h>
- #import "DeviceThirdIdModel.h"
- NS_ASSUME_NONNULL_BEGIN
- //#define ruiyunlinkIp @"172.17.0.2"
- //#define ruiyunlinkIp @"172.17.0.1"
- #define ruiyunlinkIp @"127.0.0.1"
- typedef enum{
- DeviceConnectUnknown = -1,
- DeviceConnectGetThridMsging = 0,
- DeviceConnectGetThridOK,
- DeviceConnectGetThridFail,
- DeviceConnectDeciceing,
- DeviceConnectDeciceOk,
- }connectDeviceState;
- /**
- *
- */
- typedef void (^netWork_DidEndByOK) (NSInteger didSuc); // 0 fail 1 suc -1 处理 2数据错误
- @interface connectDeviceManager : NSObject
- +(connectDeviceManager *)shareInstance;
- /**自定义字段 是否为局域网*/
- @property (nonatomic,assign) bool isPingOk; //
- @property(nonatomic,strong) DeviceThirdIdModel *DeviceThirdIdMod;//设备的第三方信息 连接时需要
- @property(nonatomic,assign) connectDeviceState curConnectDeviceState;
- //是否完成了第一次密码输入
- @property(nonatomic,assign) BOOL isFirstInputPwdDone;
- //重新初始化
- @property(nonatomic,assign) BOOL isReInitType;
- @property(nonatomic,copy) NSString* tcpPortStr;
- #pragma mark 根据扫码的sn获取第三方信息 是否需要重连
- -(void)getThridMsgBySN:(NSString*)snStr needReconnect:(BOOL)needReconnect didNetEnd:(netWork_DidEndByOK)didNetEndIsOK;
- #pragma mark 刷新扫码的sn获取第三方信息 是否需要重连
- -(void)RefreshThridMsg;
- #pragma mark 保持卡密码
- -(void)updateCardInfoBySN:(NSString*)snStr withPwdStr:(NSString*)pwd didNetEnd:(netWork_DidEndByOK)didNetEndIsOK;
- - (void)tryReconnectFun;
- //音视频 链接返回-5的时候调用
- - (void)recreateHttpServiceFun;
- //链接
- - (void)onConnectFun;
- //断开链接
- - (void)disconnect;
- @end
- NS_ASSUME_NONNULL_END
|