BUTNCServiceManager.h 923 B

123456789101112131415161718192021222324252627282930
  1. //
  2. // Created by bytedance on 2020/12/15.
  3. //
  4. #import <Foundation/Foundation.h>
  5. @class BUNetworkRequest,BUTNCRequestParam;
  6. @interface BUTNCServiceConfig : NSObject
  7. @property (nonatomic, copy, readonly) NSString *appKey;
  8. @property(nonatomic, copy, readonly) NSString *tncPath;
  9. @property(nonatomic, copy, readonly) NSArray<NSString *> *tncDomains;
  10. @property(nonatomic, copy, readonly) BUTNCRequestParam *(^tncRequestParam)(void);
  11. @end
  12. __attribute__((objc_subclassing_restricted))
  13. @interface BUTNCServiceManager : NSObject
  14. + (void)registerTNCServiceWithAppKey:(NSString *)appKey tncDomains:(NSArray<NSString *> *)tncDomains tncPath:(NSString *)tncPath requestParam:(BUTNCRequestParam * (^)(void))param;
  15. + (void)unregisterTNCServiceWithAppKey:(NSString *)appKey;
  16. + (NSString *)TNCUrlWithBaseUrl:(NSString *)baseUrl forRequest:(BUNetworkRequest *)request;
  17. + (void)refreshTNCDomainsWithAppKey:(NSString *)appKey;
  18. @end