netWorkManager.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. - (void)cloudPhonePostCallBackCode:(NSString*)code Parameters:(NSDictionary*)dict success:(netWork_Success)success failure:(netWork_Faild)failure;
  28. #pragma mark afnetwork get 请求
  29. - (void)cloudPhoneGETCallBackCode:(NSString*)code Parameters:(NSDictionary*)dict success:(netWork_Success)success failure:(netWork_Faild)failure;
  30. #pragma mark afnetwork get 请求 检测文件是否存在
  31. - (void)cloudPhoneCheckUrlCallBackCode:(NSString*)code success:(netWork_Success)success failure:(netWork_Faild)failure;
  32. @end
  33. NS_ASSUME_NONNULL_END