File tree Expand file tree Collapse file tree 14 files changed +252
-0
lines changed Expand file tree Collapse file tree 14 files changed +252
-0
lines changed Original file line number Diff line number Diff line change @@ -227,6 +227,10 @@ void Firestore::SetClientLanguage(std::string language_token) {
227
227
GrpcConnection::SetClientLanguage (std::move (language_token));
228
228
}
229
229
230
+ PipelineSource Firestore::pipeline () {
231
+ return {shared_from_this ()};
232
+ }
233
+
230
234
std::unique_ptr<ListenerRegistration> Firestore::AddSnapshotsInSyncListener (
231
235
std::unique_ptr<core::EventListener<Empty>> listener) {
232
236
EnsureClientConfigured ();
Original file line number Diff line number Diff line change 29
29
#include " Firestore/core/src/model/database_id.h"
30
30
#include " Firestore/core/src/util/byte_stream.h"
31
31
#include " Firestore/core/src/util/status_fwd.h"
32
+ #include " Firestore/core/swift/include/pipeline_source.h"
32
33
33
34
namespace firebase {
34
35
namespace firestore {
@@ -125,6 +126,8 @@ class Firestore : public std::enable_shared_from_this<Firestore> {
125
126
*/
126
127
static void SetClientLanguage (std::string language_token);
127
128
129
+ PipelineSource pipeline ();
130
+
128
131
private:
129
132
void EnsureClientConfigured ();
130
133
core::DatabaseInfo MakeDatabaseInfo () const ;
Original file line number Diff line number Diff line change 17
17
#ifndef FIREBASE_FIREBASEFIRESTORECPP_H
18
18
#define FIREBASE_FIREBASEFIRESTORECPP_H
19
19
20
+ #import " collection_stage.h"
21
+ #import " firestore_pipeline.h"
22
+ #import " pipeline.h"
23
+ #import " pipeline_source.h"
24
+ #import " stage.h"
20
25
#import " used_by_swift.h"
21
26
22
27
#endif // FIREBASE_FIREBASEFIRESTORECPP_H
Original file line number Diff line number Diff line change
1
+ //
2
+ // Created by Cheryl Lin on 2024-12-11.
3
+ //
4
+
5
+ #ifndef FIREBASE_COLLECTION_GROUP_STAGE_H
6
+ #define FIREBASE_COLLECTION_GROUP_STAGE_H
7
+
8
+ #include < string>
9
+ #include " stage.h"
10
+
11
+ namespace firebase {
12
+ namespace firestore {
13
+
14
+ namespace api {
15
+
16
+ class Collection : public Stage {
17
+ public:
18
+ Collection (std::string collection_path);
19
+
20
+ private:
21
+ std::string collection_path_;
22
+ };
23
+
24
+ } // namespace api
25
+
26
+ } // namespace firestore
27
+ } // namespace firebase
28
+
29
+ #endif // FIREBASE_COLLECTION_GROUP_STAGE_H
Original file line number Diff line number Diff line change
1
+ //
2
+ // Created by Cheryl Lin on 2024-12-10.
3
+ //
4
+
5
+ #ifndef FIREBASE_FIRESTORE_PIPELINE_H
6
+ #define FIREBASE_FIRESTORE_PIPELINE_H
7
+
8
+ #include " pipeline_source.h"
9
+
10
+ namespace firebase {
11
+ namespace firestore {
12
+
13
+ namespace api {
14
+ class Firestore ;
15
+
16
+ class FirestorePipeline {
17
+ public:
18
+ PipelineSource pipeline (std::shared_ptr<Firestore> firestore);
19
+ };
20
+
21
+ } // namespace api
22
+ } // namespace firestore
23
+ } // namespace firebase
24
+
25
+ #endif // FIREBASE_FIRESTORE_PIPELINE_H
Original file line number Diff line number Diff line change
1
+ //
2
+ // Created by Cheryl Lin on 2024-12-11.
3
+ //
4
+
5
+ #ifndef FIREBASE_PIPELINE_H
6
+ #define FIREBASE_PIPELINE_H
7
+
8
+ #include < memory>
9
+ #include " stage.h"
10
+
11
+ namespace firebase {
12
+ namespace firestore {
13
+
14
+ namespace api {
15
+
16
+ class Firestore ;
17
+
18
+ class Pipeline {
19
+ public:
20
+ Pipeline (std::shared_ptr<Firestore> firestore, Stage stage);
21
+
22
+ private:
23
+ std::shared_ptr<Firestore> firestore_;
24
+ Stage stage_;
25
+ };
26
+
27
+ } // namespace api
28
+
29
+ } // namespace firestore
30
+ } // namespace firebase
31
+
32
+ #endif // FIREBASE_PIPELINE_H
Original file line number Diff line number Diff line change
1
+ //
2
+ // Created by Cheryl Lin on 2024-12-09.
3
+ //
4
+
5
+ #ifndef FIREBASE_PIPELINE_SOURCE_H
6
+ #define FIREBASE_PIPELINE_SOURCE_H
7
+
8
+ #include < memory>
9
+ #include < vector>
10
+ #include " pipeline.h"
11
+
12
+ namespace firebase {
13
+ namespace firestore {
14
+
15
+ namespace api {
16
+
17
+ class Firestore ;
18
+ class DocumentReference ;
19
+
20
+ class PipelineSource {
21
+ public:
22
+ PipelineSource (std::shared_ptr<Firestore> firestore);
23
+
24
+ Pipeline GetCollection (std::string collection_path);
25
+
26
+ private:
27
+ std::shared_ptr<Firestore> firestore_;
28
+ };
29
+
30
+ } // namespace api
31
+
32
+ } // namespace firestore
33
+ } // namespace firebase
34
+
35
+ #endif // FIREBASE_PIPELINE_SOURCE_H
Original file line number Diff line number Diff line change
1
+ //
2
+ // Created by Cheryl Lin on 2024-12-11.
3
+ //
4
+
5
+ #ifndef FIREBASE_STAGE_H
6
+ #define FIREBASE_STAGE_H
7
+
8
+ namespace firebase {
9
+ namespace firestore {
10
+
11
+ namespace api {
12
+
13
+ class Stage {
14
+ public:
15
+ Stage ();
16
+ };
17
+
18
+ } // namespace api
19
+
20
+ } // namespace firestore
21
+ } // namespace firebase
22
+
23
+ #endif // FIREBASE_STAGE_H
Original file line number Diff line number Diff line change
1
+ #include " Firestore/core/swift/include/collection_stage.h"
2
+ #include < iostream>
3
+
4
+ namespace firebase {
5
+ namespace firestore {
6
+
7
+ namespace api {
8
+
9
+ Collection::Collection (std::string collection_path)
10
+ : collection_path_(collection_path) {
11
+ std::cout << " Calling Pipeline Collection ctor" << std::endl;
12
+ };
13
+
14
+ } // namespace api
15
+
16
+ } // namespace firestore
17
+ } // namespace firebase
Original file line number Diff line number Diff line change
1
+ #include " Firestore/core/swift/include/firestore_pipeline.h"
2
+ #include " Firestore/core/src/api/firestore.h"
3
+
4
+ namespace firebase {
5
+ namespace firestore {
6
+
7
+ namespace api {
8
+
9
+ PipelineSource FirestorePipeline::pipeline (
10
+ std::shared_ptr<Firestore> firestore) {
11
+ return firestore->pipeline ();
12
+ }
13
+
14
+ } // namespace api
15
+ } // namespace firestore
16
+ } // namespace firebase
You can’t perform that action at this time.
0 commit comments