Skip to content

Commit

Permalink
Add some ppl files
Browse files Browse the repository at this point in the history
  • Loading branch information
cherylEnkidu committed Dec 3, 2024
1 parent 2b10cab commit ac77d2f
Show file tree
Hide file tree
Showing 7 changed files with 135 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Firestore/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
)

Expand Down
24 changes: 24 additions & 0 deletions Firestore/core/src/called_by_swift/include/pipeline.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//
// Created by Cheryl Lin on 2024-11-13.
//

#ifndef FIREBASE_PIPELINE_H
#define FIREBASE_PIPELINE_H

#include <vector>
#include "Firestore/core/src/called_by_swift/include/pipeline_result.h"

namespace firebase {
namespace firestore {
namespace core {
class Pipeline {
public:
Pipeline();

std::vector<PipelineResult> execute();
};
} // namespace core
} // namespace firestore
} // namespace firebase

#endif // FIREBASE_PIPELINE_H
32 changes: 32 additions & 0 deletions Firestore/core/src/called_by_swift/include/pipeline_result.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@


#include <string>
#include <unordered_map>
#include <vector>
#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<std::string, model::FieldValue> getData() const;

api::DocumentReference getReference() const;
};
} // namespace core

} // namespace firestore
} // namespace firebase
39 changes: 39 additions & 0 deletions Firestore/core/src/called_by_swift/include/pipeline_source.h
Original file line number Diff line number Diff line change
@@ -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 <string>
#include <vector>

#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<api::DocumentReference> docs);
};
} // namespace core
} // namespace firestore
} // namespace firebase
11 changes: 11 additions & 0 deletions Firestore/core/src/called_by_swift/pipeline.cc
Original file line number Diff line number Diff line change
@@ -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
Empty file.
27 changes: 27 additions & 0 deletions Firestore/core/src/called_by_swift/pipeline_source.cc
Original file line number Diff line number Diff line change
@@ -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<DocumentReference> docs) {
}

0 comments on commit ac77d2f

Please sign in to comment.