mirror of
https://git.citron-emu.org/Citron/Citron.git
synced 2025-03-15 05:34:49 +00:00
service/nifm: implement additional network interface functions
- Add implementations for previously stubbed functions: * EnumerateNetworkInterfaces * EnumerateNetworkProfiles * ConfirmSystemAvailability * SetBackgroundRequestEnabled - Add proper debug logging for new implementations - Update header with new function declarations - Add Citron copyright notice - Improve response builder naming for clarity These implementations return success status with empty results to allow applications to proceed while proper network interface management is developed. Debug logging has been added to track usage of these functions.
This commit is contained in:
parent
e3128c6e98
commit
0acfbc5fa1
2 changed files with 45 additions and 4 deletions
|
@ -419,6 +419,24 @@ void IGeneralService::GetCurrentNetworkProfile(HLERequestContext& ctx) {
|
|||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void IGeneralService::EnumerateNetworkInterfaces(HLERequestContext& ctx) {
|
||||
// Return empty list since network interface enumeration is not yet implemented
|
||||
LOG_DEBUG(Service_NIFM, "Network interface enumeration requested");
|
||||
|
||||
// Build response with just success status
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void IGeneralService::EnumerateNetworkProfiles(HLERequestContext& ctx) {
|
||||
// Return empty list since network profile enumeration is not yet implemented
|
||||
LOG_DEBUG(Service_NIFM, "Network profile enumeration requested");
|
||||
|
||||
// Build response with just success status
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void IGeneralService::RemoveNetworkProfile(HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||
|
||||
|
@ -565,6 +583,24 @@ void IGeneralService::IsAnyForegroundRequestAccepted(HLERequestContext& ctx) {
|
|||
rb.Push<u8>(is_accepted);
|
||||
}
|
||||
|
||||
void IGeneralService::ConfirmSystemAvailability(HLERequestContext& ctx) {
|
||||
// Verify system network availability
|
||||
LOG_DEBUG(Service_NIFM, "Confirming system network availability");
|
||||
|
||||
// Return success to indicate system is available
|
||||
IPC::ResponseBuilder response{ctx, 2};
|
||||
response.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void IGeneralService::SetBackgroundRequestEnabled(HLERequestContext& ctx) {
|
||||
// Enable background network requests
|
||||
LOG_DEBUG(Service_NIFM, "Setting background network requests enabled");
|
||||
|
||||
// Build success response
|
||||
IPC::ResponseBuilder response{ctx, 2};
|
||||
response.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
IGeneralService::IGeneralService(Core::System& system_)
|
||||
: ServiceFramework{system_, "IGeneralService"}, network{system_.GetRoomNetwork()} {
|
||||
// clang-format off
|
||||
|
@ -573,8 +609,8 @@ IGeneralService::IGeneralService(Core::System& system_)
|
|||
{2, &IGeneralService::CreateScanRequest, "CreateScanRequest"},
|
||||
{4, &IGeneralService::CreateRequest, "CreateRequest"},
|
||||
{5, &IGeneralService::GetCurrentNetworkProfile, "GetCurrentNetworkProfile"},
|
||||
{6, nullptr, "EnumerateNetworkInterfaces"},
|
||||
{7, nullptr, "EnumerateNetworkProfiles"},
|
||||
{6, &IGeneralService::EnumerateNetworkInterfaces, "EnumerateNetworkInterfaces"},
|
||||
{7, &IGeneralService::EnumerateNetworkProfiles, "EnumerateNetworkProfiles"},
|
||||
{8, nullptr, "GetNetworkProfile"},
|
||||
{9, nullptr, "SetNetworkProfile"},
|
||||
{10, &IGeneralService::RemoveNetworkProfile, "RemoveNetworkProfile"},
|
||||
|
@ -600,8 +636,8 @@ IGeneralService::IGeneralService(Core::System& system_)
|
|||
{30, nullptr, "SetEthernetCommunicationEnabledForTest"},
|
||||
{31, nullptr, "GetTelemetorySystemEventReadableHandle"},
|
||||
{32, nullptr, "GetTelemetryInfo"},
|
||||
{33, nullptr, "ConfirmSystemAvailability"},
|
||||
{34, nullptr, "SetBackgroundRequestEnabled"},
|
||||
{33, &IGeneralService::ConfirmSystemAvailability, "ConfirmSystemAvailability"},
|
||||
{34, &IGeneralService::SetBackgroundRequestEnabled, "SetBackgroundRequestEnabled"},
|
||||
{35, nullptr, "GetScanData"},
|
||||
{36, nullptr, "GetCurrentAccessPoint"},
|
||||
{37, nullptr, "Shutdown"},
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
@ -27,6 +28,8 @@ private:
|
|||
void CreateScanRequest(HLERequestContext& ctx);
|
||||
void CreateRequest(HLERequestContext& ctx);
|
||||
void GetCurrentNetworkProfile(HLERequestContext& ctx);
|
||||
void EnumerateNetworkInterfaces(HLERequestContext& ctx);
|
||||
void EnumerateNetworkProfiles(HLERequestContext& ctx);
|
||||
void RemoveNetworkProfile(HLERequestContext& ctx);
|
||||
void GetCurrentIpAddress(HLERequestContext& ctx);
|
||||
void CreateTemporaryNetworkProfile(HLERequestContext& ctx);
|
||||
|
@ -36,6 +39,8 @@ private:
|
|||
void IsEthernetCommunicationEnabled(HLERequestContext& ctx);
|
||||
void IsAnyInternetRequestAccepted(HLERequestContext& ctx);
|
||||
void IsAnyForegroundRequestAccepted(HLERequestContext& ctx);
|
||||
void ConfirmSystemAvailability(HLERequestContext& ctx);
|
||||
void SetBackgroundRequestEnabled(HLERequestContext& ctx);
|
||||
|
||||
Network::RoomNetwork& network;
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue