2020-04-19 23:04:05 +02:00
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
2020-03-27 20:36:02 +01:00
|
|
|
// Copyright © 2020 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
|
|
|
|
2020-02-16 21:05:22 +01:00
|
|
|
#include "IFileSystemProxy.h"
|
|
|
|
|
|
|
|
namespace skyline::service::fssrv {
|
|
|
|
IFileSystemProxy::IFileSystemProxy(const DeviceState &state, ServiceManager &manager) : BaseService(state, manager, Service::fssrv_IFileSystemProxy, "fssrv:IFileSystemProxy", {
|
|
|
|
{0x1, SFUNC(IFileSystemProxy::SetCurrentProcess)},
|
|
|
|
{0x12, SFUNC(IFileSystemProxy::OpenSdCardFileSystem)}
|
|
|
|
}) {}
|
|
|
|
|
|
|
|
void IFileSystemProxy::SetCurrentProcess(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
2020-04-22 19:02:27 +02:00
|
|
|
process = request.Pop<pid_t>();
|
2020-02-16 21:05:22 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void IFileSystemProxy::OpenSdCardFileSystem(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
|
|
|
manager.RegisterService(std::make_shared<IFileSystem>(FsType::SdCard, state, manager), session, response);
|
|
|
|
}
|
|
|
|
}
|