service/notif: Add notif:a and stub ListAlarmSettings,Initialize
Used by ring fit adventure 1.2.0
This commit is contained in:
parent
fae07919af
commit
ac1bfe228f
6 changed files with 77 additions and 0 deletions
|
@ -114,6 +114,7 @@ bool ParseFilterRule(Filter& instance, Iterator begin, Iterator end) {
|
||||||
SUB(Service, NGCT) \
|
SUB(Service, NGCT) \
|
||||||
SUB(Service, NIFM) \
|
SUB(Service, NIFM) \
|
||||||
SUB(Service, NIM) \
|
SUB(Service, NIM) \
|
||||||
|
SUB(Service, NOTIF) \
|
||||||
SUB(Service, NPNS) \
|
SUB(Service, NPNS) \
|
||||||
SUB(Service, NS) \
|
SUB(Service, NS) \
|
||||||
SUB(Service, NVDRV) \
|
SUB(Service, NVDRV) \
|
||||||
|
|
|
@ -82,6 +82,7 @@ enum class Class : u8 {
|
||||||
Service_NGCT, ///< The NGCT (No Good Content for Terra) service
|
Service_NGCT, ///< The NGCT (No Good Content for Terra) service
|
||||||
Service_NIFM, ///< The NIFM (Network interface) service
|
Service_NIFM, ///< The NIFM (Network interface) service
|
||||||
Service_NIM, ///< The NIM service
|
Service_NIM, ///< The NIM service
|
||||||
|
Service_NOTIF, ///< The NOTIF (Notification) service
|
||||||
Service_NPNS, ///< The NPNS service
|
Service_NPNS, ///< The NPNS service
|
||||||
Service_NS, ///< The NS services
|
Service_NS, ///< The NS services
|
||||||
Service_NVDRV, ///< The NVDRV (Nvidia driver) service
|
Service_NVDRV, ///< The NVDRV (Nvidia driver) service
|
||||||
|
|
|
@ -408,6 +408,8 @@ add_library(core STATIC
|
||||||
hle/service/glue/glue.h
|
hle/service/glue/glue.h
|
||||||
hle/service/glue/glue_manager.cpp
|
hle/service/glue/glue_manager.cpp
|
||||||
hle/service/glue/glue_manager.h
|
hle/service/glue/glue_manager.h
|
||||||
|
hle/service/glue/notif.cpp
|
||||||
|
hle/service/glue/notif.h
|
||||||
hle/service/grc/grc.cpp
|
hle/service/grc/grc.cpp
|
||||||
hle/service/grc/grc.h
|
hle/service/grc/grc.h
|
||||||
hle/service/hid/hid.cpp
|
hle/service/hid/hid.cpp
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include "core/hle/service/glue/bgtc.h"
|
#include "core/hle/service/glue/bgtc.h"
|
||||||
#include "core/hle/service/glue/ectx.h"
|
#include "core/hle/service/glue/ectx.h"
|
||||||
#include "core/hle/service/glue/glue.h"
|
#include "core/hle/service/glue/glue.h"
|
||||||
|
#include "core/hle/service/glue/notif.h"
|
||||||
|
|
||||||
namespace Service::Glue {
|
namespace Service::Glue {
|
||||||
|
|
||||||
|
@ -24,6 +25,9 @@ void InstallInterfaces(Core::System& system) {
|
||||||
|
|
||||||
// Error Context
|
// Error Context
|
||||||
std::make_shared<ECTX_AW>(system)->InstallAsService(system.ServiceManager());
|
std::make_shared<ECTX_AW>(system)->InstallAsService(system.ServiceManager());
|
||||||
|
|
||||||
|
// Notification Services for application
|
||||||
|
std::make_shared<NOTIF_A>(system)->InstallAsService(system.ServiceManager());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Service::Glue
|
} // namespace Service::Glue
|
||||||
|
|
44
src/core/hle/service/glue/notif.cpp
Normal file
44
src/core/hle/service/glue/notif.cpp
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
// Copyright 2021 yuzu Emulator Project
|
||||||
|
// Licensed under GPLv2 or any later version
|
||||||
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include "core/hle/ipc_helpers.h"
|
||||||
|
#include "core/hle/service/glue/notif.h"
|
||||||
|
|
||||||
|
namespace Service::Glue {
|
||||||
|
|
||||||
|
NOTIF_A::NOTIF_A(Core::System& system_) : ServiceFramework{system_, "notif:a"} {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{500, nullptr, "RegisterAlarmSetting"},
|
||||||
|
{510, nullptr, "UpdateAlarmSetting"},
|
||||||
|
{520, &NOTIF_A::ListAlarmSettings, "ListAlarmSettings"},
|
||||||
|
{530, nullptr, "LoadApplicationParameter"},
|
||||||
|
{540, nullptr, "DeleteAlarmSetting"},
|
||||||
|
{1000, &NOTIF_A::Initialize, "Initialize"},
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
|
||||||
|
NOTIF_A::~NOTIF_A() = default;
|
||||||
|
|
||||||
|
void NOTIF_A::ListAlarmSettings(Kernel::HLERequestContext& ctx) {
|
||||||
|
// Returns an array of AlarmSetting
|
||||||
|
constexpr s32 alarm_count = 0;
|
||||||
|
|
||||||
|
LOG_WARNING(Service_NOTIF, "(STUBBED) called");
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
rb.Push(ResultSuccess);
|
||||||
|
rb.Push(alarm_count);
|
||||||
|
}
|
||||||
|
|
||||||
|
void NOTIF_A::Initialize(Kernel::HLERequestContext& ctx) {
|
||||||
|
LOG_WARNING(Service_NOTIF, "(STUBBED) called");
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
rb.Push(ResultSuccess);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Service::Glue
|
25
src/core/hle/service/glue/notif.h
Normal file
25
src/core/hle/service/glue/notif.h
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
// Copyright 2021 yuzu 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 Core {
|
||||||
|
class System;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace Service::Glue {
|
||||||
|
|
||||||
|
class NOTIF_A final : public ServiceFramework<NOTIF_A> {
|
||||||
|
public:
|
||||||
|
explicit NOTIF_A(Core::System& system_);
|
||||||
|
~NOTIF_A() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
void ListAlarmSettings(Kernel::HLERequestContext& ctx);
|
||||||
|
void Initialize(Kernel::HLERequestContext& ctx);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace Service::Glue
|
Loading…
Reference in a new issue