Remove TD_EXPERIMENTAL_WATCH_OS.
This commit is contained in:
parent
a1d1d2160b
commit
61c3a2bcf5
|
@ -48,9 +48,9 @@ endif (CMAKE_UNAME)
|
||||||
# Force the compilers to gcc for iOS
|
# Force the compilers to gcc for iOS
|
||||||
set (CMAKE_C_COMPILER /usr/bin/gcc)
|
set (CMAKE_C_COMPILER /usr/bin/gcc)
|
||||||
set (CMAKE_CXX_COMPILER /usr/bin/g++)
|
set (CMAKE_CXX_COMPILER /usr/bin/g++)
|
||||||
set(CMAKE_AR ar CACHE FILEPATH "" FORCE)
|
set (CMAKE_AR ar CACHE FILEPATH "" FORCE)
|
||||||
set(CMAKE_RANLIB ranlib CACHE FILEPATH "" FORCE)
|
set (CMAKE_RANLIB ranlib CACHE FILEPATH "" FORCE)
|
||||||
set(PKG_CONFIG_EXECUTABLE pkg-config CACHE FILEPATH "" FORCE)
|
set (PKG_CONFIG_EXECUTABLE pkg-config CACHE FILEPATH "" FORCE)
|
||||||
|
|
||||||
# Setup iOS platform unless specified manually with IOS_PLATFORM
|
# Setup iOS platform unless specified manually with IOS_PLATFORM
|
||||||
if (NOT DEFINED IOS_PLATFORM)
|
if (NOT DEFINED IOS_PLATFORM)
|
||||||
|
|
|
@ -41,7 +41,6 @@ prevent_in_source_build()
|
||||||
|
|
||||||
option(TD_ENABLE_JNI "Use \"ON\" to enable JNI-compatible TDLib API.")
|
option(TD_ENABLE_JNI "Use \"ON\" to enable JNI-compatible TDLib API.")
|
||||||
option(TD_ENABLE_DOTNET "Use \"ON\" to enable generation of C++/CLI or C++/CX TDLib API bindings.")
|
option(TD_ENABLE_DOTNET "Use \"ON\" to enable generation of C++/CLI or C++/CX TDLib API bindings.")
|
||||||
option(TD_EXPERIMENTAL_WATCH_OS "Use \"ON\" to enable watch os support.")
|
|
||||||
|
|
||||||
if (TD_ENABLE_DOTNET AND (CMAKE_VERSION VERSION_LESS "3.1.0"))
|
if (TD_ENABLE_DOTNET AND (CMAKE_VERSION VERSION_LESS "3.1.0"))
|
||||||
message(FATAL_ERROR "CMake 3.1.0 or higher is required. You are running version ${CMAKE_VERSION}.")
|
message(FATAL_ERROR "CMake 3.1.0 or higher is required. You are running version ${CMAKE_VERSION}.")
|
||||||
|
|
|
@ -36,10 +36,8 @@ do
|
||||||
if [[ $platform = "macOS" ]]; then
|
if [[ $platform = "macOS" ]]; then
|
||||||
other_options="-DCMAKE_OSX_ARCHITECTURES='x86_64;arm64'"
|
other_options="-DCMAKE_OSX_ARCHITECTURES='x86_64;arm64'"
|
||||||
else
|
else
|
||||||
watchos=""
|
|
||||||
if [[ $platform = "watchOS" ]]; then
|
if [[ $platform = "watchOS" ]]; then
|
||||||
ios_platform="WATCH"
|
ios_platform="WATCH"
|
||||||
watchos="-DTD_EXPERIMENTAL_WATCH_OS=ON"
|
|
||||||
elif [[ $platform = "tvOS" ]]; then
|
elif [[ $platform = "tvOS" ]]; then
|
||||||
ios_platform="TV"
|
ios_platform="TV"
|
||||||
else
|
else
|
||||||
|
@ -54,7 +52,7 @@ do
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "iOS platform = ${ios_platform}"
|
echo "iOS platform = ${ios_platform}"
|
||||||
other_options="${watchos} -DIOS_PLATFORM=${ios_platform} -DCMAKE_TOOLCHAIN_FILE=${td_path}/CMake/iOS.cmake"
|
other_options="-DIOS_PLATFORM=${ios_platform} -DCMAKE_TOOLCHAIN_FILE=${td_path}/CMake/iOS.cmake"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set_cmake_options $platform
|
set_cmake_options $platform
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include "td/mtproto/ProxySecret.h"
|
#include "td/mtproto/ProxySecret.h"
|
||||||
#include "td/mtproto/Transport.h"
|
#include "td/mtproto/Transport.h"
|
||||||
|
|
||||||
#if TD_EXPERIMENTAL_WATCH_OS
|
#if TD_DARWIN_WATCH_OS
|
||||||
#include "td/net/DarwinHttp.h"
|
#include "td/net/DarwinHttp.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -259,7 +259,7 @@ class RawConnectionDefault final : public RawConnection {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#if TD_EXPERIMENTAL_WATCH_OS
|
#if TD_DARWIN_WATCH_OS
|
||||||
class RawConnectionHttp final : public RawConnection {
|
class RawConnectionHttp final : public RawConnection {
|
||||||
public:
|
public:
|
||||||
RawConnectionHttp(IPAddress ip_address, unique_ptr<StatsCallback> stats_callback)
|
RawConnectionHttp(IPAddress ip_address, unique_ptr<StatsCallback> stats_callback)
|
||||||
|
@ -452,7 +452,7 @@ class RawConnectionHttp final : public RawConnection {
|
||||||
|
|
||||||
unique_ptr<RawConnection> RawConnection::create(IPAddress ip_address, SocketFd socket_fd, TransportType transport_type,
|
unique_ptr<RawConnection> RawConnection::create(IPAddress ip_address, SocketFd socket_fd, TransportType transport_type,
|
||||||
unique_ptr<StatsCallback> stats_callback) {
|
unique_ptr<StatsCallback> stats_callback) {
|
||||||
#if TD_EXPERIMENTAL_WATCH_OS
|
#if TD_DARWIN_WATCH_OS
|
||||||
return td::make_unique<RawConnectionHttp>(ip_address, std::move(stats_callback));
|
return td::make_unique<RawConnectionHttp>(ip_address, std::move(stats_callback));
|
||||||
#else
|
#else
|
||||||
return td::make_unique<RawConnectionDefault>(std::move(socket_fd), transport_type, std::move(stats_callback));
|
return td::make_unique<RawConnectionDefault>(std::move(socket_fd), transport_type, std::move(stats_callback));
|
||||||
|
|
|
@ -705,7 +705,7 @@ Result<SocketFd> ConnectionCreator::find_connection(const Proxy &proxy, const IP
|
||||||
bool prefer_ipv6 =
|
bool prefer_ipv6 =
|
||||||
G()->shared_config().get_option_boolean("prefer_ipv6") || (proxy.use_proxy() && proxy_ip_address.is_ipv6());
|
G()->shared_config().get_option_boolean("prefer_ipv6") || (proxy.use_proxy() && proxy_ip_address.is_ipv6());
|
||||||
bool only_http = proxy.use_http_caching_proxy();
|
bool only_http = proxy.use_http_caching_proxy();
|
||||||
#if TD_EXPERIMENTAL_WATCH_OS
|
#if TD_DARWIN_WATCH_OS
|
||||||
only_http = true;
|
only_http = true;
|
||||||
#endif
|
#endif
|
||||||
TRY_RESULT(info, dc_options_set_.find_connection(
|
TRY_RESULT(info, dc_options_set_.find_connection(
|
||||||
|
|
|
@ -48,7 +48,7 @@ set(TDNET_SOURCE
|
||||||
td/net/Wget.h
|
td/net/Wget.h
|
||||||
)
|
)
|
||||||
|
|
||||||
if (TD_EXPERIMENTAL_WATCH_OS)
|
if (APPLE_WATCH)
|
||||||
set(TDNET_SOURCE
|
set(TDNET_SOURCE
|
||||||
${TDNET_SOURCE}
|
${TDNET_SOURCE}
|
||||||
td/net/DarwinHttp.mm
|
td/net/DarwinHttp.mm
|
||||||
|
@ -77,7 +77,7 @@ if (WIN32)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (TD_EXPERIMENTAL_WATCH_OS)
|
if (APPLE_WATCH)
|
||||||
find_library(FOUNDATION_LIBRARY Foundation REQUIRED)
|
find_library(FOUNDATION_LIBRARY Foundation REQUIRED)
|
||||||
target_link_libraries(tdnet PRIVATE ${FOUNDATION_LIBRARY})
|
target_link_libraries(tdnet PRIVATE ${FOUNDATION_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -6,4 +6,3 @@
|
||||||
#cmakedefine01 TD_HAVE_COROUTINES
|
#cmakedefine01 TD_HAVE_COROUTINES
|
||||||
#cmakedefine01 TD_HAVE_ABSL
|
#cmakedefine01 TD_HAVE_ABSL
|
||||||
#cmakedefine01 TD_FD_DEBUG
|
#cmakedefine01 TD_FD_DEBUG
|
||||||
#cmakedefine01 TD_EXPERIMENTAL_WATCH_OS
|
|
||||||
|
|
|
@ -622,7 +622,7 @@ Result<SocketFd> SocketFd::from_native_fd(NativeFd fd) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Result<SocketFd> SocketFd::open(const IPAddress &address) {
|
Result<SocketFd> SocketFd::open(const IPAddress &address) {
|
||||||
#if TD_EXPERIMENTAL_WATCH_OS
|
#if TD_DARWIN_WATCH_OS
|
||||||
return SocketFd{};
|
return SocketFd{};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
//
|
//
|
||||||
#include "data.h"
|
#include "data.h"
|
||||||
|
|
||||||
#if TD_EXPERIMENTAL_WATCH_OS
|
#if TD_DARWIN_WATCH_OS
|
||||||
#include "td/net/DarwinHttp.h"
|
#include "td/net/DarwinHttp.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -468,7 +468,7 @@ TEST(Http, gzip_bomb_with_limit) {
|
||||||
ASSERT_TRUE(ok);
|
ASSERT_TRUE(ok);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if TD_EXPERIMENTAL_WATCH_OS
|
#if TD_DARWIN_WATCH_OS
|
||||||
struct Baton {
|
struct Baton {
|
||||||
std::mutex mutex;
|
std::mutex mutex;
|
||||||
std::condition_variable cond;
|
std::condition_variable cond;
|
||||||
|
|
Loading…
Reference in New Issue