diff options
author | zxu <zxu@google.com> | 2018-03-27 14:33:39 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-27 14:33:39 -0400 |
commit | cb8c4b6b1f1ad213a5b3272e2c2e94f755bbabf9 (patch) | |
tree | eb3eeddefb5fca423f59432933721d6d47100aa5 /Firestore/Source/API/FSTUserDataConverter.h | |
parent | a335d78a62c213b1ae6465bad28aaedfafd828bc (diff) |
port C++ DocumentKey to the rest of Firestore code (#977)
* port C++ DocumentKey to API's and Core's
* address changes
* address changes
* fix Hash return types
Diffstat (limited to 'Firestore/Source/API/FSTUserDataConverter.h')
-rw-r--r-- | Firestore/Source/API/FSTUserDataConverter.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Firestore/Source/API/FSTUserDataConverter.h b/Firestore/Source/API/FSTUserDataConverter.h index 1058848..3b178be 100644 --- a/Firestore/Source/API/FSTUserDataConverter.h +++ b/Firestore/Source/API/FSTUserDataConverter.h @@ -17,9 +17,9 @@ #import <Foundation/Foundation.h> #include "Firestore/core/src/firebase/firestore/model/database_id.h" +#include "Firestore/core/src/firebase/firestore/model/document_key.h" @class FIRSetOptions; -@class FSTDocumentKey; @class FSTObjectValue; @class FSTFieldMask; @class FSTFieldValue; @@ -48,7 +48,7 @@ NS_ASSUME_NONNULL_BEGIN * Converts the parsed document data into 1 or 2 mutations (depending on whether there are any * field transforms) using the specified document key and precondition. */ -- (NSArray<FSTMutation *> *)mutationsWithKey:(FSTDocumentKey *)key +- (NSArray<FSTMutation *> *)mutationsWithKey:(const firebase::firestore::model::DocumentKey &)key precondition:(FSTPrecondition *)precondition; @end @@ -71,7 +71,7 @@ NS_ASSUME_NONNULL_BEGIN * Converts the parsed update data into 1 or 2 mutations (depending on whether there are any * field transforms) using the specified document key and precondition. */ -- (NSArray<FSTMutation *> *)mutationsWithKey:(FSTDocumentKey *)key +- (NSArray<FSTMutation *> *)mutationsWithKey:(const firebase::firestore::model::DocumentKey &)key precondition:(FSTPrecondition *)precondition; @end @@ -81,17 +81,18 @@ NS_ASSUME_NONNULL_BEGIN * This is necessary because keys assume a database from context (usually the current one). * FSTDocumentKeyReference binds a key to a specific databaseID. * - * TODO(b/64160088): Make FSTDocumentKey aware of the specific databaseID it is tied to. + * TODO(b/64160088): Make DocumentKey aware of the specific databaseID it is tied to. */ @interface FSTDocumentKeyReference : NSObject - (instancetype)init NS_UNAVAILABLE; -- (instancetype)initWithKey:(FSTDocumentKey *)key +- (instancetype)initWithKey:(firebase::firestore::model::DocumentKey)key databaseID:(const firebase::firestore::model::DatabaseId *)databaseID NS_DESIGNATED_INITIALIZER; -@property(nonatomic, strong, readonly) FSTDocumentKey *key; +- (const firebase::firestore::model::DocumentKey &)key; + // Does not own the DatabaseId instance. @property(nonatomic, assign, readonly) const firebase::firestore::model::DatabaseId *databaseID; |