diff --git a/app/src/main/cpp/skyline/services/bcat/IDeliveryCacheStorageService.cpp b/app/src/main/cpp/skyline/services/bcat/IDeliveryCacheStorageService.cpp index e73bddc0..c072a51f 100644 --- a/app/src/main/cpp/skyline/services/bcat/IDeliveryCacheStorageService.cpp +++ b/app/src/main/cpp/skyline/services/bcat/IDeliveryCacheStorageService.cpp @@ -2,7 +2,24 @@ // Copyright © 2022 Skyline Team and Contributors (https://github.com/skyline-emu/) #include "IDeliveryCacheStorageService.h" +#include "IDeliveryCacheFileService.h" +#include "IDeliveryCacheDirectoryService.h" namespace skyline::service::bcat { IDeliveryCacheStorageService::IDeliveryCacheStorageService(const DeviceState &state, ServiceManager &manager) : BaseService(state, manager) {} + + Result IDeliveryCacheStorageService::CreateFileService(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { + manager.RegisterService(SRVREG(IDeliveryCacheFileService), session, response); + return {}; + } + + Result IDeliveryCacheStorageService::CreateDirectoryService(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { + manager.RegisterService(SRVREG(IDeliveryCacheDirectoryService), session, response); + return {}; + } + + Result IDeliveryCacheStorageService::EnumerateDeliveryCacheDirectory(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { + response.Push(static_cast(0)); + return {}; + } } diff --git a/app/src/main/cpp/skyline/services/bcat/IDeliveryCacheStorageService.h b/app/src/main/cpp/skyline/services/bcat/IDeliveryCacheStorageService.h index 9d8175a5..4368ebf9 100644 --- a/app/src/main/cpp/skyline/services/bcat/IDeliveryCacheStorageService.h +++ b/app/src/main/cpp/skyline/services/bcat/IDeliveryCacheStorageService.h @@ -13,5 +13,25 @@ namespace skyline::service::bcat { class IDeliveryCacheStorageService : public BaseService { public: IDeliveryCacheStorageService(const DeviceState &state, ServiceManager &manager); + + /** + * @brief Returns #IDeliveryCacheFileService + * @url https://switchbrew.org/wiki/BCAT_services#IDeliveryCacheStorageService + */ + Result CreateFileService (type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + + /** + * @brief Returns #IDeliveryCacheDirectoryService + * @url https://switchbrew.org/wiki/BCAT_services#IDeliveryCacheStorageService + */ + Result CreateDirectoryService (type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + + Result EnumerateDeliveryCacheDirectory (type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + + SERVICE_DECL( + SFUNC(0x0, IDeliveryCacheStorageService, CreateFileService), + SFUNC(0x1, IDeliveryCacheStorageService, CreateDirectoryService), + SFUNC(0xA, IDeliveryCacheStorageService, EnumerateDeliveryCacheDirectory) + ) }; }