Stub GetCurrentIpAddress

This commit is contained in:
Dima 2022-11-20 12:37:35 +03:00 committed by Billy Laws
parent 18e6a6c53c
commit 4601c28c28
2 changed files with 13 additions and 0 deletions

View File

@ -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);

View File

@ -6,6 +6,9 @@
#include <services/serviceman.h>
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)
)
};