From 1bc5cdeb27bc70ce9877aaa9d94081afa164f9c0 Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Tue, 3 Dec 2024 11:55:14 -0500 Subject: [PATCH] Add some ppl files --- Firestore/core/CMakeLists.txt | 2 + .../src/called_by_swift/include/pipeline.h | 24 ++++++++++++ .../called_by_swift/include/pipeline_result.h | 32 +++++++++++++++ .../called_by_swift/include/pipeline_source.h | 39 +++++++++++++++++++ .../core/src/called_by_swift/pipeline.cc | 11 ++++++ .../src/called_by_swift/pipeline_result.cc | 0 .../src/called_by_swift/pipeline_source.cc | 27 +++++++++++++ 7 files changed, 135 insertions(+) create mode 100644 Firestore/core/src/called_by_swift/include/pipeline.h create mode 100644 Firestore/core/src/called_by_swift/include/pipeline_result.h create mode 100644 Firestore/core/src/called_by_swift/include/pipeline_source.h create mode 100644 Firestore/core/src/called_by_swift/pipeline.cc create mode 100644 Firestore/core/src/called_by_swift/pipeline_result.cc create mode 100644 Firestore/core/src/called_by_swift/pipeline_source.cc diff --git a/Firestore/core/CMakeLists.txt b/Firestore/core/CMakeLists.txt index 65238165549..f79ac501d0e 100644 --- a/Firestore/core/CMakeLists.txt +++ b/Firestore/core/CMakeLists.txt @@ -218,6 +218,8 @@ firebase_ios_glob( src/objc/*.h src/remote/*.cc src/remote/*.h + src/called_by_swift/include/*.h + src/called_by_swift/*.cc EXCLUDE ${nanopb_sources} ) diff --git a/Firestore/core/src/called_by_swift/include/pipeline.h b/Firestore/core/src/called_by_swift/include/pipeline.h new file mode 100644 index 00000000000..d24d993d7ce --- /dev/null +++ b/Firestore/core/src/called_by_swift/include/pipeline.h @@ -0,0 +1,24 @@ +// +// Created by Cheryl Lin on 2024-11-13. +// + +#ifndef FIREBASE_PIPELINE_H +#define FIREBASE_PIPELINE_H + +#include +#include "Firestore/core/src/called_by_swift/include/pipeline_result.h" + +namespace firebase { +namespace firestore { +namespace core { +class Pipeline { + public: + Pipeline(); + + std::vector execute(); +}; +} // namespace core +} // namespace firestore +} // namespace firebase + +#endif // FIREBASE_PIPELINE_H diff --git a/Firestore/core/src/called_by_swift/include/pipeline_result.h b/Firestore/core/src/called_by_swift/include/pipeline_result.h new file mode 100644 index 00000000000..b11b113bf69 --- /dev/null +++ b/Firestore/core/src/called_by_swift/include/pipeline_result.h @@ -0,0 +1,32 @@ + + +#include +#include +#include +#include "Firestore/core/include/firebase/firestore/timestamp.h" +#include "Firestore/core/src/api/api_fwd.h" + +namespace firebase { +namespace firestore { + +namespace model { +class FieldPath; +class FieldValue; +} // namespace model + +namespace core { + +class PipelineResult { + public: + PipelineResult(); + + Timestamp getCreateTime() const; + + std::unordered_map getData() const; + + api::DocumentReference getReference() const; +}; +} // namespace core + +} // namespace firestore +} // namespace firebase \ No newline at end of file diff --git a/Firestore/core/src/called_by_swift/include/pipeline_source.h b/Firestore/core/src/called_by_swift/include/pipeline_source.h new file mode 100644 index 00000000000..ff43cee21a2 --- /dev/null +++ b/Firestore/core/src/called_by_swift/include/pipeline_source.h @@ -0,0 +1,39 @@ +/* + * Copyright 2024 LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +#include "Firestore/core/src/api/api_fwd.h" +#include "Firestore/core/src/called_by_swift/include/pipeline.h" + +namespace firebase { +namespace firestore { +namespace core { +class PipelineSource { + public: + explicit PipelineSource(); + + // Creates a new Pipeline that operates on the specified Firestore collection. + Pipeline GetCollection(const std::string collection_path); + + // Creates a new Pipeline that operates on a specific set of Firestore + // documents. + Pipeline GetDocuments(const std::vector docs); +}; +} // namespace core +} // namespace firestore +} // namespace firebase diff --git a/Firestore/core/src/called_by_swift/pipeline.cc b/Firestore/core/src/called_by_swift/pipeline.cc new file mode 100644 index 00000000000..27740c954b5 --- /dev/null +++ b/Firestore/core/src/called_by_swift/pipeline.cc @@ -0,0 +1,11 @@ + +#include "Firestore/core/src/called_by_swift/include/pipeline.h" +namespace firebase { +namespace firestore { +namespace core { +Pipeline::Pipeline() { +} + +} // namespace core +} // namespace firestore +} // namespace firebase diff --git a/Firestore/core/src/called_by_swift/pipeline_result.cc b/Firestore/core/src/called_by_swift/pipeline_result.cc new file mode 100644 index 00000000000..e69de29bb2d diff --git a/Firestore/core/src/called_by_swift/pipeline_source.cc b/Firestore/core/src/called_by_swift/pipeline_source.cc new file mode 100644 index 00000000000..de29a6d1a1d --- /dev/null +++ b/Firestore/core/src/called_by_swift/pipeline_source.cc @@ -0,0 +1,27 @@ +/* + * Copyright 2024 LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "Firestore/core/src/called_by_swift/include/pipeline_source.h" + +PipelineSource::PipelineSource() { +} + +Pipeline PipelineSource::GetCollection(const std::string collection_path) { +} + +Pipeline PipelineSource::GetDocuments( + const std::vector docs) { +}