Skip to content

Commit

Permalink
Address feedback, remove curl and NSURLSession transport
Browse files Browse the repository at this point in the history
  • Loading branch information
leemaguire committed Jul 17, 2024
1 parent 97ea134 commit 71e658c
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 363 deletions.
20 changes: 2 additions & 18 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,24 +122,8 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang"
target_compile_options(cpprealm PRIVATE -Wall -Wextra -pedantic -Werror)
endif()

if(APPLE OR MSVC)
target_sources(cpprealm PRIVATE src/cpprealm/internal/network/network_transport.cpp)
elseif(ANDROID)
set(REALM_ANDROID)
target_sources(cpprealm PRIVATE src/cpprealm/internal/network/network_transport.cpp)
else()
find_package(CURL)
if(NOT CURL_FOUND)
message(WARNING "CURL not found. Realm C++ will use internal networking components instead.")
target_sources(cpprealm PRIVATE src/cpprealm/internal/network/network_transport.cpp)
else()
target_link_libraries(cpprealm PUBLIC CURL::libcurl)
target_sources(cpprealm PRIVATE src/cpprealm/internal/curl/network_transport.cpp)
endif()

if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
target_link_libraries(cpprealm PRIVATE stdc++fs)
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
target_link_libraries(cpprealm PRIVATE stdc++fs)
endif()

if(MSVC AND NOT DEFINED CMAKE_MSVC_RUNTIME_LIBRARY)
Expand Down
2 changes: 0 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ let cppSdkTarget: Target = .target(
],
path: ".",
exclude: [
"src/cpprealm/internal/curl",
"src/cpprealm/internal/network",
"src/cpprealm/util/config.in.h",
"realm-core"
],
Expand Down
2 changes: 1 addition & 1 deletion include/cpprealm/networking/websocket.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ namespace realm::networking {
read_error = 4402,
write_error = 4403,
retry_error = 4404,
fata_error = 4405,
fatal_error = 4405,
};

using status = ::realm::internal::bridge::status;
Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ set(SOURCES
cpprealm/internal/bridge/thread_safe_reference.cpp
cpprealm/internal/bridge/timestamp.cpp
cpprealm/internal/bridge/uuid.cpp
cpprealm/internal/networking/network_transport.cpp
cpprealm/internal/networking/shims.cpp
cpprealm/internal/networking/utils.cpp
cpprealm/internal/scheduler/realm_core_scheduler.cpp
Expand Down
122 changes: 0 additions & 122 deletions src/cpprealm/internal/apple/network_transport.mm

This file was deleted.

209 changes: 0 additions & 209 deletions src/cpprealm/internal/curl/network_transport.cpp

This file was deleted.

Loading

0 comments on commit 71e658c

Please sign in to comment.