|
| 1 | +// |
| 2 | +// Copyright (c) 2016 Anchorfree Inc. All rights reserved. |
| 3 | +// |
| 4 | + |
| 5 | +#import <Foundation/Foundation.h> |
| 6 | +#import "AFConfigBuilder.h" |
| 7 | + |
| 8 | +@class AFCredentials; |
| 9 | +@class AFConfigBuilder; |
| 10 | +@class AFConfig; |
| 11 | +@class AFProvidedCredentials; |
| 12 | +@class AFOnDemandRules; |
| 13 | + |
| 14 | +NS_ASSUME_NONNULL_BEGIN |
| 15 | +typedef void (^AFConfigBlock)(AFConfigBuilder *); |
| 16 | +typedef void (^AFConfigUpdateBlock)(AFConfig *, AFConfigBuilder *); |
| 17 | + |
| 18 | +@interface AFConfig : NSObject |
| 19 | +@property (nonatomic) BOOL debugLogging; |
| 20 | +@property (nonatomic) BOOL onDemand; |
| 21 | +@property (nonatomic) BOOL advancedOnDemand; |
| 22 | +@property (nullable, nonatomic) AFOnDemandRules *onDemandRules; |
| 23 | +@property (strong, nonatomic, nonnull) NSString *baseUrl; |
| 24 | +@property (strong, nonatomic, nonnull) NSString *carrierId; |
| 25 | +@property (strong, nonatomic, nonnull) NSString *networkExtensionBundleId; |
| 26 | +@property (strong, nonatomic, nonnull) NSString *groupId; |
| 27 | +@property (strong, nonatomic, nullable) NSString *blacklistPath; |
| 28 | +@property (strong, nonatomic, nullable) NSString *whitelistPath; |
| 29 | +@property (strong, nonatomic, nullable) NSArray <NSString *> *bypassDomains; |
| 30 | +@property (strong, nonatomic, nullable) NSString *dnsAddr; |
| 31 | +@property (nonatomic) BOOL bypass; |
| 32 | + |
| 33 | +- (instancetype)initWithBuilder:(AFConfigBuilder *)builder; |
| 34 | + |
| 35 | +- (void)updateWithCredentials:(AFProvidedCredentials *)credentials; |
| 36 | + |
| 37 | +- (NSString *)shareFile:(NSString *)fullPath; |
| 38 | + |
| 39 | ++ (instancetype)configWithBlock:(AFConfigBlock)block; |
| 40 | +@end |
| 41 | +NS_ASSUME_NONNULL_END |
0 commit comments