16
16
17
17
#import < Foundation/Foundation.h>
18
18
19
+ #include < memory>
19
20
#include < vector>
20
21
21
22
#import " Firestore/Source/Core/FSTTypes.h"
22
23
24
+ #include " Firestore/core/src/firebase/firestore//remote/watch_stream.h"
25
+ #include " Firestore/core/src/firebase/firestore//remote/write_stream.h"
23
26
#include " Firestore/core/src/firebase/firestore/auth/credentials_provider.h"
24
27
#include " Firestore/core/src/firebase/firestore/core/database_info.h"
25
28
#include " Firestore/core/src/firebase/firestore/model/database_id.h"
26
29
#include " Firestore/core/src/firebase/firestore/model/document_key.h"
30
+ #include " Firestore/core/src/firebase/firestore/remote/datastore.h"
31
+ #include " absl/memory/memory.h"
27
32
#include " absl/strings/string_view.h"
28
33
29
34
@class FSTDispatchQueue;
32
37
@class FSTQueryData;
33
38
@class FSTSerializerBeta;
34
39
@class FSTWatchChange;
35
- @class FSTWatchStream;
36
- @class FSTWriteStream;
37
- @class GRPCCall;
38
40
@class GRXWriter;
39
41
40
42
NS_ASSUME_NONNULL_BEGIN
@@ -67,12 +69,7 @@ NS_ASSUME_NONNULL_BEGIN
67
69
credentials // no passing ownership
68
70
NS_DESIGNATED_INITIALIZER;
69
71
70
- /* *
71
- * Takes a dictionary of (HTTP) response headers and returns the set of whitelisted headers
72
- * (for logging purposes).
73
- */
74
- + (NSDictionary <NSString *, NSString *> *)extractWhiteListedHeaders :
75
- (NSDictionary <NSString *, NSString *> *)header ;
72
+ - (void )shutdown ;
76
73
77
74
/* * Converts the error to a FIRFirestoreErrorDomain error. */
78
75
+ (NSError *)firestoreErrorForError : (NSError *)error ;
@@ -83,11 +80,6 @@ NS_ASSUME_NONNULL_BEGIN
83
80
/* * Returns YES if the given error indicates the RPC associated with it may not be retried. */
84
81
+ (BOOL )isPermanentWriteError : (NSError *)error ;
85
82
86
- /* * Adds headers to the RPC including any OAuth access token if provided .*/
87
- + (void )prepareHeadersForRPC : (GRPCCall *)rpc
88
- databaseID : (const firebase::firestore::model::DatabaseId *)databaseID
89
- token : (const absl::string_view)token ;
90
-
91
83
/* * Looks up a list of documents in datastore. */
92
84
- (void )lookupDocuments : (const std::vector<firebase::firestore::model::DocumentKey> &)keys
93
85
completion : (FSTVoidMaybeDocumentArrayErrorBlock)completion ;
@@ -97,10 +89,12 @@ NS_ASSUME_NONNULL_BEGIN
97
89
completion : (FSTVoidErrorBlock)completion ;
98
90
99
91
/* * Creates a new watch stream. */
100
- - (FSTWatchStream *)createWatchStream ;
92
+ - (std::shared_ptr<firebase::firestore::remote::WatchStream>)createWatchStreamWithDelegate :
93
+ (id <FSTWatchStreamDelegate>)delegate ;
101
94
102
95
/* * Creates a new write stream. */
103
- - (FSTWriteStream *)createWriteStream ;
96
+ - (std::shared_ptr<firebase::firestore::remote::WriteStream>)createWriteStreamWithDelegate :
97
+ (id <FSTWriteStreamDelegate>)delegate ;
104
98
105
99
/* * The name of the database and the backend. */
106
100
// Does not own this DatabaseInfo.
0 commit comments