commit | author | age
|
a0a843
|
1 |
// |
H |
2 |
// TWTRAPIServiceConfigRegistry.h |
|
3 |
// TwitterCore |
|
4 |
// |
|
5 |
// Created by Chase Latta on 8/18/15. |
|
6 |
// Copyright (c) 2015 Twitter Inc. All rights reserved. |
|
7 |
// |
|
8 |
|
|
9 |
#import <Foundation/Foundation.h> |
|
10 |
#import "TWTRAPIServiceConfig.h" |
|
11 |
|
|
12 |
NS_ASSUME_NONNULL_BEGIN |
|
13 |
|
|
14 |
typedef NS_ENUM(NSInteger, TWTRAPIServiceConfigType) { TWTRAPIServiceConfigTypeDefault, TWTRAPIServiceConfigTypeCards, TWTRAPIServiceConfigTypeUpload }; |
|
15 |
|
|
16 |
@interface TWTRAPIServiceConfigRegistry : NSObject |
|
17 |
|
|
18 |
/** |
|
19 |
* Returns the default registry instance. |
|
20 |
*/ |
|
21 |
+ (instancetype)defaultRegistry; |
|
22 |
|
|
23 |
/** |
|
24 |
* Registers a service config with the receiver. |
|
25 |
* |
|
26 |
* @param config the config object to register. |
|
27 |
* @param type the type of config object to register. |
|
28 |
*/ |
|
29 |
- (void)registerServiceConfig:(id<TWTRAPIServiceConfig>)config forType:(TWTRAPIServiceConfigType)type; |
|
30 |
|
|
31 |
/** |
|
32 |
* Returns a config object that has been registered for the given type or nil if nothing has been registered. |
|
33 |
*/ |
|
34 |
- (nullable id<TWTRAPIServiceConfig>)configForType:(TWTRAPIServiceConfigType)type; |
|
35 |
|
|
36 |
@end |
|
37 |
|
|
38 |
NS_ASSUME_NONNULL_END |