1
0
mirror of https://github.com/danog/Telegram.git synced 2024-12-02 09:27:55 +01:00
Telegram/Share/TGDatacenterConnectionContext.h
2016-02-25 01:03:51 +01:00

28 lines
1.1 KiB
Objective-C

#import <Foundation/Foundation.h>
#import <MTProtoKit/MTContext.h>
#import <MTProtoKit/MTProto.h>
#import <MTProtoKit/MTRequestMessageService.h>
#import <SSignalKit/SSignalKit.h>
#import "ApiLayer48.h"
@interface TGDatacenterConnectionContext : NSObject
@property (nonatomic, strong, readonly) MTContext *mtContext;
@property (nonatomic, strong, readonly) MTProto *mtProto;
@property (nonatomic, strong, readonly) MTRequestMessageService *mtRequestService;
- (instancetype)initWithMtContext:(MTContext *)mtContext mtProto:(MTProto *)mtProto mtRequestService:(MTRequestMessageService *)mtRequestService;
- (SSignal *)function:(Api48_FunctionContext *)functionContext;
@end
@interface TGPooledDatacenterConnectionContext : NSObject
@property (nonatomic, strong, readonly) TGDatacenterConnectionContext *context;
@property (nonatomic, copy, readonly) void (^returnContext)(TGDatacenterConnectionContext *);
- (instancetype)initWithDatacenterConnectionContext:(TGDatacenterConnectionContext *)context returnContext:(void (^)(TGDatacenterConnectionContext *))returnContext;
@end