ArcGIS Runtime SDK for iOS: AGSJob.h Source File
ArcGIS Runtime SDK for iOS  100.9
AGSJob.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/AGSObject.h>
22 #import <ArcGIS/AGSRemoteResource.h>
23 #import <ArcGIS/AGSJSONSerializable.h>
24 
25 
26 
31 typedef NS_ENUM(NSInteger, AGSJobType) {
39 };
40 
45 typedef NS_ENUM(NSInteger, AGSJobStatus) {
51 };
52 
53 @class AGSJobMessage;
54 
55 @protocol AGSCancelable;
56 
65 @interface AGSJob : AGSObject <AGSRemoteResource, AGSJSONSerializable, NSProgressReporting>
66 
67 #pragma mark -
68 #pragma mark initializers
69 
70 
71 
72 #pragma mark -
73 #pragma mark properties
74 
78 @property (nullable, nonatomic, strong, readonly) NSError *error;
79 
83 @property (nonatomic, assign, readonly) AGSJobType jobType;
84 
88 @property (nonatomic, copy, readonly) NSArray<AGSJobMessage*> *messages;
89 
93 @property (nonatomic, copy, readonly) NSString *serverJobID;
94 
98 @property (nonatomic, assign, readonly) AGSJobStatus status;
99 
103 @property (nullable, nonatomic, strong, readonly) id result;
104 
111 @property (nonatomic, strong, readonly) NSProgress *progress;
112 
113 #pragma mark -
114 #pragma mark methods
115 
116 -(void)startWithStatusHandler:(nullable void(^)(AGSJobStatus status))statusHandler
117  completion:(void(^)(id __nullable result, NSError * __nullable error))completion;
118 
124 -(BOOL)pause ;
125 
131 -(BOOL)cancel ;
132 
133 /*
134  Force status check. This method can be called from `application:performFetchWithCompletionHandler:`.
135  */
136 -(id<AGSCancelable>)checkStatusWithCompletion:(void(^)(NSError * __nullable error))completion;
137 
138 @end
139 
140 
Definition: AGSJob.h:35
Definition: AGSJob.h:33
Definition: AGSJob.h:48
Definition: AGSJob.h:50
NSString * serverJobID
Definition: AGSJob.h:93
AGSJobType jobType
Definition: AGSJob.h:83
Definition: AGSJob.h:37
Informational message about the execution of a job.
Definition: AGSJobMessage.h:51
NSProgress * progress
Definition: AGSJob.h:111
Definition: AGSJob.h:36
Definition: AGSJob.h:38
AGSJobStatus
Definition: AGSJob.h:45
Definition: AGSJob.h:46
Definition: AGSObject.h:21
A protocol to convert objects to and from JSON.
Definition: AGSJSONSerializable.h:32
AGSJobStatus status
Definition: AGSJob.h:98
BOOL cancel()
Definition: AGSJob.h:32
AGSJobType
Definition: AGSJob.h:31
A long running job on a remote server.
Definition: AGSJob.h:65
Definition: AGSJob.h:47
A protocol adopted by classes that access remote network resources that have the potential to be secu...
Definition: AGSRemoteResource.h:34
NSError * error
Definition: AGSJob.h:78
Definition: AGSJob.h:49
id result
Definition: AGSJob.h:103
BOOL pause()
A protocol exposed by operations that allow cancellation.
Definition: AGSCancelable.h:32
Definition: AGSJob.h:34
NSArray< AGSJobMessage * > * messages
Definition: AGSJob.h:88