aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firebase/Storage/Private
diff options
context:
space:
mode:
authorGravatar Sebastian Schmidt <mrschmidt@google.com>2018-04-09 14:21:00 -0700
committerGravatar Sebastian Schmidt <mrschmidt@google.com>2018-04-09 14:41:54 -0700
commit2dd40e3abba3d3a5a949aa4980f741ae412147ba (patch)
tree05628f8f8805fc22e5f54d0ed90a68c29680e1a6 /Firebase/Storage/Private
parent42bc113754d2f9e2f0f6cf552916ae76149e717d (diff)
Removing FirebaseStorage.downloadURL
Diffstat (limited to 'Firebase/Storage/Private')
-rw-r--r--Firebase/Storage/Private/FIRStorageConstants_Private.h1
-rw-r--r--Firebase/Storage/Private/FIRStorageErrors.h10
-rw-r--r--Firebase/Storage/Private/FIRStorageGetDownloadURLTask.h37
3 files changed, 46 insertions, 2 deletions
diff --git a/Firebase/Storage/Private/FIRStorageConstants_Private.h b/Firebase/Storage/Private/FIRStorageConstants_Private.h
index 498c687..cf12337 100644
--- a/Firebase/Storage/Private/FIRStorageConstants_Private.h
+++ b/Firebase/Storage/Private/FIRStorageConstants_Private.h
@@ -55,7 +55,6 @@ FOUNDATION_EXPORT NSString *const kFIRStorageMetadataContentLanguage;
FOUNDATION_EXPORT NSString *const kFIRStorageMetadataContentType;
FOUNDATION_EXPORT NSString *const kFIRStorageMetadataCustomMetadata;
FOUNDATION_EXPORT NSString *const kFIRStorageMetadataSize;
-FOUNDATION_EXPORT NSString *const kFIRStorageMetadataDownloadURLs;
FOUNDATION_EXPORT NSString *const kFIRStorageMetadataGeneration;
FOUNDATION_EXPORT NSString *const kFIRStorageMetadataMetageneration;
FOUNDATION_EXPORT NSString *const kFIRStorageMetadataTimeCreated;
diff --git a/Firebase/Storage/Private/FIRStorageErrors.h b/Firebase/Storage/Private/FIRStorageErrors.h
index 7c236d9..46e87d2 100644
--- a/Firebase/Storage/Private/FIRStorageErrors.h
+++ b/Firebase/Storage/Private/FIRStorageErrors.h
@@ -44,11 +44,19 @@ NS_ASSUME_NONNULL_BEGIN
* Creates a Firebase Storage error from a specific GCS error and FIRStorageReference.
* @param error Server error to wrap and return as a Firebase Storage error.
* @param reference FIRStorageReference which provides context about the request being made.
- * @return Returns an Firebase Storage error, or nil if no error is provided.
+ * @return Returns a Firebase Storage error, or nil if no error is provided.
*/
+ (nullable NSError *)errorWithServerError:(nullable NSError *)error
reference:(nullable FIRStorageReference *)reference;
+/**
+ * Creates a Firebase Storage error from an invalid request.
+ *
+ * @param request The NSData representation of the invalid user request.
+ * @return Returns the corresponding Firebase Storage error.
+ */
++ (NSError *)errorWithInvalidRequest:(NSData *)request;
+
@end
NS_ASSUME_NONNULL_END
diff --git a/Firebase/Storage/Private/FIRStorageGetDownloadURLTask.h b/Firebase/Storage/Private/FIRStorageGetDownloadURLTask.h
new file mode 100644
index 0000000..c349f30
--- /dev/null
+++ b/Firebase/Storage/Private/FIRStorageGetDownloadURLTask.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2018 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#import "FIRStorageTask.h"
+
+@class GTMSessionFetcherService;
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ * Task which provides the ability to get a download URL for an object in Firebase Storage.
+ */
+@interface FIRStorageGetDownloadURLTask : FIRStorageTask <FIRStorageTaskManagement>
+
+- (instancetype)initWithReference:(FIRStorageReference *)reference
+ fetcherService:(GTMSessionFetcherService *)service
+ completion:(FIRStorageVoidURLError)completion;
+
+// Visible for testing.
++ (NSURL *)downloadURLFromMetadataDictionary:(NSDictionary *)dictionary;
+
+@end
+
+NS_ASSUME_NONNULL_END