diff options
author | Sebastian Schmidt <mrschmidt@google.com> | 2017-09-06 14:37:04 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-06 14:37:04 -0700 |
commit | e8e0916c2ae24ec14130b1dc00f9574d78940462 (patch) | |
tree | 92554ccf9e084f62546b85ad035e71c005a3d67a /Firebase/Storage/Private | |
parent | 96685dfbb9936ec9b875491ccad9891231afd7ba (diff) |
Firebase Storage: Allowing metadata to be cleared (#197)
* Allowing metadata to be cleared
Diffstat (limited to 'Firebase/Storage/Private')
-rw-r--r-- | Firebase/Storage/Private/FIRStorageMetadata_Private.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Firebase/Storage/Private/FIRStorageMetadata_Private.h b/Firebase/Storage/Private/FIRStorageMetadata_Private.h index 629c935..ad8cc94 100644 --- a/Firebase/Storage/Private/FIRStorageMetadata_Private.h +++ b/Firebase/Storage/Private/FIRStorageMetadata_Private.h @@ -15,6 +15,7 @@ */ #import "FIRStorageConstants_Private.h" +#import "FIRStorageMetadata.h" @class FIRStorageReference; @@ -34,6 +35,25 @@ NS_ASSUME_NONNULL_BEGIN @property(readwrite) FIRStorageMetadataType type; /** + * The original metadata representation received from the server or an empty dictionary + * if the metadata object was initialized by the user. + */ +@property(copy, nonatomic) NSDictionary *initialMetadata; + +/** + * Recursively removes entries in 'metadata' that are unmodified from 'oldMetadata'. + * Adds 'NSNull' for entries that only exist in oldMetadata. + */ ++ (void)removeMatchingMetadata:(NSMutableDictionary *)metadata + oldMetadata:(NSDictionary *)oldMetadata; + +/** + * Computes the updates between the state at initialization and the current state. + * Returns a dictionary with only the updated data. Removed keys are set to NSNull. + */ +- (NSDictionary *)updatedMetadata; + +/** * Returns an RFC3339 formatted date from a string. * @param dateString An NSString of the form: yyyy-MM-ddTHH:mm:ss.SSSZ. * @return An NSDate populated from the string or nil if conversion isn't possible. |