Эх сурвалжийг харах

consolidate public headers into one place

wu-hui 1 жил өмнө
parent
commit
d25aca4d43

+ 1 - 0
FirebaseFirestore.podspec

@@ -35,6 +35,7 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,
   s.pod_target_xcconfig = {
     # Enables C++ <-> Swift interop (by default it's only C)
     "SWIFT_OBJC_INTEROP_MODE" => "objcxx",
+    'HEADER_SEARCH_PATHS' => '${PODS_TARGET_SRCROOT} "${PODS_TARGET_SRCROOT}/Firestore/core/src/api"'
   }
 
   s.resource_bundles = {

+ 3 - 2
FirebaseFirestoreInternal.podspec

@@ -30,7 +30,7 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,
   # framework.
   s.public_header_files = [
     'Firestore/Source/Public/FirebaseFirestore/*.h',
-    'Firestore/core/interfaceForSwift/api/*.h'
+    'Firestore/core/src/api/FirebaseFirestoreCpp.h'
   ]
 
   # source_files contains most of the header and source files for the project.
@@ -54,8 +54,8 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,
     'Firestore/Protos/nanopb/**/*.cc',
     'Firestore/core/include/**/*.{cc,mm}',
     'Firestore/core/src/**/*.{cc,mm}',
+    'Firestore/core/src/api/*.{cc,mm}',
     'FirebaseAuth/Interop/**/*.h',
-    'Firestore/core/interfaceForSwift/**/*.{cc,h}',
   ]
 
   # Internal headers that aren't necessarily globally unique. Most C++ internal
@@ -132,6 +132,7 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,
     'HEADER_SEARCH_PATHS' =>
       '"${PODS_TARGET_SRCROOT}" ' +
       '"${PODS_TARGET_SRCROOT}/Firestore/Source/Public" ' +
+      '"${PODS_TARGET_SRCROOT}/Firestore/core/src/api" ' +
       '"${PODS_ROOT}/nanopb" ' +
       '"${PODS_TARGET_SRCROOT}/Firestore/Protos/nanopb"'
   }

+ 9 - 13
Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_IntegrationTests_macOS.xcscheme

@@ -27,6 +27,15 @@
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       shouldUseLaunchSchemeArgsEnv = "YES">
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "54B8E4A9224BDC4100930F18"
+            BuildableName = "Firestore_IntegrationTests_macOS.xctest"
+            BlueprintName = "Firestore_IntegrationTests_macOS"
+            ReferencedContainer = "container:Firestore.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
       <Testables>
          <TestableReference
             skipped = "NO">
@@ -39,17 +48,6 @@
             </BuildableReference>
          </TestableReference>
       </Testables>
-      <MacroExpansion>
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "54B8E4A9224BDC4100930F18"
-            BuildableName = "Firestore_IntegrationTests_macOS.xctest"
-            BlueprintName = "Firestore_IntegrationTests_macOS"
-            ReferencedContainer = "container:Firestore.xcodeproj">
-         </BuildableReference>
-      </MacroExpansion>
-      <AdditionalOptions>
-      </AdditionalOptions>
    </TestAction>
    <LaunchAction
       buildConfiguration = "Debug"
@@ -70,8 +68,6 @@
             ReferencedContainer = "container:Firestore.xcodeproj">
          </BuildableReference>
       </MacroExpansion>
-      <AdditionalOptions>
-      </AdditionalOptions>
    </LaunchAction>
    <ProfileAction
       buildConfiguration = "Release"

+ 0 - 1
Firestore/Source/Public/FirebaseFirestore/FirebaseFirestore.h

@@ -18,7 +18,6 @@
 #import "FIRAggregateQuery.h"
 #import "FIRAggregateQuerySnapshot.h"
 #import "FIRAggregateSource.h"
-#import "FIRCallbackWrapper.h"
 #import "FIRCollectionReference.h"
 #import "FIRDocumentChange.h"
 #import "FIRDocumentReference.h"

+ 0 - 39
Firestore/core/interfaceForSwift/api/CollectionStage.h

