mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-08-23 20:07:19 +02:00
service: nifm: Stub GetInternetConnectionStatus
This commit is contained in:
parent
c0264d2121
commit
b38509b030
@ -30,6 +30,19 @@ enum class RequestState : u32 {
|
|||||||
Connected = 3,
|
Connected = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum class InternetConnectionType : u8 {
|
||||||
|
WiFi = 1,
|
||||||
|
Ethernet = 2,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum class InternetConnectionStatus : u8 {
|
||||||
|
ConnectingUnknown1,
|
||||||
|
ConnectingUnknown2,
|
||||||
|
ConnectingUnknown3,
|
||||||
|
ConnectingUnknown4,
|
||||||
|
Connected,
|
||||||
|
};
|
||||||
|
|
||||||
struct IpAddressSetting {
|
struct IpAddressSetting {
|
||||||
bool is_automatic{};
|
bool is_automatic{};
|
||||||
Network::IPv4Address current_address{};
|
Network::IPv4Address current_address{};
|
||||||
@ -271,6 +284,7 @@ private:
|
|||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u64>(client_id); // Client ID needs to be non zero otherwise it's considered invalid
|
rb.Push<u64>(client_id); // Client ID needs to be non zero otherwise it's considered invalid
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateScanRequest(Kernel::HLERequestContext& ctx) {
|
void CreateScanRequest(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_NIFM, "called");
|
LOG_DEBUG(Service_NIFM, "called");
|
||||||
|
|
||||||
@ -279,6 +293,7 @@ private:
|
|||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IScanRequest>(system);
|
rb.PushIpcInterface<IScanRequest>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateRequest(Kernel::HLERequestContext& ctx) {
|
void CreateRequest(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_NIFM, "called");
|
LOG_DEBUG(Service_NIFM, "called");
|
||||||
|
|
||||||
@ -287,6 +302,7 @@ private:
|
|||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IRequest>(system);
|
rb.PushIpcInterface<IRequest>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetCurrentNetworkProfile(Kernel::HLERequestContext& ctx) {
|
void GetCurrentNetworkProfile(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||||
|
|
||||||
@ -335,12 +351,14 @@ private:
|
|||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoveNetworkProfile(Kernel::HLERequestContext& ctx) {
|
void RemoveNetworkProfile(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetCurrentIpAddress(Kernel::HLERequestContext& ctx) {
|
void GetCurrentIpAddress(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||||
|
|
||||||
@ -354,6 +372,7 @@ private:
|
|||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw(*ipv4);
|
rb.PushRaw(*ipv4);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateTemporaryNetworkProfile(Kernel::HLERequestContext& ctx) {
|
void CreateTemporaryNetworkProfile(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_NIFM, "called");
|
LOG_DEBUG(Service_NIFM, "called");
|
||||||
|
|
||||||
@ -369,6 +388,7 @@ private:
|
|||||||
rb.PushIpcInterface<INetworkProfile>(system);
|
rb.PushIpcInterface<INetworkProfile>(system);
|
||||||
rb.PushRaw<u128>(uuid);
|
rb.PushRaw<u128>(uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetCurrentIpConfigInfo(Kernel::HLERequestContext& ctx) {
|
void GetCurrentIpConfigInfo(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||||
|
|
||||||
@ -405,6 +425,7 @@ private:
|
|||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw<IpConfigInfo>(ip_config_info);
|
rb.PushRaw<IpConfigInfo>(ip_config_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IsWirelessCommunicationEnabled(Kernel::HLERequestContext& ctx) {
|
void IsWirelessCommunicationEnabled(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||||
|
|
||||||
@ -412,6 +433,24 @@ private:
|
|||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u8>(0);
|
rb.Push<u8>(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GetInternetConnectionStatus(Kernel::HLERequestContext& ctx) {
|
||||||
|
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||||
|
|
||||||
|
struct Output {
|
||||||
|
InternetConnectionType type{InternetConnectionType::WiFi};
|
||||||
|
u8 wifi_strength{3};
|
||||||
|
InternetConnectionStatus state{InternetConnectionStatus::Connected};
|
||||||
|
};
|
||||||
|
static_assert(sizeof(Output) == 0x3, "Output has incorrect size.");
|
||||||
|
|
||||||
|
constexpr Output out{};
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
rb.Push(ResultSuccess);
|
||||||
|
rb.PushRaw(out);
|
||||||
|
}
|
||||||
|
|
||||||
void IsEthernetCommunicationEnabled(Kernel::HLERequestContext& ctx) {
|
void IsEthernetCommunicationEnabled(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||||
|
|
||||||
@ -423,6 +462,7 @@ private:
|
|||||||
rb.Push<u8>(0);
|
rb.Push<u8>(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IsAnyInternetRequestAccepted(Kernel::HLERequestContext& ctx) {
|
void IsAnyInternetRequestAccepted(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||||
|
|
||||||
@ -456,7 +496,7 @@ IGeneralService::IGeneralService(Core::System& system_)
|
|||||||
{15, &IGeneralService::GetCurrentIpConfigInfo, "GetCurrentIpConfigInfo"},
|
{15, &IGeneralService::GetCurrentIpConfigInfo, "GetCurrentIpConfigInfo"},
|
||||||
{16, nullptr, "SetWirelessCommunicationEnabled"},
|
{16, nullptr, "SetWirelessCommunicationEnabled"},
|
||||||
{17, &IGeneralService::IsWirelessCommunicationEnabled, "IsWirelessCommunicationEnabled"},
|
{17, &IGeneralService::IsWirelessCommunicationEnabled, "IsWirelessCommunicationEnabled"},
|
||||||
{18, nullptr, "GetInternetConnectionStatus"},
|
{18, &IGeneralService::GetInternetConnectionStatus, "GetInternetConnectionStatus"},
|
||||||
{19, nullptr, "SetEthernetCommunicationEnabled"},
|
{19, nullptr, "SetEthernetCommunicationEnabled"},
|
||||||
{20, &IGeneralService::IsEthernetCommunicationEnabled, "IsEthernetCommunicationEnabled"},
|
{20, &IGeneralService::IsEthernetCommunicationEnabled, "IsEthernetCommunicationEnabled"},
|
||||||
{21, &IGeneralService::IsAnyInternetRequestAccepted, "IsAnyInternetRequestAccepted"},
|
{21, &IGeneralService::IsAnyInternetRequestAccepted, "IsAnyInternetRequestAccepted"},
|
||||||
|
Loading…
Reference in New Issue
Block a user