diff options
author | 2018-02-20 17:33:57 -0500 | |
---|---|---|
committer | 2018-02-20 17:33:57 -0500 | |
commit | 14ea068f5fd03a658017f8472a4078a727fabc3a (patch) | |
tree | 56696c49546e2147ec1b8ebdeba24dd292f0c951 /Firestore/Source/Remote/FSTSerializerBeta.mm | |
parent | de00de25deebc35c4c7167135d5b1f29a7d9fe6f (diff) |
Make FSTTimestamp into a public Firestore class (#698)
- FSTTimestamp is now FIRTimestamp, under Firestore/Source/{Public,API}. This is a temporary solution; eventually, FIRTimestamp is supposed to live somewhere under Firebase;
- move most internal Timestamp methods to the public header (the only exception is ISOString).
Diffstat (limited to 'Firestore/Source/Remote/FSTSerializerBeta.mm')
-rw-r--r-- | Firestore/Source/Remote/FSTSerializerBeta.mm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Firestore/Source/Remote/FSTSerializerBeta.mm b/Firestore/Source/Remote/FSTSerializerBeta.mm index 35ab637..ceb0501 100644 --- a/Firestore/Source/Remote/FSTSerializerBeta.mm +++ b/Firestore/Source/Remote/FSTSerializerBeta.mm @@ -19,6 +19,7 @@ #include <inttypes.h> #import <GRPCClient/GRPCCall.h> +#import "FIRTimestamp.h" #import "Firestore/Protos/objc/google/firestore/v1beta1/Common.pbobjc.h" #import "Firestore/Protos/objc/google/firestore/v1beta1/Document.pbobjc.h" @@ -32,7 +33,6 @@ #import "FIRGeoPoint.h" #import "Firestore/Source/Core/FSTQuery.h" #import "Firestore/Source/Core/FSTSnapshotVersion.h" -#import "Firestore/Source/Core/FSTTimestamp.h" #import "Firestore/Source/Local/FSTQueryData.h" #import "Firestore/Source/Model/FSTDocument.h" #import "Firestore/Source/Model/FSTDocumentKey.h" @@ -69,15 +69,15 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark - FSTSnapshotVersion <=> GPBTimestamp -- (GPBTimestamp *)encodedTimestamp:(FSTTimestamp *)timestamp { +- (GPBTimestamp *)encodedTimestamp:(FIRTimestamp *)timestamp { GPBTimestamp *result = [GPBTimestamp message]; result.seconds = timestamp.seconds; - result.nanos = timestamp.nanos; + result.nanos = timestamp.nanoseconds; return result; } -- (FSTTimestamp *)decodedTimestamp:(GPBTimestamp *)timestamp { - return [[FSTTimestamp alloc] initWithSeconds:timestamp.seconds nanos:timestamp.nanos]; +- (FIRTimestamp *)decodedTimestamp:(GPBTimestamp *)timestamp { + return [[FIRTimestamp alloc] initWithSeconds:timestamp.seconds nanoseconds:timestamp.nanos]; } - (GPBTimestamp *)encodedVersion:(FSTSnapshotVersion *)version { @@ -287,7 +287,7 @@ NS_ASSUME_NONNULL_BEGIN return result; } -- (GCFSValue *)encodedTimestampValue:(FSTTimestamp *)value { +- (GCFSValue *)encodedTimestampValue:(FIRTimestamp *)value { GCFSValue *result = [GCFSValue message]; result.timestampValue = [self encodedTimestamp:value]; return result; |