mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-04 10:30:42 +00:00

git-subtree-dir: submodules/MtProtoKit git-subtree-mainline: 3b155750f5a4894ff3dedf1860a37e94e0ea9571 git-subtree-split: 14ab734b977fd4f1686a2a13415f6a4c9b9fdd6d
36 lines
1.4 KiB
Objective-C
36 lines
1.4 KiB
Objective-C
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
@class MTRequestContext;
|
|
@class MTRequestErrorContext;
|
|
@class MTRpcError;
|
|
|
|
@interface MTRequest : NSObject
|
|
|
|
@property (nonatomic, strong, readonly) id internalId;
|
|
|
|
@property (nonatomic, strong, readonly) NSData *payload;
|
|
@property (nonatomic, strong, readonly) id metadata;
|
|
@property (nonatomic, strong, readonly) id shortMetadata;
|
|
@property (nonatomic, strong, readonly) id (^responseParser)(NSData *);
|
|
|
|
@property (nonatomic, strong) NSArray *decorators;
|
|
@property (nonatomic) int32_t transactionResetStateVersion;
|
|
@property (nonatomic, strong) MTRequestContext *requestContext;
|
|
@property (nonatomic, strong) MTRequestErrorContext *errorContext;
|
|
@property (nonatomic) bool hasHighPriority;
|
|
@property (nonatomic) bool dependsOnPasswordEntry;
|
|
@property (nonatomic) bool passthroughPasswordEntryError;
|
|
|
|
@property (nonatomic, copy) void (^completed)(id result, NSTimeInterval completionTimestamp, MTRpcError *error);
|
|
@property (nonatomic, copy) void (^progressUpdated)(float progress, NSUInteger packetLength);
|
|
@property (nonatomic, copy) void (^acknowledgementReceived)();
|
|
|
|
@property (nonatomic, copy) bool (^shouldContinueExecutionWithErrorContext)(MTRequestErrorContext *errorContext);
|
|
@property (nonatomic, copy) bool (^shouldDependOnRequest)(MTRequest *anotherRequest);
|
|
|
|
- (void)setPayload:(NSData *)payload metadata:(id)metadata shortMetadata:(id)shortMetadata responseParser:(id (^)(NSData *))responseParser;
|
|
|
|
@end
|