Files
Swiftgram/MTProtoKit/MTRequest.h
Peter 15758a4272 Merge commit '1b32f70d51c1f841b9a6dba12df3dd814440b471'
* commit '1b32f70d51c1f841b9a6dba12df3dd814440b471':
  Ready state
  Add support for arm64
  no message
  no message

Conflicts:
	MTProtoKit/MTRequestMessageService.m
	MtProtoKit.xcodeproj/project.pbxproj
2015-04-14 21:37:00 +03:00

39 lines
1.5 KiB
Objective-C

/*
* This is the source code of Telegram for iOS v. 1.1
* It is licensed under GNU GPL v. 2 or later.
* You should have received a copy of the license in this archive (see LICENSE).
*
* Copyright Peter Iakovlev, 2013.
*/
@class MTRequestContext;
@class MTRequestErrorContext;
#import <MTProtoKit/MTRpcError.h>
@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 (^responseParser)(NSData *);
@property (nonatomic, strong) NSArray *decorators;
@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 responseParser:(id (^)(NSData *))responseParser;
@end