2020-03-25 04:14:35 -04:00
|
|
|
|
using LibHac;
|
|
|
|
|
using Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy;
|
|
|
|
|
|
|
|
|
|
namespace Ryujinx.HLE.HOS.Services.Fs
|
|
|
|
|
{
|
|
|
|
|
class IMultiCommitManager : IpcService // 6.0.0+
|
|
|
|
|
{
|
2020-09-01 16:08:59 -04:00
|
|
|
|
private LibHac.FsSrv.IMultiCommitManager _baseCommitManager;
|
2020-03-25 04:14:35 -04:00
|
|
|
|
|
2020-09-01 16:08:59 -04:00
|
|
|
|
public IMultiCommitManager(LibHac.FsSrv.IMultiCommitManager baseCommitManager)
|
2020-03-25 04:14:35 -04:00
|
|
|
|
{
|
|
|
|
|
_baseCommitManager = baseCommitManager;
|
|
|
|
|
}
|
|
|
|
|
|
2021-04-13 18:01:24 -04:00
|
|
|
|
[CommandHipc(1)] // 6.0.0+
|
2020-03-25 04:14:35 -04:00
|
|
|
|
// Add(object<nn::fssrv::sf::IFileSystem>)
|
|
|
|
|
public ResultCode Add(ServiceCtx context)
|
|
|
|
|
{
|
|
|
|
|
IFileSystem fileSystem = GetObject<IFileSystem>(context, 0);
|
|
|
|
|
|
|
|
|
|
Result result = _baseCommitManager.Add(fileSystem.GetBaseFileSystem());
|
|
|
|
|
|
|
|
|
|
return (ResultCode)result.Value;
|
|
|
|
|
}
|
|
|
|
|
|
2021-04-13 18:01:24 -04:00
|
|
|
|
[CommandHipc(2)] // 6.0.0+
|
2020-03-25 04:14:35 -04:00
|
|
|
|
// Commit()
|
|
|
|
|
public ResultCode Commit(ServiceCtx context)
|
|
|
|
|
{
|
|
|
|
|
Result result = _baseCommitManager.Commit();
|
|
|
|
|
|
|
|
|
|
return (ResultCode)result.Value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|