summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLOfflineStorage.h
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2018-11-07 23:48:15 -0800
committerMinh Nguyễn <mxn@1ec5.org>2018-11-07 23:54:09 -0800
commit6d9f13ec28da8dacac33577b4e830e83f87a55c0 (patch)
tree4f159dd474bde9a841b62e4fd4f55c53d4e04acf /platform/darwin/src/MGLOfflineStorage.h
parentdaccbaffbc902f4a9d69975ce06e76b9d8a62dde (diff)
downloadqtlocation-mapboxgl-6d9f13ec28da8dacac33577b4e830e83f87a55c0.tar.gz
[ios, macos] Renamed ambient cache prewarming methodupstream/1ec5-offline-put-rename
Renamed the method for prewarming the ambient cache to conform to Cocoa and Swift naming conventions.
Diffstat (limited to 'platform/darwin/src/MGLOfflineStorage.h')
-rw-r--r--platform/darwin/src/MGLOfflineStorage.h37
1 files changed, 20 insertions, 17 deletions
diff --git a/platform/darwin/src/MGLOfflineStorage.h b/platform/darwin/src/MGLOfflineStorage.h
index 415df84646..387045f845 100644
--- a/platform/darwin/src/MGLOfflineStorage.h
+++ b/platform/darwin/src/MGLOfflineStorage.h
@@ -340,25 +340,28 @@ MGL_EXPORT
@property (nonatomic, readonly) unsigned long long countOfBytesCompleted;
/*
- * Insert the provided resource into the ambient cache
- * This method mimics the caching that would take place if the equivalent
- * resource were requested in the process of map rendering.
- * Use this method to pre-warm the cache with resources you know
- * will be requested.
- *
- * This call is asynchronous: the data may not be immediately available
- * for in-progress requests, although subsequent requests should have
- * access to the cached data.
- *
- * @param url The URL of the resource to insert
- * @param data Response data to store for this resource. Data is expected to be uncompressed; internally, the cache will compress data as necessary.
- * @param modified Optional "modified" response header
- * @param expires Optional "expires" response header
- * @param etag Optional "entity tag" response header
- * @param mustRevalidate Indicates whether response can be used after it's stale
+ Inserts the provided resource into the ambient cache.
+
+ This method mimics the caching that would take place if the equivalent resource
+ were requested in the process of map rendering. Use this method to pre-warm the
+ cache with resources you know will be requested.
+
+ This method is asynchronous; the data may not be immediately available for
+ in-progress requests, though subsequent requests should have access to the
+ cached data.
+
+ @param data Response data to store for this resource. The data is expected to
+ be uncompressed; internally, the cache will compress data as necessary.
+ @param url The URL at which the data can normally be found.
+ @param modified The date the resource was last modified.
+ @param expires The date after which the resource is no longer valid.
+ @param eTag An HTTP entity tag.
+ @param mustRevalidate A Boolean value indicating whether the data is still
+ usable past the expiration date.
*/
--(void)putResourceWithUrl:(NSURL *)url data:(NSData *)data modified:(NSDate * _Nullable)modified expires:(NSDate * _Nullable)expires etag:(NSString * _Nullable)etag mustRevalidate:(BOOL)mustRevalidate;
+- (void)preloadData:(NSData *)data forURL:(NSURL *)url modificationDate:(nullable NSDate *)modified expirationDate:(nullable NSDate *)expires eTag:(nullable NSString *)eTag mustRevalidate:(BOOL)mustRevalidate NS_SWIFT_NAME(preload(_:for:modifiedOn:expiresOn:eTag:mustRevalidate:));
+- (void)putResourceWithUrl:(NSURL *)url data:(NSData *)data modified:(nullable NSDate *)modified expires:(nullable NSDate *)expires etag:(nullable NSString *)etag mustRevalidate:(BOOL)mustRevalidate __attribute__((deprecated("Use -preloadData:forURL:modificationDate:expirationDate:eTag:mustRevalidate:.")));
@end