Merge pull request #7525 from german77/notifa
service/notif: Add notif:a and stub ListAlarmSettings, Initializemaster
commit
5f7e73c74a
@ -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
|
@ -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 New Issue