diff --git a/apple/external_commit_helper.cpp b/impl/apple/external_commit_helper.cpp similarity index 99% rename from apple/external_commit_helper.cpp rename to impl/apple/external_commit_helper.cpp index 1444281a..4cf0b523 100644 --- a/apple/external_commit_helper.cpp +++ b/impl/apple/external_commit_helper.cpp @@ -30,6 +30,7 @@ #include using namespace realm; +using namespace realm::_impl; namespace { // Write a byte to a pipe to notify anyone waiting for data on the pipe diff --git a/apple/external_commit_helper.hpp b/impl/apple/external_commit_helper.hpp similarity index 98% rename from apple/external_commit_helper.hpp rename to impl/apple/external_commit_helper.hpp index acf0e1c4..d7acb791 100644 --- a/apple/external_commit_helper.hpp +++ b/impl/apple/external_commit_helper.hpp @@ -26,6 +26,7 @@ namespace realm { class Realm; +namespace _impl { class ExternalCommitHelper { public: ExternalCommitHelper(Realm* realm); @@ -87,6 +88,7 @@ private: FdHolder m_shutdown_write_fd; }; +} // namespace _impl } // namespace realm #endif /* REALM_EXTERNAL_COMMIT_HELPER_HPP */ diff --git a/transact_log_handler.cpp b/impl/transact_log_handler.cpp similarity index 99% rename from transact_log_handler.cpp rename to impl/transact_log_handler.cpp index 3f833b19..e1b95405 100644 --- a/transact_log_handler.cpp +++ b/impl/transact_log_handler.cpp @@ -316,6 +316,7 @@ public: } // anonymous namespace namespace realm { +namespace _impl { namespace transaction { void advance(SharedGroup& sg, ClientHistory& history, RealmDelegate* delegate) { TransactLogHandler(delegate, sg, [&](auto&&... args) { @@ -344,4 +345,5 @@ void cancel(SharedGroup& sg, ClientHistory& history, RealmDelegate* delegate) { } } // namespace transaction +} // namespace _impl } // namespace realm diff --git a/transact_log_handler.hpp b/impl/transact_log_handler.hpp similarity index 97% rename from transact_log_handler.hpp rename to impl/transact_log_handler.hpp index 3a77848f..dbb54a53 100644 --- a/transact_log_handler.hpp +++ b/impl/transact_log_handler.hpp @@ -24,6 +24,7 @@ class RealmDelegate; class SharedGroup; class ClientHistory; +namespace _impl { namespace transaction { // Advance the read transaction version, with change notifications sent to delegate // Must not be called from within a write transaction. @@ -41,6 +42,7 @@ void commit(SharedGroup& sg, ClientHistory& history, RealmDelegate* delegate); // for reverting to the old values sent to delegate void cancel(SharedGroup& sg, ClientHistory& history, RealmDelegate* delegate); } // namespace transaction +} // namespace _impl } // namespace realm #endif /* REALM_TRANSACT_LOG_HANDLER_HPP */ diff --git a/shared_realm.cpp b/shared_realm.cpp index 8b003d30..2ca84649 100644 --- a/shared_realm.cpp +++ b/shared_realm.cpp @@ -29,6 +29,7 @@ #include using namespace realm; +using namespace realm::_impl; RealmCache Realm::s_global_cache; diff --git a/shared_realm.hpp b/shared_realm.hpp index aa19071e..dc5c4b92 100644 --- a/shared_realm.hpp +++ b/shared_realm.hpp @@ -28,13 +28,16 @@ namespace realm { class ClientHistory; - class ExternalCommitHelper; class Realm; class RealmCache; class RealmDelegate; typedef std::shared_ptr SharedRealm; typedef std::weak_ptr WeakRealm; + namespace _impl { + class ExternalCommitHelper; + } + class Realm : public std::enable_shared_from_this { public: @@ -114,7 +117,7 @@ namespace realm { Group *m_group = nullptr; - std::shared_ptr m_notifier; + std::shared_ptr<_impl::ExternalCommitHelper> m_notifier; public: std::unique_ptr m_delegate;