diff options
| author | Liam <byteslice@airmail.cc> | 2024-02-17 12:00:15 -0500 |
|---|---|---|
| committer | Liam <byteslice@airmail.cc> | 2024-02-18 10:32:21 -0500 |
| commit | 04887953ff98ad4c10bcbffd13dc44480fa48592 (patch) | |
| tree | e2a82f896b03907028915da909efda07246ad6c1 /src/core/hle/service/ns/ns.cpp | |
| parent | 8ea72cc99d13c85821db3868b4672d847d2e6208 (diff) | |
ns: rewrite IContentManagementInterface
Diffstat (limited to 'src/core/hle/service/ns/ns.cpp')
| -rw-r--r-- | src/core/hle/service/ns/ns.cpp | 43 |
1 files changed, 1 insertions, 42 deletions
diff --git a/src/core/hle/service/ns/ns.cpp b/src/core/hle/service/ns/ns.cpp index 5188699ad..e8b13213d 100644 --- a/src/core/hle/service/ns/ns.cpp +++ b/src/core/hle/service/ns/ns.cpp @@ -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 |
