commit | author | age
|
97fc0a
|
1 |
/* |
L |
2 |
* Copyright (c) Meta Platforms, Inc. and affiliates. |
|
3 |
* All rights reserved. |
|
4 |
* |
|
5 |
* This source code is licensed under the license found in the |
|
6 |
* LICENSE file in the root directory of this source tree. |
|
7 |
*/ |
|
8 |
|
|
9 |
#import <Foundation/Foundation.h> |
|
10 |
#import <FBSDKCoreKit/FBSDKGraphRequest.h> |
|
11 |
#import <FBSDKCoreKit/FBSDKGraphRequestMetadata.h> |
|
12 |
|
|
13 |
NS_ASSUME_NONNULL_BEGIN |
|
14 |
|
|
15 |
/** |
|
16 |
The `FBSDKGraphRequestQueue` allows for several graph requests to be queued |
|
17 |
for later execution as a batch request. |
|
18 |
*/ |
|
19 |
NS_SWIFT_NAME(GraphRequestQueue) |
|
20 |
@interface FBSDKGraphRequestQueue : NSObject |
|
21 |
|
|
22 |
/** |
|
23 |
Gets the shared instance `FBSDKGraphRequestQueue` singleton |
|
24 |
*/ |
|
25 |
+ (instancetype)sharedInstance; |
|
26 |
|
|
27 |
+ (instancetype)new NS_UNAVAILABLE; |
|
28 |
- (instancetype)init NS_UNAVAILABLE; |
|
29 |
|
|
30 |
- (void)configureWithGraphRequestConnectionFactory:(id<FBSDKGraphRequestConnectionFactory>)graphRequestConnectionFactory |
|
31 |
NS_SWIFT_NAME(configure(graphRequestConnectionFactory:)); |
|
32 |
|
|
33 |
/** |
|
34 |
@method |
|
35 |
|
|
36 |
This method adds an <FBSDKGraphRequest> with its completion handler into the queue. |
|
37 |
|
|
38 |
@param request The request to be queued |
|
39 |
@param completion A handler to call back when the request is executed. |
|
40 |
*/ |
|
41 |
- (void)enqueueRequest:(id<FBSDKGraphRequest>)request |
|
42 |
completion:(FBSDKGraphRequestCompletion)completion; |
|
43 |
|
|
44 |
/** |
|
45 |
Internal method exposed to facilitate transition to Swift. |
|
46 |
API Subject to change or removal without warning. Do not use. |
|
47 |
|
|
48 |
@warning INTERNAL - DO NOT USE |
|
49 |
*/ |
|
50 |
- (void)enqueueRequests:(NSArray<FBSDKGraphRequestMetadata *> *)requests; |
|
51 |
|
|
52 |
/** |
|
53 |
Internal method exposed to facilitate transition to Swift. |
|
54 |
API Subject to change or removal without warning. Do not use. |
|
55 |
|
|
56 |
@warning INTERNAL - DO NOT USE |
|
57 |
*/ |
|
58 |
- (void)enqueueRequestMetadata:(FBSDKGraphRequestMetadata *)requestMetadata; |
|
59 |
|
|
60 |
/** |
|
61 |
@method |
|
62 |
|
|
63 |
This method flushes the queue. All requests currently in the queue will be |
|
64 |
executed in a single batch request. The queue is then emptied. |
|
65 |
*/ |
|
66 |
- (void)flush; |
|
67 |
|
|
68 |
@end |
|
69 |
|
|
70 |
NS_ASSUME_NONNULL_END |