@@ -1,39 +0,0 @@
-// Copyright 2025 Google 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.
-
-#ifndef FIRESTORE_CORE_INTERFACEFORSWIFT_API_COLLECTIONSTAGE_H_
-#define FIRESTORE_CORE_INTERFACEFORSWIFT_API_COLLECTIONSTAGE_H_
-
-#include <string>
-#include "Stage.h"
-
-namespace firebase {
-namespace firestore {
-
-namespace api {
-
-class Collection : public Stage {
- public:
-  explicit Collection(std::string collection_path);
-
- private:
-  std::string collection_path_;
-};
-
-}  // namespace api
-
-}  // namespace firestore
-}  // namespace firebase
-
-#endif  // FIRESTORE_CORE_INTERFACEFORSWIFT_API_COLLECTIONSTAGE_H_

+ 0 - 37
Firestore/core/interfaceForSwift/api/FirestorePipeline.h

@@ -1,37 +0,0 @@
-// Copyright 2025 Google 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.
-
-#ifndef FIRESTORE_CORE_INTERFACEFORSWIFT_API_FIRESTOREPIPELINE_H_
-#define FIRESTORE_CORE_INTERFACEFORSWIFT_API_FIRESTOREPIPELINE_H_
-
-#include <memory>
-
-#include "PipelineSource.h"
-
-namespace firebase {
-namespace firestore {
-
-namespace api {
-class Firestore;
-
-class FirestorePipeline {
- public:
-  static PipelineSource pipeline(std::shared_ptr<Firestore> firestore);
-};
-
-}  // namespace api
-}  // namespace firestore
-}  // namespace firebase
-
-#endif  // FIRESTORE_CORE_INTERFACEFORSWIFT_API_FIRESTOREPIPELINE_H_

+ 0 - 47
Firestore/core/interfaceForSwift/api/PipelineSource.h

@@ -1,47 +0,0 @@
-// Copyright 2025 Google 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.
-
-#ifndef FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINESOURCE_H_
-#define FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINESOURCE_H_
-
-#include <memory>
-#include <string>
-#include <vector>
-
-#include "Pipeline.h"
-
-namespace firebase {
-namespace firestore {
-
-namespace api {
-
-class Firestore;
-class DocumentReference;
-
-class PipelineSource {
- public:
-  explicit PipelineSource(std::shared_ptr<Firestore> firestore);
-
-  Pipeline GetCollection(std::string collection_path) const;
-
- private:
-  std::shared_ptr<Firestore> firestore_;
-};
-
-}  // namespace api
-
-}  // namespace firestore
-}  // namespace firebase
-
-#endif  // FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINESOURCE_H_

+ 17 - 11
Firestore/Source/Public/FirebaseFirestore/FIRCallbackWrapper.h → Firestore/core/src/api/FIRCallbackWrapper.h

@@ -14,6 +14,9 @@
  * limitations under the License.
  */
 
+#ifndef FIRESTORE_CORE_SRC_API_FIRCALLBACKWRAPPER_H_
+#define FIRESTORE_CORE_SRC_API_FIRCALLBACKWRAPPER_H_
+
 #import <Foundation/Foundation.h>
 
 #if defined(__cplusplus)
@@ -26,15 +29,12 @@ namespace api {
 class Firestore;
 class PipelineResult;
 }  // namespace api
-
 namespace core {
 template <typename T>
 class EventListener;
 }  // namespace core
-
 }  // namespace firestore
 }  // namespace firebase
-
 namespace api = firebase::firestore::api;
 namespace core = firebase::firestore::core;
 
@@ -42,24 +42,30 @@ NS_ASSUME_NONNULL_BEGIN
 
 typedef api::PipelineResult CppPipelineResult;
 
-typedef void (^PipelineBlock)(CppPipelineResult *_Nullable result, NSError *_Nullable error)
+typedef void (^PipelineBlock)(CppPipelineResult* _Nullable result,
+                              NSError* _Nullable error)
     NS_SWIFT_UNAVAILABLE("Use Swift's closure syntax instead.");
 
 NS_SWIFT_SENDABLE
 NS_SWIFT_NAME(CallbackWrapper)
 @interface FIRCallbackWrapper : NSObject
 
-// Note: Marking callbacks in callback-based APIs as `Sendable` can help prevent crashes when they
-// are invoked on a different thread than the one they were originally defined in. If this callback
-// is expected to be called on a different thread, it should be marked as `Sendable` to ensure
-// thread safety.
+// Note: Marking callbacks in callback-based APIs as `Sendable` can help prevent
+// crashes when they are invoked on a different thread than the one they were
+// originally defined in. If this callback is expected to be called on a
+// different thread, it should be marked as `Sendable` to ensure thread safety.
 + (std::shared_ptr<core::EventListener<api::PipelineResult>>)
