Update FileSystemProxyImpl to 13.1.0

This commit is contained in:
Alex Barney 2022-01-19 15:28:14 -07:00
parent ed6a34d857
commit ebc6e1b23d
3 changed files with 22 additions and 2 deletions

View file

@ -55,9 +55,9 @@ internal struct FileSystemProxyImplGlobals
} }
/// <summary> /// <summary>
/// Dispatches calls to the main file system service interface. /// Dispatches calls to the various file system service objects.
/// </summary> /// </summary>
/// <remarks>Based on FS 12.1.0 (nnSdk 12.3.1)</remarks> /// <remarks>Based on FS 13.1.0 (nnSdk 13.4.0)</remarks>
public class FileSystemProxyImpl : IFileSystemProxy, IFileSystemProxyForLoader public class FileSystemProxyImpl : IFileSystemProxy, IFileSystemProxyForLoader
{ {
private FileSystemProxyCoreImpl _fsProxyCore; private FileSystemProxyCoreImpl _fsProxyCore;
@ -251,6 +251,15 @@ public class FileSystemProxyImpl : IFileSystemProxy, IFileSystemProxyForLoader
return ncaFsService.OpenDataStorageByDataId(ref outStorage, dataId, storageId); return ncaFsService.OpenDataStorageByDataId(ref outStorage, dataId, storageId);
} }
public Result OpenDataStorageByPath(ref SharedRef<IFileSystemSf> outFileSystem, in FspPath path,
FileSystemProxyType fsType)
{
Result rc = GetNcaFileSystemService(out NcaFileSystemService ncaFsService);
if (rc.IsFailure()) return rc;
return ncaFsService.OpenDataStorageByPath(ref outFileSystem, in path, fsType);
}
public Result OpenPatchDataStorageByCurrentProcess(ref SharedRef<IStorageSf> outStorage) public Result OpenPatchDataStorageByCurrentProcess(ref SharedRef<IStorageSf> outStorage)
{ {
return ResultFs.TargetNotFound.Log(); return ResultFs.TargetNotFound.Log();

View file

@ -178,6 +178,12 @@ internal class NcaFileSystemService : IRomFileSystemAccessFailureManager
throw new NotImplementedException(); throw new NotImplementedException();
} }
public Result OpenDataStorageByPath(ref SharedRef<IFileSystemSf> outFileSystem, in FspPath path,
FileSystemProxyType fsType)
{
throw new NotImplementedException();
}
private Result TryAcquireAddOnContentOpenCountSemaphore(ref UniqueRef<IUniqueLock> outSemaphoreLock) private Result TryAcquireAddOnContentOpenCountSemaphore(ref UniqueRef<IUniqueLock> outSemaphoreLock)
{ {
throw new NotImplementedException(); throw new NotImplementedException();

View file

@ -10,6 +10,10 @@ using IStorageSf = LibHac.FsSrv.Sf.IStorage;
namespace LibHac.FsSrv.Sf; namespace LibHac.FsSrv.Sf;
/// <summary>
/// The interface most programs use to interact with the FS service.
/// </summary>
/// <remarks>Based on FS 13.1.0 (nnSdk 13.4.0)</remarks>
public interface IFileSystemProxy : IDisposable public interface IFileSystemProxy : IDisposable
{ {
Result SetCurrentProcess(ulong processId); Result SetCurrentProcess(ulong processId);
@ -74,6 +78,7 @@ public interface IFileSystemProxy : IDisposable
Result OpenDataStorageByDataId(ref SharedRef<IStorageSf> outStorage, DataId dataId, StorageId storageId); Result OpenDataStorageByDataId(ref SharedRef<IStorageSf> outStorage, DataId dataId, StorageId storageId);
Result OpenPatchDataStorageByCurrentProcess(ref SharedRef<IStorageSf> outStorage); Result OpenPatchDataStorageByCurrentProcess(ref SharedRef<IStorageSf> outStorage);
Result OpenDataFileSystemWithProgramIndex(ref SharedRef<IFileSystemSf> outFileSystem, byte programIndex); Result OpenDataFileSystemWithProgramIndex(ref SharedRef<IFileSystemSf> outFileSystem, byte programIndex);
Result OpenDataStorageByPath(ref SharedRef<IFileSystemSf> outFileSystem, in FspPath path, FileSystemProxyType fsType);
Result OpenDataStorageWithProgramIndex(ref SharedRef<IStorageSf> outStorage, byte programIndex); Result OpenDataStorageWithProgramIndex(ref SharedRef<IStorageSf> outStorage, byte programIndex);
Result OpenDeviceOperator(ref SharedRef<IDeviceOperator> outDeviceOperator); Result OpenDeviceOperator(ref SharedRef<IDeviceOperator> outDeviceOperator);
Result OpenSdCardDetectionEventNotifier(ref SharedRef<IEventNotifier> outEventNotifier); Result OpenSdCardDetectionEventNotifier(ref SharedRef<IEventNotifier> outEventNotifier);