ArcGIS Runtime SDK for iOS: AGSLoadable.h Source File
ArcGIS Runtime SDK for iOS  100.15
AGSLoadable.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/AGSDefines.h>
29 
30 
31 
35 typedef NS_ENUM(NSInteger, AGSLoadStatus) {
41 } ;
42 
50 
58 
61 
72 @protocol AGSLoadable
73 
74 @required
75 
90 -(void)loadWithCompletion:(nullable void(^)(NSError * __nullable error))completion;
91 
109 -(void)retryLoadWithCompletion:(nullable void(^)(NSError * __nullable error))completion;
110 
118 -(void)cancelLoad;
119 
120 // kvo enabled properties
125 @property (nonatomic, assign, readonly) AGSLoadStatus loadStatus;
126 
131 @property (nullable, nonatomic, strong, readonly) NSError *loadError;
132 
133 @end
134 
135 #pragma mark loadObjects declaration
136 
141 typedef void (^ags_load_objects_block_t)(BOOL finishedWithNoErrors);
142 
149 AGS_EXTERN void AGSLoadObjects(NSArray<id<AGSLoadable>> *array, _Nullable ags_load_objects_block_t completion);
150 
151 
#define AGS_EXTERN
Definition: AGSDefines.h:28
AGS_EXTERN NSNotificationName AGSLoadableDidLoadNotification
Definition: AGSLoadable.h:59
AGSLoadStatus
Definition: AGSLoadable.h:35
@ AGSLoadStatusLoading
Definition: AGSLoadable.h:37
@ AGSLoadStatusUnknown
Definition: AGSLoadable.h:40
@ AGSLoadStatusLoaded
Definition: AGSLoadable.h:36
@ AGSLoadStatusFailedToLoad
Definition: AGSLoadable.h:38
@ AGSLoadStatusNotLoaded
Definition: AGSLoadable.h:39
AGS_EXTERN void AGSLoadObjects(NSArray< id< AGSLoadable >> *array, _Nullable ags_load_objects_block_t completion)
AGS_EXTERN NSNotificationName AGSLoadableDidFailToLoadNotification
Definition: AGSLoadable.h:60
AGS_EXTERN NSString * AGSLoadStatusAsString(AGSLoadStatus loadStatus)
AGS_EXTERN AGSLoadStatus AGSLoadStatusFromString(NSString *loadStatus)
void(^ ags_load_objects_block_t)(BOOL finishedWithNoErrors)
Definition: AGSLoadable.h:141
A protocol adopted by classes that can load data asynchronously.
Definition: AGSLoadable.h:72
AGSLoadStatus loadStatus
Definition: AGSLoadable.h:125
NSError * loadError
Definition: AGSLoadable.h:131