diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 4392c74c..dfb54d49 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -281,8 +281,9 @@ add_library(skyline SHARED ${source_DIR}/skyline/services/am/storage/IStorageAccessor.cpp ${source_DIR}/skyline/services/am/applet/ILibraryAppletAccessor.cpp ${source_DIR}/skyline/services/am/applet/IApplet.cpp - ${source_DIR}/skyline/services/bcat/IServiceCreator.cpp ${source_DIR}/skyline/services/bcat/IBcatService.cpp + ${source_DIR}/skyline/services/bcat/IDeliveryCacheStorageService.cpp + ${source_DIR}/skyline/services/bcat/IServiceCreator.cpp ${source_DIR}/skyline/services/bt/IBluetoothUser.cpp ${source_DIR}/skyline/services/btm/IBtmUser.cpp ${source_DIR}/skyline/services/btm/IBtmUserCore.cpp diff --git a/app/src/main/cpp/skyline/services/bcat/IDeliveryCacheStorageService.cpp b/app/src/main/cpp/skyline/services/bcat/IDeliveryCacheStorageService.cpp new file mode 100644 index 00000000..e73bddc0 --- /dev/null +++ b/app/src/main/cpp/skyline/services/bcat/IDeliveryCacheStorageService.cpp @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: MPL-2.0 +// Copyright © 2022 Skyline Team and Contributors (https://github.com/skyline-emu/) + +#include "IDeliveryCacheStorageService.h" + +namespace skyline::service::bcat { + IDeliveryCacheStorageService::IDeliveryCacheStorageService(const DeviceState &state, ServiceManager &manager) : BaseService(state, manager) {} +} diff --git a/app/src/main/cpp/skyline/services/bcat/IDeliveryCacheStorageService.h b/app/src/main/cpp/skyline/services/bcat/IDeliveryCacheStorageService.h new file mode 100644 index 00000000..9d8175a5 --- /dev/null +++ b/app/src/main/cpp/skyline/services/bcat/IDeliveryCacheStorageService.h @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: MPL-2.0 +// Copyright © 2022 Skyline Team and Contributors (https://github.com/skyline-emu/) + +#pragma once + +#include + +namespace skyline::service::bcat { + /** + * @brief IDeliveryCacheStorageService is used to create files instances for BCAT + * @url https://switchbrew.org/wiki/BCAT_services#IDeliveryCacheStorageService + */ + class IDeliveryCacheStorageService : public BaseService { + public: + IDeliveryCacheStorageService(const DeviceState &state, ServiceManager &manager); + }; +} diff --git a/app/src/main/cpp/skyline/services/bcat/IServiceCreator.cpp b/app/src/main/cpp/skyline/services/bcat/IServiceCreator.cpp index 0692851b..32eed335 100644 --- a/app/src/main/cpp/skyline/services/bcat/IServiceCreator.cpp +++ b/app/src/main/cpp/skyline/services/bcat/IServiceCreator.cpp @@ -10,4 +10,9 @@ namespace skyline::service::bcat { manager.RegisterService(SRVREG(IBcatService), session, response); return {}; } + + Result IServiceCreator::CreateDeliveryCacheStorageService(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { + manager.RegisterService(SRVREG(IDeliveryCacheStorageService), session, response); + return {}; + } } diff --git a/app/src/main/cpp/skyline/services/bcat/IServiceCreator.h b/app/src/main/cpp/skyline/services/bcat/IServiceCreator.h index 85d3a6a3..fd6d8838 100644 --- a/app/src/main/cpp/skyline/services/bcat/IServiceCreator.h +++ b/app/src/main/cpp/skyline/services/bcat/IServiceCreator.h @@ -5,6 +5,7 @@ #include #include "IBcatService.h" +#include "IDeliveryCacheStorageService.h" namespace skyline::service::bcat { /** @@ -21,8 +22,15 @@ namespace skyline::service::bcat { */ Result CreateBcatService(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + /** + * @brief Takes an input u64 ProcessId, returns an #IDeliveryCacheStorageService + * @url https://switchbrew.org/wiki/BCAT_services#bcat:a.2C_bcat:m.2C_bcat:u.2C_bcat:s + */ + Result CreateDeliveryCacheStorageService(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + SERVICE_DECL( - SFUNC(0x0, IServiceCreator, CreateBcatService) + SFUNC(0x0, IServiceCreator, CreateBcatService), + SFUNC(0x1, IServiceCreator, CreateDeliveryCacheStorageService) ) }; }