+    // NOLINTNEXTLINE(whitespace/parens)
     wrapPipelineCallback:(std::shared_ptr<api::Firestore>)firestore
-              completion:(void (^NS_SWIFT_SENDABLE)(CppPipelineResult *_Nullable result,
-                                                    NSError *_Nullable error))completion
+              // NOLINTNEXTLINE(whitespace/parens)
+              completion:(void (^NS_SWIFT_SENDABLE)(
+                             CppPipelineResult* _Nullable result,
+                             NSError* _Nullable error))completion
     NS_SWIFT_NAME(wrapPipelineCallback(firestore:completion:));
 
 @end
 
 NS_ASSUME_NONNULL_END
-#endif
+#endif  // defined(__cplusplus)
+
+#endif  // FIRESTORE_CORE_SRC_API_FIRCALLBACKWRAPPER_H_

+ 16 - 12
Firestore/Source/API/FIRCallbackWrapper.mm → Firestore/core/src/api/FIRCallbackWrapper.mm

@@ -20,8 +20,8 @@
 #include <utility>
 #include <vector>
 
-#include "Firestore/core/interfaceForSwift/api/Pipeline.h"
-#include "Firestore/core/interfaceForSwift/api/PipelineResult.h"
+#include "Firestore/core/src/api/pipeline.h"
+#include "Firestore/core/src/api/pipeline_result.h"
 #include "Firestore/core/src/core/event_listener.h"
 #include "Firestore/core/src/util/error_apple.h"
 #include "Firestore/core/src/util/statusor.h"
@@ -34,18 +34,22 @@ using firebase::firestore::util::StatusOr;
 
 @implementation FIRCallbackWrapper
 
