Skip to content

Commit

Permalink
Move bson files to core utils
Browse files Browse the repository at this point in the history
  • Loading branch information
jedelbo committed Nov 21, 2023
1 parent 6b63d4f commit c61c304
Show file tree
Hide file tree
Showing 18 changed files with 25 additions and 26 deletions.
8 changes: 8 additions & 0 deletions src/realm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ set(UTIL_SOURCES
util/random.cpp
util/resource_limits.cpp
util/uri.cpp
util/bson/bson.cpp
util/bson/regular_expression.cpp
)

set(REALM_INSTALL_HEADERS
Expand Down Expand Up @@ -272,6 +274,12 @@ set(REALM_NOINST_HEADERS
util/timestamp_formatter.hpp
util/timestamp_logger.hpp
util/value_reset_guard.hpp
util/bson/bson.hpp
util/bson/min_key.hpp
util/bson/max_key.hpp
util/bson/regular_expression.hpp
util/bson/indexed_map.hpp
util/bson/mongo_timestamp.hpp
) # REALM_NOINST_HEADERS

if(NOT MSVC)
Expand Down
13 changes: 2 additions & 11 deletions src/realm/object-store/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,7 @@ if(REALM_ENABLE_SYNC)
sync/impl/sync_client.hpp
sync/impl/sync_file.hpp
sync/impl/sync_metadata.hpp
sync/impl/network_reachability.hpp

util/bson/bson.hpp
util/bson/min_key.hpp
util/bson/max_key.hpp
util/bson/regular_expression.hpp
util/bson/indexed_map.hpp
util/bson/mongo_timestamp.hpp)
sync/impl/network_reachability.hpp)

list(APPEND SOURCES
sync/app.cpp
Expand All @@ -133,9 +126,7 @@ if(REALM_ENABLE_SYNC)
sync/mongo_database.cpp
sync/push_client.cpp
sync/impl/sync_file.cpp
sync/impl/sync_metadata.cpp
util/bson/bson.cpp
util/bson/regular_expression.cpp)
sync/impl/sync_metadata.cpp)
if(APPLE)
list(APPEND HEADERS
sync/impl/apple/network_reachability_observer.hpp
Expand Down
2 changes: 1 addition & 1 deletion src/realm/object-store/sync/app_credentials.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
////////////////////////////////////////////////////////////////////////////

#include <realm/object-store/sync/app_credentials.hpp>
#include <realm/object-store/util/bson/bson.hpp>
#include <realm/util/bson/bson.hpp>

namespace realm::app {

Expand Down
2 changes: 1 addition & 1 deletion src/realm/object-store/sync/app_service_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#ifndef APP_SERVICE_CLIENT_HPP
#define APP_SERVICE_CLIENT_HPP

#include <realm/object-store/util/bson/bson.hpp>
#include <realm/util/bson/bson.hpp>
#include <realm/util/functional.hpp>
#include <realm/util/optional.hpp>

Expand Down
2 changes: 1 addition & 1 deletion src/realm/object-store/sync/mongo_collection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#ifndef MONGO_COLLECTION_HPP
#define MONGO_COLLECTION_HPP

#include <realm/object-store/util/bson/bson.hpp>
#include <realm/util/bson/bson.hpp>
#include <realm/util/functional.hpp>
#include <realm/util/optional.hpp>

Expand Down
2 changes: 1 addition & 1 deletion src/realm/object-store/sync/push_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <realm/object-store/sync/app_utils.hpp>
#include <realm/object-store/sync/auth_request_client.hpp>
#include <realm/object-store/sync/generic_network_transport.hpp>
#include <realm/object-store/util/bson/bson.hpp>
#include <realm/util/bson/bson.hpp>

namespace realm::app {

Expand Down
2 changes: 1 addition & 1 deletion src/realm/object-store/sync/sync_user.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#define REALM_OS_SYNC_USER_HPP

#include <realm/object-store/util/atomic_shared_ptr.hpp>
#include <realm/object-store/util/bson/bson.hpp>
#include <realm/util/bson/bson.hpp>
#include <realm/object-store/sync/subscribable.hpp>

#include <realm/util/checked_mutex.hpp>
Expand Down
2 changes: 1 addition & 1 deletion src/realm/sync/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <realm/sync/client.hpp>
#include <realm/sync/protocol.hpp>
#include <realm/sync/network/network.hpp>
#include <realm/object-store/util/bson/bson.hpp>
#include <realm/util/bson/bson.hpp>

#include <ostream>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
**************************************************************************/

#include <realm/object-store/util/bson/bson.hpp>
#include <realm/util/bson/bson.hpp>
#include <realm/util/base64.hpp>
#include <external/json/json.hpp>
#include <sstream>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
#ifndef REALM_BSON_HPP
#define REALM_BSON_HPP

#include <realm/object-store/util/bson/indexed_map.hpp>
#include <realm/object-store/util/bson/regular_expression.hpp>
#include <realm/object-store/util/bson/min_key.hpp>
#include <realm/object-store/util/bson/max_key.hpp>
#include <realm/object-store/util/bson/mongo_timestamp.hpp>
#include <realm/util/bson/indexed_map.hpp>
#include <realm/util/bson/regular_expression.hpp>
#include <realm/util/bson/min_key.hpp>
#include <realm/util/bson/max_key.hpp>
#include <realm/util/bson/mongo_timestamp.hpp>

#include <realm/binary_data.hpp>
#include <realm/timestamp.hpp>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
**************************************************************************/

#include <realm/object-store/util/bson/regular_expression.hpp>
#include <realm/util/bson/regular_expression.hpp>
#include <numeric>

namespace realm {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion test/object-store/bson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <catch2/catch_all.hpp>
#include "util/test_utils.hpp"
#include "util/test_file.hpp"
#include <realm/object-store/util/bson/bson.hpp>
#include <realm/util/bson/bson.hpp>

using namespace nlohmann;
using namespace realm;
Expand Down
2 changes: 1 addition & 1 deletion test/object-store/sync/flx_sync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include <realm/object-store/sync/mongo_database.hpp>
#include <realm/object-store/sync/mongo_collection.hpp>
#include <realm/object-store/sync/async_open_task.hpp>
#include <realm/object-store/util/bson/bson.hpp>
#include <realm/util/bson/bson.hpp>
#include <realm/object-store/sync/sync_session.hpp>

#include <realm/sync/client_base.hpp>
Expand Down

0 comments on commit c61c304

Please sign in to comment.