#import #import #import #import #import #import "ApiLayer48.h" #import "TGModernCache.h" #import "TGMemoryImageCache.h" #import "TGMemoryCache.h" #import "TGDatacenterConnectionContext.h" @interface TGShareContext : NSObject @property (nonatomic, strong, readonly) NSURL *containerUrl; @property (nonatomic, strong, readonly) MTContext *mtContext; @property (nonatomic, strong, readonly) MTProto *mtProto; @property (nonatomic, strong, readonly) MTRequestMessageService *mtRequestService; @property (nonatomic, strong, readonly) TGModernCache *persistentCache; @property (nonatomic, strong, readonly) TGMemoryImageCache *memoryImageCache; @property (nonatomic, strong, readonly) TGMemoryCache *memoryCache; @property (nonatomic, strong, readonly) SThreadPool *sharedThreadPool; - (instancetype)initWithContainerUrl:(NSURL *)containerUrl mtContext:(MTContext *)mtContext mtProto:(MTProto *)mtProto mtRequestService:(MTRequestMessageService *)mtRequestService; - (SSignal *)function:(Api48_FunctionContext *)functionContext; - (SSignal *)datacenter:(NSInteger)datacenterId function:(Api48_FunctionContext *)functionContext; - (SSignal *)connectionContextForDatacenter:(NSInteger)datacenterId; @end