ArcGIS Runtime SDK for iOS: AGSRequestOperation.h Source File
ArcGIS Runtime SDK for iOS  100.9
AGSRequestOperation.h
Go to the documentation of this file.
1 /*
2  COPYRIGHT 1995-2020 ESRI
3 
4  TRADE SECRETS: ESRI PROPRIETARY AND CONFIDENTIAL
5  Unpublished material - all rights reserved under the
6  Copyright Laws of the United States and applicable international
7  laws, treaties, and conventions.
8 
9  For additional information, contact:
10  Environmental Systems Research Institute, Inc.
11  Attn: Contracts and Legal Services Department
12  380 New York Street
13  Redlands, California, 92373
14  USA
15 
16  email: contracts@esri.com
17  */
18  //Required for Globals API doc
20 
21 #import <ArcGIS/AGSObservableOperation.h>
22 #import <ArcGIS/AGSCancelable.h>
23 
24 
25 
30 typedef NS_ENUM(NSInteger, AGSRequestHTTPMethod) {
34 };
35 
36 @class AGSCredential;
38 @protocol AGSRemoteResource;
39 @protocol AGSLoadable;
40 
60 @interface AGSRequestOperation : AGSObservableOperation <AGSCancelable, NSProgressReporting>
61 
62 #pragma mark -
63 #pragma mark initializers
64 
65 
66 
74 - (instancetype)initWithRemoteResource:(nullable id<AGSRemoteResource>)remoteResource
75  request:(NSURLRequest *)request NS_DESIGNATED_INITIALIZER;
76 
82 - (instancetype)initWithURL:(NSURL *)url;
83 
93 -(instancetype)initWithRemoteResource:(nullable id<AGSRemoteResource>)remoteResource
94  URL:(NSURL *)URL
95  queryParameters:(nullable NSDictionary<NSString*,id> *)queryParameters;
96 
107 -(instancetype)initWithRemoteResource:(nullable id<AGSRemoteResource>)remoteResource
108  URL:(NSURL*)URL
109  queryParameters:(nullable NSDictionary<NSString*,id> *)queryParameters
110  method:(AGSRequestHTTPMethod)method NS_DESIGNATED_INITIALIZER;
111 #pragma mark -
112 #pragma mark properties
113 
117 @property (nonatomic, strong, readonly) NSURL *URL;
118 
122 @property (nullable, copy, readonly) NSDictionary<NSString*,id> *queryParameters;
123 
128 @property (nonatomic, assign, readwrite) AGSRequestHTTPMethod method;
129 
133 @property (nullable, nonatomic, strong, readonly) NSURLRequest *request;
134 
138 @property (nullable, nonatomic, strong, readwrite) AGSCredential *credential;
139 
144 @property (nonatomic, strong, readwrite) AGSRequestConfiguration *requestConfiguration;
145 
149 @property (nullable, nonatomic, weak, readonly) id<AGSRemoteResource> remoteResource;
150 
154 @property (nullable, nonatomic, weak, readwrite) id<AGSLoadable> loadDependency;
155 
159 @property (nullable, nonatomic, strong, readonly) NSURLResponse *response;
160 
165 @property (nullable, nonatomic, strong, readwrite) NSURL *outputFileURL;
166 
170 @property (nullable, nonatomic, copy, readwrite) NSString *sessionID;
171 
175 @property (nonatomic, assign, readonly) long long totalBytesDownloaded;
176 
180 @property (nonatomic, assign, readonly) long long totalBytesExpected;
181 
186 @property (nullable, nonatomic, copy, readwrite) void(^progressHandler)(long long totalBytesDownloaded, long long totalBytesExpected);
187 
196 @property (nonatomic, assign, readwrite) BOOL cancelSessionWhenOperationIsCanceled;
197 
204 @property (nonatomic, strong, readonly) NSProgress *progress;
205 
206 #pragma mark -
207 #pragma mark methods
208 
215 -(BOOL)pause ;
216 
221 -(BOOL)isPaused ;
222 
227 -(void)resume ;
228 
229 @end
230 
231 
Definition: AGSRequestOperation.h:31
NSProgress * progress
Definition: AGSRequestOperation.h:204
Base class for operations. This adds the ability to register a listener to the AGSOperationBase. It also adds the concept of an error and a result.
Definition: AGSObservableOperation.h:26
void(^ progressHandler)(long long totalBytesDownloaded, long long totalBytesExpected)
AGSRequestHTTPMethod
Definition: AGSRequestOperation.h:30
long long totalBytesDownloaded
Definition: AGSRequestOperation.h:175
long long totalBytesExpected
Definition: AGSRequestOperation.h:180
NSDictionary< NSString *, id > * queryParameters
Definition: AGSRequestOperation.h:122
AGSCredential * credential
Definition: AGSRequestOperation.h:138
NSURL * URL
Definition: AGSElevationServiceInfo.h:67
id< AGSLoadable > loadDependency
Definition: AGSRequestOperation.h:154
A protocol adopted by classes that can load data asynchronously.
Definition: AGSLoadable.h:66
Base class for operations that perform http requests.
Definition: AGSRequestOperation.h:60
AGSRequestConfiguration * requestConfiguration
Definition: AGSRequestOperation.h:144
NSURLRequest * request
Definition: AGSRequestOperation.h:133
Networking related configuration of resources.
Definition: AGSRequestConfiguration.h:36
Definition: AGSRequestOperation.h:32
AGSRequestHTTPMethod method
Definition: AGSRequestOperation.h:128
Represents an credential to access a secured resource.
Definition: AGSCredential.h:46
NSString * sessionID
Definition: AGSRequestOperation.h:170
NSURLResponse * response
Definition: AGSRequestOperation.h:159
BOOL cancelSessionWhenOperationIsCanceled
Definition: AGSRequestOperation.h:196
A protocol adopted by classes that access remote network resources that have the potential to be secu...
Definition: AGSRemoteResource.h:34
NSURL * outputFileURL
Definition: AGSRequestOperation.h:165
Definition: AGSRequestOperation.h:33
A protocol exposed by operations that allow cancellation.
Definition: AGSCancelable.h:32