Swiftgram/submodules/MtProtoKit/MTProtoKit/MTRequestMessageService.h
Peter 373769682e Add 'submodules/MtProtoKit/' from commit '14ab734b977fd4f1686a2a13415f6a4c9b9fdd6d'
git-subtree-dir: submodules/MtProtoKit
git-subtree-mainline: 3b155750f5a4894ff3dedf1860a37e94e0ea9571
git-subtree-split: 14ab734b977fd4f1686a2a13415f6a4c9b9fdd6d
2019-06-11 18:55:34 +01:00

44 lines
1.2 KiB
Objective-C

#if defined(MtProtoKitDynamicFramework)
# import <MTProtoKitDynamic/MTMessageService.h>
#elif defined(MtProtoKitMacFramework)
# import <MTProtoKitMac/MTMessageService.h>
#else
# import <MtProtoKit/MTMessageService.h>
#endif
@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