yuzu-emu
/
yuzu-android
Archived
1
0
Fork 0

Merge pull request #11109 from Morph1984/net

network: Fix compilation with ENABLE_WEB_SERVICE=OFF
This commit is contained in:
Morph 2023-07-17 23:57:39 -04:00 committed by GitHub
commit 3fded314f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 43 additions and 32 deletions

View File

@ -3,9 +3,10 @@
#pragma once #pragma once
#include "common/common_types.h"
#include <optional> #include <optional>
#include <string>
#include "common/common_types.h"
namespace Network { namespace Network {

View File

@ -876,7 +876,7 @@ elseif (APPLE)
elseif (WIN32) elseif (WIN32)
target_sources(core PRIVATE target_sources(core PRIVATE
hle/service/ssl/ssl_backend_schannel.cpp) hle/service/ssl/ssl_backend_schannel.cpp)
target_link_libraries(core PRIVATE secur32) target_link_libraries(core PRIVATE crypt32 secur32)
else() else()
target_sources(core PRIVATE target_sources(core PRIVATE
hle/service/ssl/ssl_backend_none.cpp) hle/service/ssl/ssl_backend_none.cpp)

View File

@ -7,6 +7,7 @@
#include "core/hle/service/kernel_helpers.h" #include "core/hle/service/kernel_helpers.h"
#include "core/hle/service/nifm/nifm.h" #include "core/hle/service/nifm/nifm.h"
#include "core/hle/service/server_manager.h" #include "core/hle/service/server_manager.h"
#include "network/network.h"
namespace { namespace {

View File

@ -4,14 +4,15 @@
#pragma once #pragma once
#include "core/hle/service/service.h" #include "core/hle/service/service.h"
#include "network/network.h"
#include "network/room.h"
#include "network/room_member.h"
namespace Core { namespace Core {
class System; class System;
} }
namespace Network {
class RoomNetwork;
}
namespace Service::NIFM { namespace Service::NIFM {
void LoopProcess(Core::System& system); void LoopProcess(Core::System& system);

View File

@ -3,15 +3,15 @@
#pragma once #pragma once
#include "core/hle/result.h"
#include "common/common_types.h"
#include <memory> #include <memory>
#include <span> #include <span>
#include <string> #include <string>
#include <vector> #include <vector>
#include "common/common_types.h"
#include "core/hle/result.h"
namespace Network { namespace Network {
class SocketBase; class SocketBase;
} }

View File

@ -1,10 +1,10 @@
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
#include "core/hle/service/ssl/ssl_backend.h"
#include "common/logging/log.h" #include "common/logging/log.h"
#include "core/hle/service/ssl/ssl_backend.h"
namespace Service::SSL { namespace Service::SSL {
ResultVal<std::unique_ptr<SSLConnectionBackend>> CreateSSLConnectionBackend() { ResultVal<std::unique_ptr<SSLConnectionBackend>> CreateSSLConnectionBackend() {

View File

@ -1,14 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
#include "core/hle/service/ssl/ssl_backend.h"
#include "core/internal_network/network.h"
#include "core/internal_network/sockets.h"
#include "common/fs/file.h"
#include "common/hex_util.h"
#include "common/string_util.h"
#include <mutex> #include <mutex>
#include <openssl/bio.h> #include <openssl/bio.h>
@ -16,6 +8,14 @@
#include <openssl/ssl.h> #include <openssl/ssl.h>
#include <openssl/x509.h> #include <openssl/x509.h>
#include "common/fs/file.h"
#include "common/hex_util.h"
#include "common/string_util.h"
#include "core/hle/service/ssl/ssl_backend.h"
#include "core/internal_network/network.h"
#include "core/internal_network/sockets.h"
using namespace Common::FS; using namespace Common::FS;
namespace Service::SSL { namespace Service::SSL {

View File

@ -1,16 +1,16 @@
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
#include "core/hle/service/ssl/ssl_backend.h" #include <mutex>
#include "core/internal_network/network.h"
#include "core/internal_network/sockets.h"
#include "common/error.h" #include "common/error.h"
#include "common/fs/file.h" #include "common/fs/file.h"
#include "common/hex_util.h" #include "common/hex_util.h"
#include "common/string_util.h" #include "common/string_util.h"
#include <mutex> #include "core/hle/service/ssl/ssl_backend.h"
#include "core/internal_network/network.h"
#include "core/internal_network/sockets.h"
namespace { namespace {
@ -20,6 +20,7 @@ namespace {
#define SECURITY_WIN32 #define SECURITY_WIN32
#include <schnlsp.h> #include <schnlsp.h>
#include <security.h> #include <security.h>
#include <wincrypt.h>
std::once_flag one_time_init_flag; std::once_flag one_time_init_flag;
bool one_time_init_success = false; bool one_time_init_success = false;

View File

@ -1,18 +1,21 @@
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
#include "core/hle/service/ssl/ssl_backend.h"
#include "core/internal_network/network.h"
#include "core/internal_network/sockets.h"
#include <mutex> #include <mutex>
#include <Security/SecureTransport.h>
// SecureTransport has been deprecated in its entirety in favor of // SecureTransport has been deprecated in its entirety in favor of
// Network.framework, but that does not allow layering TLS on top of an // Network.framework, but that does not allow layering TLS on top of an
// arbitrary socket. // arbitrary socket.
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#include <Security/SecureTransport.h>
#pragma GCC diagnostic pop
#endif
#include "core/hle/service/ssl/ssl_backend.h"
#include "core/internal_network/network.h"
#include "core/internal_network/sockets.h"
namespace { namespace {

View File

@ -10,6 +10,7 @@
#include "core/internal_network/network.h" #include "core/internal_network/network.h"
#include "core/internal_network/network_interface.h" #include "core/internal_network/network_interface.h"
#include "core/internal_network/socket_proxy.h" #include "core/internal_network/socket_proxy.h"
#include "network/network.h"
#if YUZU_UNIX #if YUZU_UNIX
#include <sys/socket.h> #include <sys/socket.h>

View File

@ -10,10 +10,12 @@
#include "common/common_funcs.h" #include "common/common_funcs.h"
#include "core/internal_network/sockets.h" #include "core/internal_network/sockets.h"
#include "network/network.h" #include "network/room_member.h"
namespace Network { namespace Network {
class RoomNetwork;
class ProxySocket : public SocketBase { class ProxySocket : public SocketBase {
public: public:
explicit ProxySocket(RoomNetwork& room_network_) noexcept; explicit ProxySocket(RoomNetwork& room_network_) noexcept;

View File

@ -15,12 +15,13 @@
#include "common/common_types.h" #include "common/common_types.h"
#include "core/internal_network/network.h" #include "core/internal_network/network.h"
#include "network/network.h"
// TODO: C++20 Replace std::vector usages with std::span // TODO: C++20 Replace std::vector usages with std::span
namespace Network { namespace Network {
struct ProxyPacket;
class SocketBase { class SocketBase {
public: public:
#ifdef YUZU_UNIX #ifdef YUZU_UNIX