mirror of
https://gitlab.com/suyu-emu/suyu.git
synced 2024-03-15 23:15:44 +00:00
ns: rewrite IDownloadTaskInterface
This commit is contained in:
parent
bb59940b03
commit
db172ba249
|
@ -747,6 +747,8 @@ add_library(core STATIC
|
||||||
hle/service/ns/content_management_interface.h
|
hle/service/ns/content_management_interface.h
|
||||||
hle/service/ns/document_interface.cpp
|
hle/service/ns/document_interface.cpp
|
||||||
hle/service/ns/document_interface.h
|
hle/service/ns/document_interface.h
|
||||||
|
hle/service/ns/download_task_interface.cpp
|
||||||
|
hle/service/ns/download_task_interface.h
|
||||||
hle/service/ns/ecommerce_interface.cpp
|
hle/service/ns/ecommerce_interface.cpp
|
||||||
hle/service/ns/ecommerce_interface.h
|
hle/service/ns/ecommerce_interface.h
|
||||||
hle/service/ns/factory_reset_interface.cpp
|
hle/service/ns/factory_reset_interface.cpp
|
||||||
|
|
39
src/core/hle/service/ns/download_task_interface.cpp
Normal file
39
src/core/hle/service/ns/download_task_interface.cpp
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include "core/hle/service/cmif_serialization.h"
|
||||||
|
#include "core/hle/service/ns/download_task_interface.h"
|
||||||
|
|
||||||
|
namespace Service::NS {
|
||||||
|
|
||||||
|
IDownloadTaskInterface::IDownloadTaskInterface(Core::System& system_)
|
||||||
|
: ServiceFramework{system_, "IDownloadTaskInterface"} {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{701, nullptr, "ClearTaskStatusList"},
|
||||||
|
{702, nullptr, "RequestDownloadTaskList"},
|
||||||
|
{703, nullptr, "RequestEnsureDownloadTask"},
|
||||||
|
{704, nullptr, "ListDownloadTaskStatus"},
|
||||||
|
{705, nullptr, "RequestDownloadTaskListData"},
|
||||||
|
{706, nullptr, "TryCommitCurrentApplicationDownloadTask"},
|
||||||
|
{707, D<&IDownloadTaskInterface::EnableAutoCommit>, "EnableAutoCommit"},
|
||||||
|
{708, D<&IDownloadTaskInterface::DisableAutoCommit>, "DisableAutoCommit"},
|
||||||
|
{709, nullptr, "TriggerDynamicCommitEvent"},
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
|
||||||
|
IDownloadTaskInterface::~IDownloadTaskInterface() = default;
|
||||||
|
|
||||||
|
Result IDownloadTaskInterface::EnableAutoCommit() {
|
||||||
|
LOG_WARNING(Service_NS, "(STUBBED) called");
|
||||||
|
R_SUCCEED();
|
||||||
|
}
|
||||||
|
Result IDownloadTaskInterface::DisableAutoCommit() {
|
||||||
|
LOG_WARNING(Service_NS, "(STUBBED) called");
|
||||||
|
R_SUCCEED();
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Service::NS
|
20
src/core/hle/service/ns/download_task_interface.h
Normal file
20
src/core/hle/service/ns/download_task_interface.h
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "core/hle/service/service.h"
|
||||||
|
|
||||||
|
namespace Service::NS {
|
||||||
|
|
||||||
|
class IDownloadTaskInterface final : public ServiceFramework<IDownloadTaskInterface> {
|
||||||
|
public:
|
||||||
|
explicit IDownloadTaskInterface(Core::System& system_);
|
||||||
|
~IDownloadTaskInterface() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
Result EnableAutoCommit();
|
||||||
|
Result DisableAutoCommit();
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace Service::NS
|
|
@ -15,6 +15,7 @@
|
||||||
#include "core/hle/service/ns/application_version_interface.h"
|
#include "core/hle/service/ns/application_version_interface.h"
|
||||||
#include "core/hle/service/ns/content_management_interface.h"
|
#include "core/hle/service/ns/content_management_interface.h"
|
||||||
#include "core/hle/service/ns/document_interface.h"
|
#include "core/hle/service/ns/document_interface.h"
|
||||||
|
#include "core/hle/service/ns/download_task_interface.h"
|
||||||
#include "core/hle/service/ns/ecommerce_interface.h"
|
#include "core/hle/service/ns/ecommerce_interface.h"
|
||||||
#include "core/hle/service/ns/factory_reset_interface.h"
|
#include "core/hle/service/ns/factory_reset_interface.h"
|
||||||
#include "core/hle/service/ns/language.h"
|
#include "core/hle/service/ns/language.h"
|
||||||
|
@ -466,27 +467,6 @@ Result IApplicationManagerInterface::ConvertApplicationLanguageToLanguageCode(
|
||||||
return ResultSuccess;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
IDownloadTaskInterface::IDownloadTaskInterface(Core::System& system_)
|
|
||||||
: ServiceFramework{system_, "IDownloadTaskInterface"} {
|
|
||||||
// clang-format off
|
|
||||||
static const FunctionInfo functions[] = {
|
|
||||||
{701, nullptr, "ClearTaskStatusList"},
|
|
||||||
{702, nullptr, "RequestDownloadTaskList"},
|
|
||||||
{703, nullptr, "RequestEnsureDownloadTask"},
|
|
||||||
{704, nullptr, "ListDownloadTaskStatus"},
|
|
||||||
{705, nullptr, "RequestDownloadTaskListData"},
|
|
||||||
{706, nullptr, "TryCommitCurrentApplicationDownloadTask"},
|
|
||||||
{707, nullptr, "EnableAutoCommit"},
|
|
||||||
{708, nullptr, "DisableAutoCommit"},
|
|
||||||
{709, nullptr, "TriggerDynamicCommitEvent"},
|
|
||||||
};
|
|
||||||
// clang-format on
|
|
||||||
|
|
||||||
RegisterHandlers(functions);
|
|
||||||
}
|
|
||||||
|
|
||||||
IDownloadTaskInterface::~IDownloadTaskInterface() = default;
|
|
||||||
|
|
||||||
IReadOnlyApplicationRecordInterface::IReadOnlyApplicationRecordInterface(Core::System& system_)
|
IReadOnlyApplicationRecordInterface::IReadOnlyApplicationRecordInterface(Core::System& system_)
|
||||||
: ServiceFramework{system_, "IReadOnlyApplicationRecordInterface"} {
|
: ServiceFramework{system_, "IReadOnlyApplicationRecordInterface"} {
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
|
|
|
@ -32,12 +32,6 @@ private:
|
||||||
void ConvertApplicationLanguageToLanguageCode(HLERequestContext& ctx);
|
void ConvertApplicationLanguageToLanguageCode(HLERequestContext& ctx);
|
||||||
};
|
};
|
||||||
|
|
||||||
class IDownloadTaskInterface final : public ServiceFramework<IDownloadTaskInterface> {
|
|
||||||
public:
|
|
||||||
explicit IDownloadTaskInterface(Core::System& system_);
|
|
||||||
~IDownloadTaskInterface() override;
|
|
||||||
};
|
|
||||||
|
|
||||||
class IReadOnlyApplicationRecordInterface final
|
class IReadOnlyApplicationRecordInterface final
|
||||||
: public ServiceFramework<IReadOnlyApplicationRecordInterface> {
|
: public ServiceFramework<IReadOnlyApplicationRecordInterface> {
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in a new issue