ArcGIS Runtime SDK for iOS: AGSJob.h Source File
ArcGIS Runtime SDK for iOS  100.15
AGSJob.h
Go to the documentation of this file.
1 /*
2  COPYRIGHT 2022 ESRI
3 
4  All rights reserved under the copyright laws of the United States
5  and applicable international laws, treaties, and conventions.
6 
7  This material is licensed for use under the Esri Master License
8  Agreement (MLA), and is bound by the terms of that agreement.
9  You may redistribute and use this code without modification,
10  provided you adhere to the terms of the MLA and include this
11  copyright notice.
12 
13  See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english
14 
15  For additional information, contact:
16  Environmental Systems Research Institute, Inc.
17  Attn: Contracts and Legal Services Department
18  380 New York Street
19  Redlands, California, 92373
20  USA
21 
22  email: contracts@esri.com
23  */
24  //Required for Globals API doc
26 
27 #import <Foundation/Foundation.h>
28 #import <ArcGIS/AGSObject.h>
29 #import <ArcGIS/AGSRemoteResource.h>
30 #import <ArcGIS/AGSJSONSerializable.h>
31 #import <ArcGIS/AGSCancelable.h>
32 
33 
34 
39 typedef NS_ENUM(NSInteger, AGSJobType) {
48 };
49 
54 typedef NS_ENUM(NSInteger, AGSJobStatus) {
61 };
62 
63 @class AGSJobMessage;
64 
75 @interface AGSJob : AGSObject <AGSRemoteResource, AGSJSONSerializable, NSProgressReporting>
76 
77 #pragma mark -
78 #pragma mark initializers
79 
80 
81 
82 #pragma mark -
83 #pragma mark properties
84 
88 @property (nullable, nonatomic, strong, readonly) NSError *error;
89 
93 @property (nonatomic, assign, readonly) AGSJobType jobType;
94 
100 @property (nonatomic, copy, readonly) NSArray<AGSJobMessage*> *messages;
101 
105 @property (nonatomic, copy, readonly) NSString *serverJobID;
106 
112 @property (nonatomic, assign, readonly) AGSJobStatus status;
113 
117 @property (nullable, nonatomic, strong, readonly) id result;
118 
125 @property (nonatomic, strong, readonly) NSProgress *progress;
126 
127 #pragma mark -
128 #pragma mark methods
129 
130 -(void)startWithStatusHandler:(nullable void(^)(AGSJobStatus status))statusHandler
131  completion:(void(^)(id __nullable result, NSError * __nullable error))completion;
132 
155 - (id<AGSCancelable>)cancelWithCompletion:(void(^)(NSError * _Nullable error))completion;
156 
161 -(id<AGSCancelable>)checkStatusWithCompletion:(void(^)(NSError * __nullable error))completion;
162 
163 @end
164 
165 #pragma mark -
166 #pragma mark Deprecated
167 
169 
175 -(BOOL)pause ;
176 
182 -(BOOL)cancel ;
183 
184 @end
185 
186 
AGSJobStatus
Definition: AGSJob.h:54
@ AGSJobStatusFailed
Definition: AGSJob.h:59
@ AGSJobStatusNotStarted
Definition: AGSJob.h:55
@ AGSJobStatusPaused
Definition: AGSJob.h:57
@ AGSJobStatusCanceling
Definition: AGSJob.h:60
@ AGSJobStatusStarted
Definition: AGSJob.h:56
@ AGSJobStatusSucceeded
Definition: AGSJob.h:58
AGSJobType
Definition: AGSJob.h:39
@ AGSJobTypeExportTileCache
Definition: AGSJob.h:42
@ AGSJobTypeOfflineMapSync
Definition: AGSJob.h:46
@ AGSJobTypeDownloadPreplannedOfflineMapJob
Definition: AGSJob.h:47
@ AGSJobTypeGenerateGeodatabase
Definition: AGSJob.h:40
@ AGSJobTypeGeoprocessingJob
Definition: AGSJob.h:44
@ AGSJobTypeEstimateTileCacheSize
Definition: AGSJob.h:43
@ AGSJobTypeSyncGeodatabase
Definition: AGSJob.h:41
@ AGSJobTypeGenerateOfflineMap
Definition: AGSJob.h:45
Definition: AGSJob.h:168
A long running job on a remote server.
Definition: AGSJob.h:75
id result
Definition: AGSJob.h:117
AGSJobType jobType
Definition: AGSJob.h:93
NSProgress * progress
Definition: AGSJob.h:125
AGSJobStatus status
Definition: AGSJob.h:112
NSError * error
Definition: AGSJob.h:88
NSArray< AGSJobMessage * > * messages
Definition: AGSJob.h:100
NSString * serverJobID
Definition: AGSJob.h:105
Informational message about the execution of a job.
Definition: AGSJobMessage.h:59
Definition: AGSObject.h:28
A protocol exposed by operations that allow cancellation.
Definition: AGSCancelable.h:38
A protocol to convert objects to and from JSON.
Definition: AGSJSONSerializable.h:38
A protocol adopted by classes that access remote network resources that have the potential to be secu...
Definition: AGSRemoteResource.h:40