2022-04-23 10:59:50 +02:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2019-06-25 01:20:06 +02:00
|
|
|
|
2021-04-07 17:03:45 +02:00
|
|
|
#include "common/logging/log.h"
|
|
|
|
#include "core/core.h"
|
|
|
|
#include "core/hle/ipc_helpers.h"
|
2019-06-25 01:20:06 +02:00
|
|
|
#include "core/hle/service/glue/bgtc.h"
|
|
|
|
|
|
|
|
namespace Service::Glue {
|
|
|
|
|
2020-11-26 21:19:08 +01:00
|
|
|
BGTC_T::BGTC_T(Core::System& system_) : ServiceFramework{system_, "bgtc:t"} {
|
2021-04-07 17:03:45 +02:00
|
|
|
// clang-format off
|
|
|
|
static const FunctionInfo functions[] = {
|
|
|
|
{100, &BGTC_T::OpenTaskService, "OpenTaskService"},
|
|
|
|
};
|
|
|
|
// clang-format on
|
|
|
|
|
|
|
|
RegisterHandlers(functions);
|
|
|
|
}
|
|
|
|
|
|
|
|
BGTC_T::~BGTC_T() = default;
|
|
|
|
|
|
|
|
void BGTC_T::OpenTaskService(Kernel::HLERequestContext& ctx) {
|
|
|
|
LOG_DEBUG(Service_BGTC, "called");
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
2021-05-21 07:05:04 +02:00
|
|
|
rb.Push(ResultSuccess);
|
2021-04-07 17:03:45 +02:00
|
|
|
rb.PushIpcInterface<ITaskService>(system);
|
|
|
|
}
|
|
|
|
|
|
|
|
ITaskService::ITaskService(Core::System& system_) : ServiceFramework{system_, "ITaskService"} {
|
2019-06-25 01:20:06 +02:00
|
|
|
// clang-format off
|
|
|
|
static const FunctionInfo functions[] = {
|
|
|
|
{1, nullptr, "NotifyTaskStarting"},
|
|
|
|
{2, nullptr, "NotifyTaskFinished"},
|
|
|
|
{3, nullptr, "GetTriggerEvent"},
|
|
|
|
{4, nullptr, "IsInHalfAwake"},
|
|
|
|
{5, nullptr, "NotifyClientName"},
|
|
|
|
{6, nullptr, "IsInFullAwake"},
|
|
|
|
{11, nullptr, "ScheduleTask"},
|
|
|
|
{12, nullptr, "GetScheduledTaskInterval"},
|
|
|
|
{13, nullptr, "UnscheduleTask"},
|
|
|
|
{14, nullptr, "GetScheduleEvent"},
|
|
|
|
{15, nullptr, "SchedulePeriodicTask"},
|
2021-04-07 17:03:45 +02:00
|
|
|
{16, nullptr, "Unknown16"},
|
2019-06-25 01:20:06 +02:00
|
|
|
{101, nullptr, "GetOperationMode"},
|
|
|
|
{102, nullptr, "WillDisconnectNetworkWhenEnteringSleep"},
|
|
|
|
{103, nullptr, "WillStayHalfAwakeInsteadSleep"},
|
2021-04-07 17:03:45 +02:00
|
|
|
{200, nullptr, "Unknown200"},
|
2019-06-25 01:20:06 +02:00
|
|
|
};
|
|
|
|
// clang-format on
|
|
|
|
|
|
|
|
RegisterHandlers(functions);
|
|
|
|
}
|
|
|
|
|
2021-04-07 17:03:45 +02:00
|
|
|
ITaskService::~ITaskService() = default;
|
2019-06-25 01:20:06 +02:00
|
|
|
|
2020-11-26 21:19:08 +01:00
|
|
|
BGTC_SC::BGTC_SC(Core::System& system_) : ServiceFramework{system_, "bgtc:sc"} {
|
2019-06-25 01:20:06 +02:00
|
|
|
// clang-format off
|
|
|
|
static const FunctionInfo functions[] = {
|
|
|
|
{1, nullptr, "GetState"},
|
|
|
|
{2, nullptr, "GetStateChangedEvent"},
|
|
|
|
{3, nullptr, "NotifyEnteringHalfAwake"},
|
|
|
|
{4, nullptr, "NotifyLeavingHalfAwake"},
|
|
|
|
{5, nullptr, "SetIsUsingSleepUnsupportedDevices"},
|
|
|
|
};
|
|
|
|
// clang-format on
|
|
|
|
|
|
|
|
RegisterHandlers(functions);
|
|
|
|
}
|
|
|
|
|
|
|
|
BGTC_SC::~BGTC_SC() = default;
|
|
|
|
|
|
|
|
} // namespace Service::Glue
|