1
0
mirror of https://github.com/danog/Telegram.git synced 2024-12-02 09:27:55 +01:00
Telegram/Share/TGShareContext.h
2015-10-01 19:19:52 +03:00

37 lines
1.3 KiB
Objective-C

#import <Foundation/Foundation.h>
#import <MTProtoKit/MTContext.h>
#import <MTProtoKit/MTProto.h>
#import <MTProtoKit/MTRequestMessageService.h>
#import <SSignalKit/SSignalKit.h>
#import "ApiLayer38.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:(Api38_FunctionContext *)functionContext;
- (SSignal *)datacenter:(NSInteger)datacenterId function:(Api38_FunctionContext *)functionContext;
- (SSignal *)connectionContextForDatacenter:(NSInteger)datacenterId;
@end