nim: CreateServerInterface, CreateAccessorInterface, CreateAsyncInterface
Closes #3026
This commit is contained in:
parent
3e9cafbee5
commit
55e423c8b6
1 changed files with 69 additions and 1 deletions
|
@ -15,6 +15,66 @@
|
||||||
|
|
||||||
namespace Service::NIM {
|
namespace Service::NIM {
|
||||||
|
|
||||||
|
class IShopServiceAsync final : public ServiceFramework<IShopServiceAsync> {
|
||||||
|
public:
|
||||||
|
IShopServiceAsync() : ServiceFramework("IShopServiceAsync") {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, nullptr, "Cancel"},
|
||||||
|
{1, nullptr, "GetSize"},
|
||||||
|
{2, nullptr, "Read"},
|
||||||
|
{3, nullptr, "GetErrorCode"},
|
||||||
|
{4, nullptr, "Request"},
|
||||||
|
{5, nullptr, "Prepare"},
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class IShopServiceAccessor final : public ServiceFramework<IShopServiceAccessor> {
|
||||||
|
public:
|
||||||
|
IShopServiceAccessor() : ServiceFramework("IShopServiceAccessor") {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, &IShopServiceAccessor::CreateAsyncInterface, "CreateAsyncInterface"},
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
void CreateAsyncInterface(Kernel::HLERequestContext& ctx) {
|
||||||
|
LOG_WARNING(Service_NIM, "(STUBBED) called");
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
rb.PushIpcInterface<IShopServiceAsync>();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class IShopServiceAccessServer final : public ServiceFramework<IShopServiceAccessServer> {
|
||||||
|
public:
|
||||||
|
IShopServiceAccessServer() : ServiceFramework("IShopServiceAccessServer") {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, &IShopServiceAccessServer::CreateAccessorInterface, "CreateAccessorInterface"},
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
void CreateAccessorInterface(Kernel::HLERequestContext& ctx) {
|
||||||
|
LOG_WARNING(Service_NIM, "(STUBBED) called");
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
rb.PushIpcInterface<IShopServiceAccessor>();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
class NIM final : public ServiceFramework<NIM> {
|
class NIM final : public ServiceFramework<NIM> {
|
||||||
public:
|
public:
|
||||||
explicit NIM() : ServiceFramework{"nim"} {
|
explicit NIM() : ServiceFramework{"nim"} {
|
||||||
|
@ -78,7 +138,7 @@ public:
|
||||||
explicit NIM_ECA() : ServiceFramework{"nim:eca"} {
|
explicit NIM_ECA() : ServiceFramework{"nim:eca"} {
|
||||||
// clang-format off
|
// clang-format off
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{0, nullptr, "CreateServerInterface"},
|
{0, &NIM_ECA::CreateServerInterface, "CreateServerInterface"},
|
||||||
{1, nullptr, "RefreshDebugAvailability"},
|
{1, nullptr, "RefreshDebugAvailability"},
|
||||||
{2, nullptr, "ClearDebugResponse"},
|
{2, nullptr, "ClearDebugResponse"},
|
||||||
{3, nullptr, "RegisterDebugResponse"},
|
{3, nullptr, "RegisterDebugResponse"},
|
||||||
|
@ -87,6 +147,14 @@ public:
|
||||||
|
|
||||||
RegisterHandlers(functions);
|
RegisterHandlers(functions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
void CreateServerInterface(Kernel::HLERequestContext& ctx) {
|
||||||
|
LOG_WARNING(Service_NIM, "(STUBBED) called");
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
rb.PushIpcInterface<IShopServiceAccessServer>();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class NIM_SHP final : public ServiceFramework<NIM_SHP> {
|
class NIM_SHP final : public ServiceFramework<NIM_SHP> {
|
||||||
|
|
Loading…
Reference in a new issue