BUTNCServiceManager.h 935 B

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