From 4601c28c289f32d7944917874315adaf95a8a684 Mon Sep 17 00:00:00 2001 From: Dima Date: Sun, 20 Nov 2022 12:37:35 +0300 Subject: [PATCH] Stub GetCurrentIpAddress --- .../main/cpp/skyline/services/nifm/IGeneralService.cpp | 4 ++++ app/src/main/cpp/skyline/services/nifm/IGeneralService.h | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/app/src/main/cpp/skyline/services/nifm/IGeneralService.cpp b/app/src/main/cpp/skyline/services/nifm/IGeneralService.cpp index 4b33bc2f..636c6c3a 100644 --- a/app/src/main/cpp/skyline/services/nifm/IGeneralService.cpp +++ b/app/src/main/cpp/skyline/services/nifm/IGeneralService.cpp @@ -18,6 +18,10 @@ namespace skyline::service::nifm { return {}; } + Result IGeneralService::GetCurrentIpAddress(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { + return result::NoInternetConnection; + } + Result IGeneralService::IsAnyInternetRequestAccepted(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { // We don't emulate networking so always return false response.Push(false); diff --git a/app/src/main/cpp/skyline/services/nifm/IGeneralService.h b/app/src/main/cpp/skyline/services/nifm/IGeneralService.h index af51ba57..efdce9d0 100644 --- a/app/src/main/cpp/skyline/services/nifm/IGeneralService.h +++ b/app/src/main/cpp/skyline/services/nifm/IGeneralService.h @@ -6,6 +6,9 @@ #include namespace skyline::service::nifm { + namespace result { + constexpr Result NoInternetConnection{110, 300}; + } /** * @brief IGeneralService is used by applications to control the network connection * @url https://switchbrew.org/wiki/Network_Interface_services#IGeneralService @@ -24,6 +27,11 @@ namespace skyline::service::nifm { */ Result CreateRequest(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + /** + * @url https://switchbrew.org/wiki/Network_Interface_services#GetCurrentIpAddress + */ + Result GetCurrentIpAddress(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + /** * @url https://switchbrew.org/wiki/Network_Interface_services#IsAnyInternetRequestAccepted */ @@ -32,6 +40,7 @@ namespace skyline::service::nifm { SERVICE_DECL( SFUNC(0x1, IGeneralService, CreateScanRequest), SFUNC(0x4, IGeneralService, CreateRequest), + SFUNC(0xC, IGeneralService, GetCurrentIpAddress), SFUNC(0x15, IGeneralService, IsAnyInternetRequestAccepted) ) };