Merge pull request #2364 from mailwl/nwm-services
Service/NWM: add nwm services
This commit is contained in:
commit
5e8ef00497
|
@ -123,7 +123,14 @@ set(SRCS
|
|||
hle/service/nim/nim_s.cpp
|
||||
hle/service/nim/nim_u.cpp
|
||||
hle/service/ns_s.cpp
|
||||
hle/service/nwm_uds.cpp
|
||||
hle/service/nwm/nwm.cpp
|
||||
hle/service/nwm/nwm_cec.cpp
|
||||
hle/service/nwm/nwm_ext.cpp
|
||||
hle/service/nwm/nwm_inf.cpp
|
||||
hle/service/nwm/nwm_sap.cpp
|
||||
hle/service/nwm/nwm_soc.cpp
|
||||
hle/service/nwm/nwm_tst.cpp
|
||||
hle/service/nwm/nwm_uds.cpp
|
||||
hle/service/pm_app.cpp
|
||||
hle/service/ptm/ptm.cpp
|
||||
hle/service/ptm/ptm_gets.cpp
|
||||
|
@ -288,7 +295,14 @@ set(HEADERS
|
|||
hle/service/nim/nim_s.h
|
||||
hle/service/nim/nim_u.h
|
||||
hle/service/ns_s.h
|
||||
hle/service/nwm_uds.h
|
||||
hle/service/nwm/nwm.h
|
||||
hle/service/nwm/nwm_cec.h
|
||||
hle/service/nwm/nwm_ext.h
|
||||
hle/service/nwm/nwm_inf.h
|
||||
hle/service/nwm/nwm_sap.h
|
||||
hle/service/nwm/nwm_soc.h
|
||||
hle/service/nwm/nwm_tst.h
|
||||
hle/service/nwm/nwm_uds.h
|
||||
hle/service/pm_app.h
|
||||
hle/service/ptm/ptm.h
|
||||
hle/service/ptm/ptm_gets.h
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
// Copyright 2016 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "core/hle/service/nwm/nwm.h"
|
||||
#include "core/hle/service/nwm/nwm_cec.h"
|
||||
#include "core/hle/service/nwm/nwm_ext.h"
|
||||
#include "core/hle/service/nwm/nwm_inf.h"
|
||||
#include "core/hle/service/nwm/nwm_sap.h"
|
||||
#include "core/hle/service/nwm/nwm_soc.h"
|
||||
#include "core/hle/service/nwm/nwm_tst.h"
|
||||
#include "core/hle/service/nwm/nwm_uds.h"
|
||||
|
||||
namespace Service {
|
||||
namespace NWM {
|
||||
|
||||
void Init() {
|
||||
AddService(new NWM_CEC);
|
||||
AddService(new NWM_EXT);
|
||||
AddService(new NWM_INF);
|
||||
AddService(new NWM_SAP);
|
||||
AddService(new NWM_SOC);
|
||||
AddService(new NWM_TST);
|
||||
AddService(new NWM_UDS);
|
||||
}
|
||||
|
||||
} // namespace NWM
|
||||
} // namespace Service
|
|
@ -0,0 +1,14 @@
|
|||
// Copyright 2016 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace Service {
|
||||
namespace NWM {
|
||||
|
||||
/// Initialize all NWM services
|
||||
void Init();
|
||||
|
||||
} // namespace NWM
|
||||
} // namespace Service
|
|
@ -0,0 +1,19 @@
|
|||
// Copyright 2016 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "core/hle/service/nwm/nwm_cec.h"
|
||||
|
||||
namespace Service {
|
||||
namespace NWM {
|
||||
|
||||
const Interface::FunctionInfo FunctionTable[] = {
|
||||
{0x000D0082, nullptr, "SendProbeRequest"},
|
||||
};
|
||||
|
||||
NWM_CEC::NWM_CEC() {
|
||||
Register(FunctionTable);
|
||||
}
|
||||
|
||||
} // namespace NWM
|
||||
} // namespace Service
|
|
@ -0,0 +1,22 @@
|
|||
// Copyright 2016 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace Service {
|
||||
namespace NWM {
|
||||
|
||||
class NWM_CEC final : public Interface {
|
||||
public:
|
||||
NWM_CEC();
|
||||
|
||||
std::string GetPortName() const override {
|
||||
return "nwm::CEC";
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace NWM
|
||||
} // namespace Service
|
|
@ -0,0 +1,19 @@
|
|||
// Copyright 2016 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "core/hle/service/nwm/nwm_ext.h"
|
||||
|
||||
namespace Service {
|
||||
namespace NWM {
|
||||
|
||||
const Interface::FunctionInfo FunctionTable[] = {
|
||||
{0x00080040, nullptr, "ControlWirelessEnabled"},
|
||||
};
|
||||
|
||||
NWM_EXT::NWM_EXT() {
|
||||
Register(FunctionTable);
|
||||
}
|
||||
|
||||
} // namespace NWM
|
||||
} // namespace Service
|
|
@ -0,0 +1,22 @@
|
|||
// Copyright 2016 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace Service {
|
||||
namespace NWM {
|
||||
|
||||
class NWM_EXT final : public Interface {
|
||||
public:
|
||||
NWM_EXT();
|
||||
|
||||
std::string GetPortName() const override {
|
||||
return "nwm::EXT";
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace NWM
|
||||
} // namespace Service
|
|
@ -0,0 +1,21 @@
|
|||
// Copyright 2016 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "core/hle/service/nwm/nwm_inf.h"
|
||||
|
||||
namespace Service {
|
||||
namespace NWM {
|
||||
|
||||
const Interface::FunctionInfo FunctionTable[] = {
|
||||
{0x000603C4, nullptr, "RecvBeaconBroadcastData"},
|
||||
{0x00070742, nullptr, "ConnectToEncryptedAP"},
|
||||
{0x00080302, nullptr, "ConnectToAP"},
|
||||
};
|
||||
|
||||
NWM_INF::NWM_INF() {
|
||||
Register(FunctionTable);
|
||||
}
|
||||
|
||||
} // namespace NWM
|
||||
} // namespace Service
|
|
@ -0,0 +1,22 @@
|
|||
// Copyright 2016 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace Service {
|
||||
namespace NWM {
|
||||
|
||||
class NWM_INF final : public Interface {
|
||||
public:
|
||||
NWM_INF();
|
||||
|
||||
std::string GetPortName() const override {
|
||||
return "nwm::INF";
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace NWM
|
||||
} // namespace Service
|
|
@ -0,0 +1,20 @@
|
|||
// Copyright 2016 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "core/hle/service/nwm/nwm_sap.h"
|
||||
|
||||
namespace Service {
|
||||
namespace NWM {
|
||||
|
||||
/*
|
||||
const Interface::FunctionInfo FunctionTable[] = {
|
||||
};
|
||||
*/
|
||||
|
||||
NWM_SAP::NWM_SAP() {
|
||||
// Register(FunctionTable);
|
||||
}
|
||||
|
||||
} // namespace NWM
|
||||
} // namespace Service
|
|
@ -0,0 +1,22 @@
|
|||
// Copyright 2016 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace Service {
|
||||
namespace NWM {
|
||||
|
||||
class NWM_SAP final : public Interface {
|
||||
public:
|
||||
NWM_SAP();
|
||||
|
||||
std::string GetPortName() const override {
|
||||
return "nwm::SAP";
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace NWM
|
||||
} // namespace Service
|
|
@ -0,0 +1,20 @@
|
|||
// Copyright 2016 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "core/hle/service/nwm/nwm_soc.h"
|
||||
|
||||
namespace Service {
|
||||
namespace NWM {
|
||||
|
||||
/*
|
||||
const Interface::FunctionInfo FunctionTable[] = {
|
||||
};
|
||||
*/
|
||||
|
||||
NWM_SOC::NWM_SOC() {
|
||||
// Register(FunctionTable);
|
||||
}
|
||||
|
||||
} // namespace NWM
|
||||
} // namespace Service
|
|
@ -0,0 +1,22 @@
|
|||
// Copyright 2016 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace Service {
|
||||
namespace NWM {
|
||||
|
||||
class NWM_SOC final : public Interface {
|
||||
public:
|
||||
NWM_SOC();
|
||||
|
||||
std::string GetPortName() const override {
|
||||
return "nwm::SOC";
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace NWM
|
||||
} // namespace Service
|
|
@ -0,0 +1,20 @@
|
|||
// Copyright 2016 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "core/hle/service/nwm/nwm_tst.h"
|
||||
|
||||
namespace Service {
|
||||
namespace NWM {
|
||||
|
||||
/*
|
||||
const Interface::FunctionInfo FunctionTable[] = {
|
||||
};
|
||||
*/
|
||||
|
||||
NWM_TST::NWM_TST() {
|
||||
// Register(FunctionTable);
|
||||
}
|
||||
|
||||
} // namespace NWM
|
||||
} // namespace Service
|
|
@ -0,0 +1,22 @@
|
|||
// Copyright 2016 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace Service {
|
||||
namespace NWM {
|
||||
|
||||
class NWM_TST final : public Interface {
|
||||
public:
|
||||
NWM_TST();
|
||||
|
||||
std::string GetPortName() const override {
|
||||
return "nwm::TST";
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace NWM
|
||||
} // namespace Service
|
|
@ -5,12 +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 Service {
|
||||
namespace NWM {
|
||||
|
||||
static Kernel::SharedPtr<Kernel::Event> handle_event;
|
||||
static Kernel::SharedPtr<Kernel::Event> uds_handle_event;
|
||||
|
||||
/**
|
||||
* NWM_UDS::Shutdown service function
|
||||
|
@ -101,7 +101,7 @@ static void InitializeWithVersion(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);
|
||||
|
@ -116,6 +116,7 @@ static void InitializeWithVersion(Interface* self) {
|
|||
}
|
||||
|
||||
const Interface::FunctionInfo FunctionTable[] = {
|
||||
{0x00010442, nullptr, "Initialize (deprecated)"},
|
||||
{0x00020000, nullptr, "Scrap"},
|
||||
{0x00030000, Shutdown, "Shutdown"},
|
||||
{0x00040402, nullptr, "CreateNetwork (deprecated)"},
|
||||
|
@ -147,13 +148,13 @@ const Interface::FunctionInfo FunctionTable[] = {
|
|||
};
|
||||
|
||||
NWM_UDS::NWM_UDS() {
|
||||
handle_event = Kernel::Event::Create(Kernel::ResetType::OneShot, "NWM_UDS::handle_event");
|
||||
uds_handle_event = Kernel::Event::Create(Kernel::ResetType::OneShot, "NWM::uds_handle_event");
|
||||
|
||||
Register(FunctionTable);
|
||||
}
|
||||
|
||||
NWM_UDS::~NWM_UDS() {
|
||||
handle_event = nullptr;
|
||||
uds_handle_event = nullptr;
|
||||
}
|
||||
|
||||
} // namespace NWM
|
|
@ -35,7 +35,7 @@
|
|||
#include "core/hle/service/nfc/nfc.h"
|
||||
#include "core/hle/service/nim/nim.h"
|
||||
#include "core/hle/service/ns_s.h"
|
||||
#include "core/hle/service/nwm_uds.h"
|
||||
#include "core/hle/service/nwm/nwm.h"
|
||||
#include "core/hle/service/pm_app.h"
|
||||
#include "core/hle/service/ptm/ptm.h"
|
||||
#include "core/hle/service/qtm/qtm.h"
|
||||
|
@ -154,6 +154,7 @@ void Init() {
|
|||
NEWS::Init();
|
||||
NFC::Init();
|
||||
NIM::Init();
|
||||
NWM::Init();
|
||||
PTM::Init();
|
||||
QTM::Init();
|
||||
|
||||
|
@ -166,7 +167,6 @@ void Init() {
|
|||
AddService(new LDR::LDR_RO);
|
||||
AddService(new MIC::MIC_U);
|
||||
AddService(new NS::NS_S);
|
||||
AddService(new NWM::NWM_UDS);
|
||||
AddService(new PM::PM_APP);
|
||||
AddService(new SOC::SOC_U);
|
||||
AddService(new SSL::SSL_C);
|
||||
|
@ -177,7 +177,6 @@ void Init() {
|
|||
|
||||
/// Shutdown ServiceManager
|
||||
void Shutdown() {
|
||||
|
||||
PTM::Shutdown();
|
||||
NIM::Shutdown();
|
||||
NEWS::Shutdown();
|
||||
|
|
Reference in New Issue