netWorkManager.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. //
  2. // netWorkManager.h
  3. // 隐私保护
  4. //
  5. // Created by xd h on 2023/10/8.
  6. //
  7. #import <Foundation/Foundation.h>
  8. #import "connectDeviceManager.h"
  9. NS_ASSUME_NONNULL_BEGIN
  10. /**
  11. * 成功请求Block返回的字典
  12. */
  13. typedef void (^netWork_Success) (id responseObject);
  14. /**
  15. * 失败Block返回
  16. */
  17. typedef void (^netWork_Faild) (NSError *error);
  18. @interface netWorkManager : NSObject
  19. +(netWorkManager *)shareInstance;
  20. - (void)setAFHTTPSessionManagerFunBy:(NSInteger)tcpPort;
  21. #pragma mark afnetwork post 请求
  22. - (void)CommonPostCallBackCode:(NSString*)code Parameters:(NSDictionary*)dict success:(netWork_Success)success failure:(netWork_Faild)failure;
  23. #pragma mark afnetwork get 请求
  24. - (void)CommonGetWithCallBackCode:(NSString *)code Parameters:(NSDictionary *_Nullable)dic success:(netWork_Success)success failure:(netWork_Faild)faildStr;
  25. - (void)doUploadFileToFileServiceWithParams:(NSMutableDictionary *)params data:(NSData *)data success:(netWork_Success)success faild:(netWork_Faild)faildStr;
  26. #pragma mark afnetwork post 埋点请求
  27. //eventType 事件模块类型 0 一级模块=1 二级模块=2 三级模块=3
  28. //事件模块值 Scan_code
  29. - (void)DataEmbeddingPointBy:(int)eventType withEventValue:(NSString*)eventValue;
  30. #pragma mark afnetwork post 请求
  31. - (void)cloudPhonePostCallBackCode:(NSString*)code Parameters:(NSDictionary*)dict success:(netWork_Success)success failure:(netWork_Faild)failure;
  32. #pragma mark afnetwork get 请求
  33. - (void)cloudPhoneGETCallBackCode:(NSString*)code Parameters:(NSDictionary*)dict success:(netWork_Success)success failure:(netWork_Faild)failure;
  34. #pragma mark afnetwork get 请求 检测文件是否存在
  35. - (void)cloudPhoneCheckUrlCallBackCode:(NSString*)code success:(netWork_Success)success failure:(netWork_Faild)failure;
  36. #pragma mark afnetwork get 请求 音乐播放器下载音频缓存
  37. - (void)cloudPhoneDownloadAudioByCode:(NSString*)code withSavePath:(NSString*)savePath success:(netWork_Success)success failure:(netWork_Faild)failure;
  38. #pragma mark 根据SN 获取设备信息
  39. - (void)getThridMsgBySN:(NSString*)snStr success:(netWork_Success)success failure:(netWork_Faild)failure;
  40. -(void)RefreshThridMsg;
  41. #pragma mark 修改隐私模式密码
  42. -(void)updateCardInfoBySN:(NSString*)snStr withPwdStr:(NSString*)pwd didNetEnd:(netWork_DidEndByOK)didNetEndIsOK;
  43. @end
  44. NS_ASSUME_NONNULL_END