diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/nwm/nwm_uds.cpp (renamed from src/core/hle/service/nwm_uds.cpp) | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/src/core/hle/service/nwm_uds.cpp b/src/core/hle/service/nwm/nwm_uds.cpp index 80081aae2..08fade320 100644 --- a/src/core/hle/service/nwm_uds.cpp +++ b/src/core/hle/service/nwm/nwm_uds.cpp @@ -5,14 +5,12 @@ #include "common/common_types.h" #include "common/logging/log.h" #include "core/hle/kernel/event.h" -#include "core/hle/service/nwm_uds.h" +#include "core/hle/service/nwm/nwm_uds.h" -//////////////////////////////////////////////////////////////////////////////////////////////////// -// Namespace NWM_UDS +namespace Service { +namespace NWM { -namespace NWM_UDS { - -static Kernel::SharedPtr<Kernel::Event> handle_event; +static Kernel::SharedPtr<Kernel::Event> uds_handle_event; /** * NWM_UDS::Shutdown service function @@ -22,7 +20,7 @@ static Kernel::SharedPtr<Kernel::Event> handle_event; * 0 : Return header * 1 : Result of function, 0 on success, otherwise error code */ -static void Shutdown(Service::Interface* self) { +static void Shutdown(Interface* self) { u32* cmd_buff = Kernel::GetCommandBuffer(); // TODO(purpasmart): Verify return header on HW @@ -50,7 +48,7 @@ static void Shutdown(Service::Interface* self) { * 0 : Return header * 1 : Result of function, 0 on success, otherwise error code */ -static void RecvBeaconBroadcastData(Service::Interface* self) { +static void RecvBeaconBroadcastData(Interface* self) { u32* cmd_buff = Kernel::GetCommandBuffer(); u32 out_buffer_size = cmd_buff[1]; u32 unk1 = cmd_buff[2]; @@ -90,7 +88,7 @@ static void RecvBeaconBroadcastData(Service::Interface* self) { * 2 : Value 0 * 3 : Output handle */ -static void Initialize(Service::Interface* self) { +static void InitializeWithVersion(Interface* self) { u32* cmd_buff = Kernel::GetCommandBuffer(); u32 unk1 = cmd_buff[1]; u32 unk2 = cmd_buff[12]; @@ -103,7 +101,7 @@ static void Initialize(Service::Interface* self) { /* cmd_buff[1] = RESULT_SUCCESS.raw; cmd_buff[2] = 0; - cmd_buff[3] = Kernel::g_handle_table.Create(handle_event) + cmd_buff[3] = Kernel::g_handle_table.Create(uds_handle_event) .MoveFrom(); // TODO(purpasmart): Verify if this is a event handle */ cmd_buff[0] = IPC::MakeHeader(0x1B, 1, 2); @@ -118,26 +116,29 @@ static void Initialize(Service::Interface* self) { } const Interface::FunctionInfo FunctionTable[] = { + {0x00010442, nullptr, "Initialize (deprecated)"}, {0x00020000, nullptr, "Scrap"}, {0x00030000, Shutdown, "Shutdown"}, - {0x00040402, nullptr, "CreateNetwork"}, + {0x00040402, nullptr, "CreateNetwork (deprecated)"}, {0x00050040, nullptr, "EjectClient"}, {0x00060000, nullptr, "EjectSpectator"}, {0x00070080, nullptr, "UpdateNetworkAttribute"}, {0x00080000, nullptr, "DestroyNetwork"}, + {0x00090442, nullptr, "ConnectNetwork (deprecated)"}, {0x000A0000, nullptr, "DisconnectNetwork"}, {0x000B0000, nullptr, "GetConnectionStatus"}, {0x000D0040, nullptr, "GetNodeInformation"}, + {0x000E0006, nullptr, "DecryptBeaconData (deprecated)"}, {0x000F0404, RecvBeaconBroadcastData, "RecvBeaconBroadcastData"}, - {0x00100042, nullptr, "SetBeaconAdditionalData"}, + {0x00100042, nullptr, "SetApplicationData"}, {0x00110040, nullptr, "GetApplicationData"}, {0x00120100, nullptr, "Bind"}, {0x00130040, nullptr, "Unbind"}, - {0x001400C0, nullptr, "RecvBroadcastDataFrame"}, + {0x001400C0, nullptr, "PullPacket"}, {0x00150080, nullptr, "SetMaxSendDelay"}, {0x00170182, nullptr, "SendTo"}, {0x001A0000, nullptr, "GetChannel"}, - {0x001B0302, Initialize, "Initialize"}, + {0x001B0302, InitializeWithVersion, "InitializeWithVersion"}, {0x001D0044, nullptr, "BeginHostingNetwork"}, {0x001E0084, nullptr, "ConnectToNetwork"}, {0x001F0006, nullptr, "DecryptBeaconData"}, @@ -146,17 +147,15 @@ const Interface::FunctionInfo FunctionTable[] = { {0x00220402, nullptr, "ScanOnConnection"}, }; -//////////////////////////////////////////////////////////////////////////////////////////////////// -// Interface class - -Interface::Interface() { - handle_event = Kernel::Event::Create(Kernel::ResetType::OneShot, "NWM_UDS::handle_event"); +NWM_UDS::NWM_UDS() { + uds_handle_event = Kernel::Event::Create(Kernel::ResetType::OneShot, "NWM::uds_handle_event"); Register(FunctionTable); } -Interface::~Interface() { - handle_event = nullptr; +NWM_UDS::~NWM_UDS() { + uds_handle_event = nullptr; } -} // namespace +} // namespace NWM +} // namespace Service |