ArcGIS Runtime SDK for iOS: AGSLoadable.h Source File
ArcGIS Runtime SDK for iOS  100.8
AGSLoadable.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 <Foundation/Foundation.h>
22 #import <ArcGIS/AGSDefines.h>
23 
24 
25 
29 typedef NS_ENUM(NSInteger, AGSLoadStatus) {
35 } ;
36 
44 
51 AGS_EXTERN NSString *AGSLoadStatusAsString(AGSLoadStatus loadStatus);
52 
55 
66 @protocol AGSLoadable
67 
68 @required
69 
84 -(void)loadWithCompletion:(nullable void(^)(NSError * __nullable error))completion;
85 
103 -(void)retryLoadWithCompletion:(nullable void(^)(NSError * __nullable error))completion;
104 
112 -(void)cancelLoad;
113 
114 // kvo enabled properties
119 @property (nonatomic, assign, readonly) AGSLoadStatus loadStatus;
120 
125 @property (nullable, nonatomic, strong, readonly) NSError *loadError;
126 
127 @end
128 
129 #pragma mark loadObjects declaration
130 
135 typedef void (^ags_load_objects_block_t)(BOOL finishedWithNoErrors);
136 
143 AGS_EXTERN void AGSLoadObjects(NSArray<id<AGSLoadable>> *array, _Nullable ags_load_objects_block_t completion);
144 
145 
AGS_EXTERN NSString * AGSLoadStatusAsString(AGSLoadStatus loadStatus)
Definition: AGSLoadable.h:31
void(^ ags_load_objects_block_t)(BOOL finishedWithNoErrors)
Definition: AGSLoadable.h:135
Definition: AGSLoadable.h:30
Definition: AGSLoadable.h:33
AGS_EXTERN AGSLoadStatus AGSLoadStatusFromString(NSString *loadStatus)
Definition: AGSLoadable.h:34
NSError * loadError
Definition: AGSLoadable.h:125
A protocol adopted by classes that can load data asynchronously.
Definition: AGSLoadable.h:66
AGSLoadStatus
Definition: AGSLoadable.h:29
AGS_EXTERN void AGSLoadObjects(NSArray< id< AGSLoadable >> *array, _Nullable ags_load_objects_block_t completion)
AGS_EXTERN NSNotificationName AGSLoadableDidFailToLoadNotification
Definition: AGSLoadable.h:54
#define AGS_EXTERN
Definition: AGSDefines.h:22
AGS_EXTERN NSNotificationName AGSLoadableDidLoadNotification
Definition: AGSLoadable.h:53
AGSLoadStatus loadStatus
Definition: AGSLoadable.h:119
Definition: AGSLoadable.h:32