mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
38 lines
1.0 KiB
Objective-C
38 lines
1.0 KiB
Objective-C
|
|
|
|
#import <MtProtoKit/MTMessageService.h>
|
|
|
|
@class MTContext;
|
|
@class MTRequest;
|
|
@class MTApiEnvironment;
|
|
|
|
@class MTRequestMessageService;
|
|
|
|
@protocol MTRequestMessageServiceDelegate <NSObject>
|
|
|
|
@optional
|
|
|
|
- (void)requestMessageServiceAuthorizationRequired:(MTRequestMessageService *)requestMessageService;
|
|
- (void)requestMessageServiceDidCompleteAllRequests:(MTRequestMessageService *)requestMessageService;
|
|
|
|
@end
|
|
|
|
@interface MTRequestMessageService : NSObject <MTMessageService>
|
|
|
|
@property (nonatomic, weak) id<MTRequestMessageServiceDelegate> delegate;
|
|
|
|
@property (nonatomic, strong) MTApiEnvironment *apiEnvironment;
|
|
@property (nonatomic) bool forceBackgroundRequests;
|
|
|
|
@property (nonatomic, copy) void (^didReceiveSoftAuthResetError)(void);
|
|
|
|
- (instancetype)initWithContext:(MTContext *)context;
|
|
|
|
- (void)addRequest:(MTRequest *)request;
|
|
- (void)removeRequestByInternalId:(id)internalId;
|
|
- (void)removeRequestByInternalId:(id)internalId askForReconnectionOnDrop:(bool)askForReconnectionOnDrop;
|
|
|
|
- (void)requestCount:(void (^)(NSUInteger requestCount))completion;
|
|
|
|
@end
|