diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/logging/filter.cpp | 1 | ||||
| -rw-r--r-- | src/common/logging/types.h | 1 | ||||
| -rw-r--r-- | src/core/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/core/hle/service/glue/glue.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/glue/notif.cpp | 44 | ||||
| -rw-r--r-- | src/core/hle/service/glue/notif.h | 25 |
6 files changed, 77 insertions, 0 deletions
diff --git a/src/common/logging/filter.cpp b/src/common/logging/filter.cpp index 42744c994..b898a652c 100644 --- a/src/common/logging/filter.cpp +++ b/src/common/logging/filter.cpp | |||
| @@ -114,6 +114,7 @@ bool ParseFilterRule(Filter& instance, Iterator begin, Iterator end) { | |||
| 114 | SUB(Service, NGCT) \ | 114 | SUB(Service, NGCT) \ |
| 115 | SUB(Service, NIFM) \ | 115 | SUB(Service, NIFM) \ |
| 116 | SUB(Service, NIM) \ | 116 | SUB(Service, NIM) \ |
| 117 | SUB(Service, NOTIF) \ | ||
| 117 | SUB(Service, NPNS) \ | 118 | SUB(Service, NPNS) \ |
| 118 | SUB(Service, NS) \ | 119 | SUB(Service, NS) \ |
| 119 | SUB(Service, NVDRV) \ | 120 | SUB(Service, NVDRV) \ |
diff --git a/src/common/logging/types.h b/src/common/logging/types.h index 2d21fc483..9ed0c7ad6 100644 --- a/src/common/logging/types.h +++ b/src/common/logging/types.h | |||
| @@ -82,6 +82,7 @@ enum class Class : u8 { | |||
| 82 | Service_NGCT, ///< The NGCT (No Good Content for Terra) service | 82 | Service_NGCT, ///< The NGCT (No Good Content for Terra) service |
| 83 | Service_NIFM, ///< The NIFM (Network interface) service | 83 | Service_NIFM, ///< The NIFM (Network interface) service |
| 84 | Service_NIM, ///< The NIM service | 84 | Service_NIM, ///< The NIM service |
| 85 | Service_NOTIF, ///< The NOTIF (Notification) service | ||
| 85 | Service_NPNS, ///< The NPNS service | 86 | Service_NPNS, ///< The NPNS service |
| 86 | Service_NS, ///< The NS services | 87 | Service_NS, ///< The NS services |
| 87 | Service_NVDRV, ///< The NVDRV (Nvidia driver) service | 88 | Service_NVDRV, ///< The NVDRV (Nvidia driver) service |
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index eee8e2ccd..721685bb7 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -408,6 +408,8 @@ add_library(core STATIC | |||
| 408 | hle/service/glue/glue.h | 408 | hle/service/glue/glue.h |
| 409 | hle/service/glue/glue_manager.cpp | 409 | hle/service/glue/glue_manager.cpp |
| 410 | hle/service/glue/glue_manager.h | 410 | hle/service/glue/glue_manager.h |
| 411 | hle/service/glue/notif.cpp | ||
| 412 | hle/service/glue/notif.h | ||
| 411 | hle/service/grc/grc.cpp | 413 | hle/service/grc/grc.cpp |
| 412 | hle/service/grc/grc.h | 414 | hle/service/grc/grc.h |
| 413 | hle/service/hid/hid.cpp | 415 | hle/service/hid/hid.cpp |
diff --git a/src/core/hle/service/glue/glue.cpp b/src/core/hle/service/glue/glue.cpp index a08dc9758..b24d469cf 100644 --- a/src/core/hle/service/glue/glue.cpp +++ b/src/core/hle/service/glue/glue.cpp | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | #include "core/hle/service/glue/bgtc.h" | 8 | #include "core/hle/service/glue/bgtc.h" |
| 9 | #include "core/hle/service/glue/ectx.h" | 9 | #include "core/hle/service/glue/ectx.h" |
| 10 | #include "core/hle/service/glue/glue.h" | 10 | #include "core/hle/service/glue/glue.h" |
| 11 | #include "core/hle/service/glue/notif.h" | ||
| 11 | 12 | ||
| 12 | namespace Service::Glue { | 13 | namespace Service::Glue { |
| 13 | 14 | ||
| @@ -24,6 +25,9 @@ void InstallInterfaces(Core::System& system) { | |||
| 24 | 25 | ||
| 25 | // Error Context | 26 | // Error Context |
| 26 | std::make_shared<ECTX_AW>(system)->InstallAsService(system.ServiceManager()); | 27 | std::make_shared<ECTX_AW>(system)->InstallAsService(system.ServiceManager()); |
| 28 | |||
| 29 | // Notification Services for application | ||
| 30 | std::make_shared<NOTIF_A>(system)->InstallAsService(system.ServiceManager()); | ||
| 27 | } | 31 | } |
| 28 | 32 | ||
| 29 | } // namespace Service::Glue | 33 | } // namespace Service::Glue |
diff --git a/src/core/hle/service/glue/notif.cpp b/src/core/hle/service/glue/notif.cpp new file mode 100644 index 000000000..c559ec9df --- /dev/null +++ b/src/core/hle/service/glue/notif.cpp | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | // Copyright 2021 yuzu Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "core/hle/ipc_helpers.h" | ||
| 6 | #include "core/hle/service/glue/notif.h" | ||
| 7 | |||
| 8 | namespace Service::Glue { | ||
| 9 | |||
| 10 | NOTIF_A::NOTIF_A(Core::System& system_) : ServiceFramework{system_, "notif:a"} { | ||
| 11 | // clang-format off | ||
| 12 | static const FunctionInfo functions[] = { | ||
| 13 | {500, nullptr, "RegisterAlarmSetting"}, | ||
| 14 | {510, nullptr, "UpdateAlarmSetting"}, | ||
| 15 | {520, &NOTIF_A::ListAlarmSettings, "ListAlarmSettings"}, | ||
| 16 | {530, nullptr, "LoadApplicationParameter"}, | ||
| 17 | {540, nullptr, "DeleteAlarmSetting"}, | ||
| 18 | {1000, &NOTIF_A::Initialize, "Initialize"}, | ||
| 19 | }; | ||
| 20 | // clang-format on | ||
| 21 | |||
| 22 | RegisterHandlers(functions); | ||
| 23 | } | ||
| 24 | |||
| 25 | NOTIF_A::~NOTIF_A() = default; | ||
| 26 | |||
| 27 | void NOTIF_A::ListAlarmSettings(Kernel::HLERequestContext& ctx) { | ||
| 28 | // Returns an array of AlarmSetting | ||
| 29 | constexpr s32 alarm_count = 0; | ||
| 30 | |||
| 31 | LOG_WARNING(Service_NOTIF, "(STUBBED) called"); | ||
| 32 | |||
| 33 | IPC::ResponseBuilder rb{ctx, 3}; | ||
| 34 | rb.Push(ResultSuccess); | ||
| 35 | rb.Push(alarm_count); | ||
| 36 | } | ||
| 37 | |||
| 38 | void NOTIF_A::Initialize(Kernel::HLERequestContext& ctx) { | ||
| 39 | LOG_WARNING(Service_NOTIF, "(STUBBED) called"); | ||
| 40 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 41 | rb.Push(ResultSuccess); | ||
| 42 | } | ||
| 43 | |||
| 44 | } // namespace Service::Glue | ||
diff --git a/src/core/hle/service/glue/notif.h b/src/core/hle/service/glue/notif.h new file mode 100644 index 000000000..6ecf2015c --- /dev/null +++ b/src/core/hle/service/glue/notif.h | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | // Copyright 2021 yuzu Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include "core/hle/service/service.h" | ||
| 8 | |||
| 9 | namespace Core { | ||
| 10 | class System; | ||
| 11 | } | ||
| 12 | |||
| 13 | namespace Service::Glue { | ||
| 14 | |||
| 15 | class NOTIF_A final : public ServiceFramework<NOTIF_A> { | ||
| 16 | public: | ||
| 17 | explicit NOTIF_A(Core::System& system_); | ||
| 18 | ~NOTIF_A() override; | ||
| 19 | |||
| 20 | private: | ||
| 21 | void ListAlarmSettings(Kernel::HLERequestContext& ctx); | ||
| 22 | void Initialize(Kernel::HLERequestContext& ctx); | ||
| 23 | }; | ||
| 24 | |||
| 25 | } // namespace Service::Glue | ||