2015-06-11 22:12:16 +00:00
|
|
|
// Copyright 2015 Citra Emulator Project
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
2016-02-02 06:17:41 +00:00
|
|
|
#include "common/common_types.h"
|
2015-06-11 22:12:16 +00:00
|
|
|
#include "common/logging/log.h"
|
2017-06-06 08:29:46 +00:00
|
|
|
#include "core/hle/ipc.h"
|
2017-09-30 18:19:58 +00:00
|
|
|
#include "core/hle/ipc_helpers.h"
|
|
|
|
#include "core/hle/kernel/event.h"
|
2016-09-21 06:52:38 +00:00
|
|
|
#include "core/hle/service/nim/nim.h"
|
2015-06-11 22:12:16 +00:00
|
|
|
#include "core/hle/service/nim/nim_aoc.h"
|
|
|
|
#include "core/hle/service/nim/nim_s.h"
|
|
|
|
#include "core/hle/service/nim/nim_u.h"
|
2016-09-18 00:38:01 +00:00
|
|
|
#include "core/hle/service/service.h"
|
2015-06-11 22:12:16 +00:00
|
|
|
|
|
|
|
namespace Service {
|
|
|
|
namespace NIM {
|
|
|
|
|
2017-09-30 18:19:58 +00:00
|
|
|
static Kernel::SharedPtr<Kernel::Event> nim_system_update_event;
|
|
|
|
|
|
|
|
void CheckForSysUpdateEvent(Service::Interface* self) {
|
|
|
|
IPC::RequestParser rp(Kernel::GetCommandBuffer(), 0x5, 0, 0); // 0x50000
|
|
|
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
|
|
|
|
rb.Push(RESULT_SUCCESS);
|
|
|
|
rb.PushCopyHandles(Kernel::g_handle_table.Create(nim_system_update_event).Unwrap());
|
|
|
|
LOG_TRACE(Service_NIM, "called");
|
|
|
|
}
|
|
|
|
|
2015-06-11 22:12:16 +00:00
|
|
|
void CheckSysUpdateAvailable(Service::Interface* self) {
|
|
|
|
u32* cmd_buff = Kernel::GetCommandBuffer();
|
|
|
|
|
|
|
|
cmd_buff[1] = RESULT_SUCCESS.raw;
|
|
|
|
cmd_buff[2] = 0; // No update available
|
|
|
|
|
2017-02-06 19:09:30 +00:00
|
|
|
LOG_WARNING(Service_NIM, "(STUBBED) called");
|
2015-06-11 22:12:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void Init() {
|
|
|
|
using namespace Kernel;
|
|
|
|
|
|
|
|
AddService(new NIM_AOC_Interface);
|
|
|
|
AddService(new NIM_S_Interface);
|
|
|
|
AddService(new NIM_U_Interface);
|
2017-09-30 18:19:58 +00:00
|
|
|
|
|
|
|
nim_system_update_event = Kernel::Event::Create(ResetType::OneShot, "NIM System Update Event");
|
2015-06-11 22:12:16 +00:00
|
|
|
}
|
|
|
|
|
2017-09-30 18:19:58 +00:00
|
|
|
void Shutdown() {
|
|
|
|
nim_system_update_event = nullptr;
|
|
|
|
}
|
2015-06-11 22:12:16 +00:00
|
|
|
|
|
|
|
} // namespace NIM
|
|
|
|
|
|
|
|
} // namespace Service
|