mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-28 23:15:28 +03:00
Stub IDeliveryCacheFileService and IDeliveryCacheDirectoryService
This commit is contained in:
parent
299d11d86f
commit
c53d99d393
@ -296,6 +296,8 @@ add_library(skyline SHARED
|
|||||||
${source_DIR}/skyline/services/am/applet/IApplet.cpp
|
${source_DIR}/skyline/services/am/applet/IApplet.cpp
|
||||||
${source_DIR}/skyline/services/bcat/IBcatService.cpp
|
${source_DIR}/skyline/services/bcat/IBcatService.cpp
|
||||||
${source_DIR}/skyline/services/bcat/IDeliveryCacheStorageService.cpp
|
${source_DIR}/skyline/services/bcat/IDeliveryCacheStorageService.cpp
|
||||||
|
${source_DIR}/skyline/services/bcat/IDeliveryCacheFileService.cpp
|
||||||
|
${source_DIR}/skyline/services/bcat/IDeliveryCacheDirectoryService.cpp
|
||||||
${source_DIR}/skyline/services/bcat/IServiceCreator.cpp
|
${source_DIR}/skyline/services/bcat/IServiceCreator.cpp
|
||||||
${source_DIR}/skyline/services/bt/IBluetoothUser.cpp
|
${source_DIR}/skyline/services/bt/IBluetoothUser.cpp
|
||||||
${source_DIR}/skyline/services/btm/IBtmUser.cpp
|
${source_DIR}/skyline/services/btm/IBtmUser.cpp
|
||||||
|
@ -0,0 +1,20 @@
|
|||||||
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
// Copyright © 2023 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
||||||
|
|
||||||
|
#include "IDeliveryCacheDirectoryService.h"
|
||||||
|
|
||||||
|
namespace skyline::service::bcat {
|
||||||
|
IDeliveryCacheDirectoryService::IDeliveryCacheDirectoryService(const DeviceState &state, ServiceManager &manager) : BaseService(state, manager) {}
|
||||||
|
|
||||||
|
Result IDeliveryCacheDirectoryService::Open(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||||
|
const auto dir_name{request.PopString(0x20)};
|
||||||
|
|
||||||
|
Logger::Debug("Directory name = {}", dir_name);
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
|
Result IDeliveryCacheDirectoryService::GetCount(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||||
|
response.Push(static_cast<u32>(0));
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
// Copyright © 2023 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <services/serviceman.h>
|
||||||
|
|
||||||
|
namespace skyline::service::bcat {
|
||||||
|
/**
|
||||||
|
* @brief IDeliveryCacheDirectoryService is used to access BCAT directories
|
||||||
|
* @url https://switchbrew.org/wiki/BCAT_services#IDeliveryCacheDirectoryService
|
||||||
|
*/
|
||||||
|
class IDeliveryCacheDirectoryService : public BaseService {
|
||||||
|
public:
|
||||||
|
IDeliveryCacheDirectoryService(const DeviceState &state, ServiceManager &manager);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Given a DirectoryName, opens that directory
|
||||||
|
* @url https://switchbrew.org/wiki/BCAT_services#IDeliveryCacheDirectoryService
|
||||||
|
*/
|
||||||
|
Result Open (type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Returns the number (u32) of elements inside the directory (u64)
|
||||||
|
* @url https://switchbrew.org/wiki/BCAT_services#IDeliveryCacheDirectoryService
|
||||||
|
*/
|
||||||
|
Result GetCount (type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||||
|
|
||||||
|
SERVICE_DECL(
|
||||||
|
SFUNC(0x0, IDeliveryCacheDirectoryService, Open),
|
||||||
|
SFUNC(0x2, IDeliveryCacheDirectoryService, GetCount)
|
||||||
|
)
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
// Copyright © 2023 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
||||||
|
|
||||||
|
#include "IDeliveryCacheFileService.h"
|
||||||
|
|
||||||
|
namespace skyline::service::bcat {
|
||||||
|
IDeliveryCacheFileService::IDeliveryCacheFileService(const DeviceState &state, ServiceManager &manager) : BaseService(state, manager) {}
|
||||||
|
|
||||||
|
Result IDeliveryCacheFileService::Open(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||||
|
const auto dir_name{request.PopString(0x20)};
|
||||||
|
const auto file_name{request.PopString(0x20)};
|
||||||
|
|
||||||
|
Logger::Debug("Directory name = {}, File name = {}", dir_name, file_name);
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
|
Result IDeliveryCacheFileService::GetSize(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||||
|
response.Push(static_cast<u64>(0));
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
// Copyright © 2023 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <services/serviceman.h>
|
||||||
|
|
||||||
|
namespace skyline::service::bcat {
|
||||||
|
/**
|
||||||
|
* @brief IDeliveryCacheFileService is used to access BCAT files
|
||||||
|
* @url https://switchbrew.org/wiki/BCAT_services#IDeliveryCacheFileService
|
||||||
|
*/
|
||||||
|
class IDeliveryCacheFileService : public BaseService {
|
||||||
|
public:
|
||||||
|
IDeliveryCacheFileService(const DeviceState &state, ServiceManager &manager);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Given a DirectoryName and a FileName, opens the desired file
|
||||||
|
* @url https://switchbrew.org/wiki/BCAT_services#IDeliveryCacheFileService
|
||||||
|
*/
|
||||||
|
Result Open (type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Returns the size (u64) of the file
|
||||||
|
* @url https://switchbrew.org/wiki/BCAT_services#IDeliveryCacheFileService
|
||||||
|
*/
|
||||||
|
Result GetSize (type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||||
|
|
||||||
|
SERVICE_DECL(
|
||||||
|
SFUNC(0x0, IDeliveryCacheFileService, Open),
|
||||||
|
SFUNC(0x2, IDeliveryCacheFileService, GetSize)
|
||||||
|
)
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user