-// In public Swift documentation for integrating Swift and C++, using raw pointers in C++ is
-// generally considered unsafe. However, during an experiment where the result was passed as a value
-// instead of a pointer, a double free error occurred. This issue could not be traced effectively
-// because the implementation resides within the Swift-C++ transition layer. In this specific use
-// case, the C++ OnEvent() scope is destroyed after the Swift callback has been destroyed. Due to
-// this ordering, using a raw pointer is a safe workaround for now.
-+ (PipelineSnapshotListener)wrapPipelineCallback:(std::shared_ptr<api::Firestore>)firestore
-                                      completion:(void (^)(CppPipelineResult *_Nullable result,
-                                                           NSError *_Nullable error))completion {
+// In public Swift documentation for integrating Swift and C++, using raw
+// pointers in C++ is generally considered unsafe. However, during an experiment
+// where the result was passed as a value instead of a pointer, a double free
+// error occurred. This issue could not be traced effectively because the
+// implementation resides within the Swift-C++ transition layer. In this
+// specific use case, the C++ OnEvent() scope is destroyed after the Swift
+// callback has been destroyed. Due to this ordering, using a raw pointer is a
+// safe workaround for now.
++ (PipelineSnapshotListener)
+    wrapPipelineCallback:(std::shared_ptr<api::Firestore>)firestore
+              completion:(void (^)(CppPipelineResult* _Nullable result,
+                                   NSError* _Nullable error))completion {
   class Converter : public EventListener<CppPipelineResult> {
    public:
-    explicit Converter(std::shared_ptr<api::Firestore> firestore, PipelineBlock completion)
+    explicit Converter(std::shared_ptr<api::Firestore> firestore,
+                       PipelineBlock completion)
         : firestore_(firestore), completion_(completion) {
     }
 

+ 10 - 9
Firestore/core/interfaceForSwift/api/FirebaseFirestoreCpp.h → Firestore/core/src/api/FirebaseFirestoreCpp.h

@@ -14,14 +14,15 @@
  * limitations under the License.
  */
 
-#ifndef FIRESTORE_CORE_INTERFACEFORSWIFT_API_FIREBASEFIRESTORECPP_H_
-#define FIRESTORE_CORE_INTERFACEFORSWIFT_API_FIREBASEFIRESTORECPP_H_
+#ifndef FIRESTORE_CORE_SRC_API_FIREBASEFIRESTORECPP_H_
+#define FIRESTORE_CORE_SRC_API_FIREBASEFIRESTORECPP_H_
 
-#import "Firestore/core/interfaceForSwift/api/collection_stage.h"
-#import "Firestore/core/interfaceForSwift/api/firestore_pipeline.h"
-#import "Firestore/core/interfaceForSwift/api/pipeline.h"
-#import "Firestore/core/interfaceForSwift/api/pipeline_result.h"
-#import "Firestore/core/interfaceForSwift/api/pipeline_source.h"
-#import "Firestore/core/interfaceForSwift/api/stage.h"
+#import "Firestore/core/src/api/FIRCallbackWrapper.h"
+#import "Firestore/core/src/api/collection_stage.h"
+#import "Firestore/core/src/api/firestore_pipeline.h"
+#import "Firestore/core/src/api/pipeline.h"
+#import "Firestore/core/src/api/pipeline_result.h"
+#import "Firestore/core/src/api/pipeline_source.h"
+#import "Firestore/core/src/api/stage.h"
 
-#endif  // FIRESTORE_CORE_INTERFACEFORSWIFT_API_FIREBASEFIRESTORECPP_H_
+#endif  // FIRESTORE_CORE_SRC_API_FIREBASEFIRESTORECPP_H_

+ 1 - 1
Firestore/core/interfaceForSwift/api/CollectionStage.cc → Firestore/core/src/api/collection_stage.cc

@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "Firestore/core/interfaceForSwift/api/CollectionStage.h"
+#include "Firestore/core/src/api/collection_stage.h"
 #include <iostream>
 
 namespace firebase {

+ 4 - 4
Firestore/core/interfaceForSwift/api/collection_stage.h → Firestore/core/src/api/collection_stage.h

@@ -12,11 +12,11 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#ifndef FIRESTORE_CORE_INTERFACEFORSWIFT_API_COLLECTION_STAGE_H_
-#define FIRESTORE_CORE_INTERFACEFORSWIFT_API_COLLECTION_STAGE_H_
+#ifndef FIRESTORE_CORE_SRC_API_COLLECTION_STAGE_H_
+#define FIRESTORE_CORE_SRC_API_COLLECTION_STAGE_H_
 
 #include <string>
-#include "Firestore/core/interfaceForSwift/api/stage.h"
+#include "Firestore/core/src/api/stage.h"
 
 namespace firebase {
 namespace firestore {
@@ -36,4 +36,4 @@ class Collection : public Stage {
 }  // namespace firestore
 }  // namespace firebase
 
-#endif  // FIRESTORE_CORE_INTERFACEFORSWIFT_API_COLLECTION_STAGE_H_
+#endif  // FIRESTORE_CORE_SRC_API_COLLECTION_STAGE_H_

+ 1 - 1
Firestore/core/src/api/firestore.h

@@ -21,9 +21,9 @@
 #include <mutex>
 #include <string>
 
-#include "Firestore/core/interfaceForSwift/api/PipelineSource.h"
 #include "Firestore/core/src/api/api_fwd.h"
 #include "Firestore/core/src/api/load_bundle_task.h"
+#include "Firestore/core/src/api/pipeline_source.h"
 #include "Firestore/core/src/api/settings.h"
 #include "Firestore/core/src/core/core_fwd.h"
 #include "Firestore/core/src/credentials/credentials_fwd.h"

+ 1 - 1
Firestore/core/interfaceForSwift/api/FirestorePipeline.cc → Firestore/core/src/api/firestore_pipeline.cc

@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "Firestore/core/interfaceForSwift/api/FirestorePipeline.h"
+#include "Firestore/core/src/api/firestore_pipeline.h"
 
 #include <memory>
 

+ 4 - 4
Firestore/core/interfaceForSwift/api/firestore_pipeline.h → Firestore/core/src/api/firestore_pipeline.h

@@ -12,12 +12,12 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#ifndef FIRESTORE_CORE_INTERFACEFORSWIFT_API_FIRESTORE_PIPELINE_H_
-#define FIRESTORE_CORE_INTERFACEFORSWIFT_API_FIRESTORE_PIPELINE_H_
+#ifndef FIRESTORE_CORE_SRC_API_FIRESTORE_PIPELINE_H_
+#define FIRESTORE_CORE_SRC_API_FIRESTORE_PIPELINE_H_
 
 #include <memory>
 
-#include "Firestore/core/interfaceForSwift/api/pipeline_source.h"
+#include "Firestore/core/src/api/pipeline_source.h"
 
 namespace firebase {
 namespace firestore {
@@ -34,4 +34,4 @@ class FirestorePipeline {
 }  // namespace firestore
 }  // namespace firebase
 
-#endif  // FIRESTORE_CORE_INTERFACEFORSWIFT_API_FIRESTORE_PIPELINE_H_
+#endif  // FIRESTORE_CORE_SRC_API_FIRESTORE_PIPELINE_H_

+ 2 - 5
Firestore/core/interfaceForSwift/api/Pipeline.cc → Firestore/core/src/api/pipeline.cc

@@ -12,15 +12,12 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "Firestore/core/interfaceForSwift/api/Pipeline.h"
-
-#include <future>
-#include <memory>
+#include "Firestore/core/src/api/pipeline.h"
 
 #include "Firestore/core/include/firebase/firestore/timestamp.h"
-#include "Firestore/core/interfaceForSwift/api/PipelineResult.h"
 #include "Firestore/core/src/api/firestore.h"
 #include "Firestore/core/src/api/listener_registration.h"
+#include "Firestore/core/src/api/pipeline_result.h"
 #include "Firestore/core/src/api/source.h"
 #include "Firestore/core/src/core/event_listener.h"
 #include "Firestore/core/src/core/listen_options.h"

+ 5 - 5
Firestore/core/interfaceForSwift/api/Pipeline.h → Firestore/core/src/api/pipeline.h

@@ -12,14 +12,14 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#ifndef FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINE_H_
-#define FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINE_H_
+#ifndef FIRESTORE_CORE_SRC_API_PIPELINE_H_
+#define FIRESTORE_CORE_SRC_API_PIPELINE_H_
 
 #include <functional>
 #include <memory>
 #include <vector>
-#include "PipelineResult.h"
-#include "Stage.h"
+#include "Firestore/core/src/api/pipeline_result.h"
+#include "Firestore/core/src/api/stage.h"
 
 namespace firebase {
 namespace firestore {
@@ -57,4 +57,4 @@ class Pipeline {
 }  // namespace firestore
 }  // namespace firebase
 
-#endif  // FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINE_H_
+#endif  // FIRESTORE_CORE_SRC_API_PIPELINE_H_

+ 1 - 3
Firestore/core/interfaceForSwift/api/PipelineResult.cc → Firestore/core/src/api/pipeline_result.cc

@@ -12,10 +12,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include <iostream>
-
+#include "Firestore/core/src/api/pipeline_result.h"
 #include "Firestore/core/include/firebase/firestore/timestamp.h"
-#include "Firestore/core/interfaceForSwift/api/PipelineResult.h"
 
 namespace firebase {
 namespace firestore {

+ 3 - 3
Firestore/core/interfaceForSwift/api/PipelineResult.h → Firestore/core/src/api/pipeline_result.h

@@ -12,8 +12,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#ifndef FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINERESULT_H_
-#define FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINERESULT_H_
+#ifndef FIRESTORE_CORE_SRC_API_PIPELINE_RESULT_H_
+#define FIRESTORE_CORE_SRC_API_PIPELINE_RESULT_H_
 
 #include <memory>
 
@@ -48,4 +48,4 @@ class PipelineResult {
 
 }  // namespace firestore
 }  // namespace firebase
-#endif  // FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINERESULT_H_
+#endif  // FIRESTORE_CORE_SRC_API_PIPELINE_RESULT_H_

+ 2 - 2
Firestore/core/interfaceForSwift/api/PipelineSource.cc → Firestore/core/src/api/pipeline_source.cc

@@ -12,11 +12,11 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "Firestore/core/interfaceForSwift/api/PipelineSource.h"
+#include "Firestore/core/src/api/pipeline_source.h"
 
 #include <string>
 
-#include "Firestore/core/interfaceForSwift/api/CollectionStage.h"
+#include "Firestore/core/src/api/collection_stage.h"
 #include "Firestore/core/src/api/document_reference.h"
 #include "Firestore/core/src/api/firestore.h"
 

+ 4 - 4
Firestore/core/interfaceForSwift/api/pipeline_source.h → Firestore/core/src/api/pipeline_source.h

@@ -12,14 +12,14 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#ifndef FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINE_SOURCE_H_
-#define FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINE_SOURCE_H_
+#ifndef FIRESTORE_CORE_SRC_API_PIPELINE_SOURCE_H_
+#define FIRESTORE_CORE_SRC_API_PIPELINE_SOURCE_H_
 
 #include <memory>
 #include <string>
 #include <vector>
 
-#include "Firestore/core/interfaceForSwift/api/pipeline.h"
+#include "Firestore/core/src/api/pipeline.h"
 
 namespace firebase {
 namespace firestore {
@@ -44,4 +44,4 @@ class PipelineSource {
 }  // namespace firestore
 }  // namespace firebase
 
-#endif  // FIRESTORE_CORE_INTERFACEFORSWIFT_API_PIPELINE_SOURCE_H_
+#endif  // FIRESTORE_CORE_SRC_API_PIPELINE_SOURCE_H_

+ 1 - 1
Firestore/core/interfaceForSwift/api/Stage.cc → Firestore/core/src/api/stage.cc

@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "Firestore/core/interfaceForSwift/api/Stage.h"
+#include "Firestore/core/src/api/stage.h"
 
 namespace firebase {
 namespace firestore {

+ 3 - 3
Firestore/core/interfaceForSwift/api/Stage.h → Firestore/core/src/api/stage.h

@@ -12,8 +12,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#ifndef FIRESTORE_CORE_INTERFACEFORSWIFT_API_STAGE_H_
-#define FIRESTORE_CORE_INTERFACEFORSWIFT_API_STAGE_H_
+#ifndef FIRESTORE_CORE_SRC_API_STAGE_H_
+#define FIRESTORE_CORE_SRC_API_STAGE_H_
 
 namespace firebase {
 namespace firestore {
@@ -30,4 +30,4 @@ class Stage {
 }  // namespace firestore
 }  // namespace firebase
 
-#endif  // FIRESTORE_CORE_INTERFACEFORSWIFT_API_STAGE_H_
+#endif  // FIRESTORE_CORE_SRC_API_STAGE_H_

+ 3 - 7
Package.swift

@@ -1356,19 +1356,16 @@ func abseilDependency() -> Package.Dependency {
   if ProcessInfo.processInfo.environment["FIREBASE_SOURCE_FIRESTORE"] != nil {
     packageInfo = (
       "https://github.com/firebase/abseil-cpp-SwiftPM.git",
-      "0.20240722.0" ..< "0.20240723.0"
+      "0.20240722.2" ..< "0.20240723.0"
     )
-    // return .package(url: packageInfo.url, packageInfo.range)
-    return .package(name: "abseil-cpp-SwiftPM",
-                    path: "/Users/wuandy/projects/abseil-cpp-SwiftPM")
   } else {
     packageInfo = (
       "https://github.com/google/abseil-cpp-binary.git",
       "1.2024011602.0" ..< "1.2024011700.0"
     )
-    return .package(url: packageInfo.url, packageInfo.range)
   }
 
+  return .package(url: packageInfo.url, packageInfo.range)
 }
 
 func grpcDependency() -> Package.Dependency {
@@ -1482,7 +1479,6 @@ func firestoreTargets() -> [Target] {
           "core/CMakeLists.txt",
           "core/src/util/config_detected.h.in",
           "core/test/",
-          "core/interfaceForSwift/",
           "fuzzing/",
           "test.sh",
           // Swift PM doesn't recognize hpp files, so we're relying on search paths
@@ -1500,7 +1496,7 @@ func firestoreTargets() -> [Target] {
           "core/include/",
           "core/src",
         ],
-        publicHeadersPath: "core/interfaceForSwift",
+        publicHeadersPath: "core/src/api",
         cSettings: [
           .headerSearchPath("../"),
           .headerSearchPath("Protos/nanopb"),

+ 3 - 0
scripts/sync_project.rb

@@ -111,6 +111,9 @@ def sync_firestore(test_only)
       # Make public headers available as "FIRQuery.h"
       '"${PODS_ROOT}/../../../Firestore/Source/Public/FirebaseFirestore"',
 
+      # Make public headers available as "FirebaseFirestoreCpp.h"
+      '"${PODS_ROOT}/../../../Firestore/core/src/api"',
+
       # Generated protobuf and nanopb output expects to search relative to the
       # output path.
       '"${PODS_ROOT}/../../../Firestore/Protos/cpp"',