forked from overtake/telegram
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ASActor.h
44 lines (30 loc) · 1.27 KB
/
ASActor.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
* 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.
*/
#import <Foundation/Foundation.h>
#import "ASHandle.h"
@interface ASActor : NSObject
+ (void)registerRequestBuilder:(Class)requestBuilderClass;
+ (void)registerActorClass:(Class)requestBuilderClass;
+ (ASActor *)requestBuilderForGenericPath:(NSString *)genericPath path:(NSString *)path;
+ (NSString *)genericPath;
@property (nonatomic, strong) NSString *path;
@property (nonatomic, strong) NSString *requestQueueName;
@property (nonatomic, strong) NSDictionary *storedOptions;
@property (nonatomic) bool requiresAuthorization;
@property (nonatomic) NSTimeInterval cancelTimeout;
@property (nonatomic, strong) id cancelToken;
@property (nonatomic, strong) NSMutableArray *multipleCancelTokens;
@property (nonatomic) bool cancelled;
- (id)initWithPath:(NSString *)path;
- (void)prepare:(NSDictionary *)options;
- (void)execute:(NSDictionary *)options;
- (void)cancel;
- (void)addCancelToken:(id)token;
- (void)watcherJoined:(ASHandle *)watcherHandle options:(NSDictionary *)options waitingInActorQueue:(bool)waitingInActorQueue;
- (void)handleRequestProblem;
@end