mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 13:25:45 +00:00
ns: rewrite IContentManagementInterface
This commit is contained in:
parent
1452c2a605
commit
d932c9b608
6 changed files with 114 additions and 52 deletions
|
@ -13,6 +13,7 @@
|
|||
#include "core/hle/service/ipc_helpers.h"
|
||||
#include "core/hle/service/ns/account_proxy_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/ecommerce_interface.h"
|
||||
#include "core/hle/service/ns/factory_reset_interface.h"
|
||||
#include "core/hle/service/ns/language.h"
|
||||
|
@ -464,48 +465,6 @@ Result IApplicationManagerInterface::ConvertApplicationLanguageToLanguageCode(
|
|||
return ResultSuccess;
|
||||
}
|
||||
|
||||
IContentManagementInterface::IContentManagementInterface(Core::System& system_)
|
||||
: ServiceFramework{system_, "IContentManagementInterface"} {
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
{11, nullptr, "CalculateApplicationOccupiedSize"},
|
||||
{43, nullptr, "CheckSdCardMountStatus"},
|
||||
{47, &IContentManagementInterface::GetTotalSpaceSize, "GetTotalSpaceSize"},
|
||||
{48, &IContentManagementInterface::GetFreeSpaceSize, "GetFreeSpaceSize"},
|
||||
{600, nullptr, "CountApplicationContentMeta"},
|
||||
{601, nullptr, "ListApplicationContentMetaStatus"},
|
||||
{605, nullptr, "ListApplicationContentMetaStatusWithRightsCheck"},
|
||||
{607, nullptr, "IsAnyApplicationRunning"},
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
IContentManagementInterface::~IContentManagementInterface() = default;
|
||||
|
||||
void IContentManagementInterface::GetTotalSpaceSize(HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp{ctx};
|
||||
const auto storage{rp.PopEnum<FileSys::StorageId>()};
|
||||
|
||||
LOG_INFO(Service_Capture, "called, storage={}", storage);
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 4};
|
||||
rb.Push(ResultSuccess);
|
||||
rb.Push<u64>(system.GetFileSystemController().GetTotalSpaceSize(storage));
|
||||
}
|
||||
|
||||
void IContentManagementInterface::GetFreeSpaceSize(HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp{ctx};
|
||||
const auto storage{rp.PopEnum<FileSys::StorageId>()};
|
||||
|
||||
LOG_INFO(Service_Capture, "called, storage={}", storage);
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 4};
|
||||
rb.Push(ResultSuccess);
|
||||
rb.Push<u64>(system.GetFileSystemController().GetFreeSpaceSize(storage));
|
||||
}
|
||||
|
||||
IDocumentInterface::IDocumentInterface(Core::System& system_)
|
||||
: ServiceFramework{system_, "IDocumentInterface"} {
|
||||
// clang-format off
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue