mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
Add missing IFileSystemProxy methods
This commit is contained in:
parent
e9ffc5a5e6
commit
7b38708c11
5 changed files with 150 additions and 5 deletions
13
src/LibHac/Fs/AccessLog.cs
Normal file
13
src/LibHac/Fs/AccessLog.cs
Normal file
|
@ -0,0 +1,13 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace LibHac.Fs
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Size = 0x20)]
|
||||
public struct ApplicationInfo
|
||||
{
|
||||
public Ncm.ApplicationId ApplicationId;
|
||||
public uint Version;
|
||||
public byte LaunchType;
|
||||
public bool IsMultiProgram;
|
||||
}
|
||||
}
|
|
@ -115,6 +115,13 @@ namespace LibHac.Fs
|
|||
SdCard = 1
|
||||
}
|
||||
|
||||
public enum BaseFileSystemId
|
||||
{
|
||||
ImageDirectoryNand = 0,
|
||||
ImageDirectorySdCard = 1,
|
||||
TemporaryDirectory = 2
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specifies which operations are available on an <see cref="IFile"/>.
|
||||
/// </summary>
|
||||
|
@ -197,4 +204,11 @@ namespace LibHac.Fs
|
|||
Inserted = 1,
|
||||
NotInserted = 2
|
||||
}
|
||||
|
||||
public enum FsStackUsageThreadType
|
||||
{
|
||||
MainThread = 0,
|
||||
IpcWorker = 1,
|
||||
PipelineWorker = 2
|
||||
}
|
||||
}
|
||||
|
|
21
src/LibHac/Fs/MemoryReportInfo.cs
Normal file
21
src/LibHac/Fs/MemoryReportInfo.cs
Normal file
|
@ -0,0 +1,21 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace LibHac.Fs
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Size = 0x80)]
|
||||
public struct MemoryReportInfo
|
||||
{
|
||||
long PooledBufferFreeSizePeak;
|
||||
long PooledBufferRetriedCount;
|
||||
long PooledBufferReduceAllocationCount;
|
||||
long BufferManagerFreeSizePeak;
|
||||
long BufferManagerRetiredCount;
|
||||
long ExpHeapFreeSizePeak;
|
||||
long BufferPoolFreeSizePeak;
|
||||
long PatrolAllocateSuccessCount;
|
||||
long PatrolAllocateFailureCount;
|
||||
long BufferManagerTotalAllocatableSizePeak;
|
||||
long BufferPoolAllocateSizeMax;
|
||||
};
|
||||
|
||||
}
|
|
@ -381,6 +381,12 @@ namespace LibHac.FsSrv
|
|||
return GetBaseFileSystemService().OpenImageDirectoryFileSystem(out fileSystem, directoryId);
|
||||
}
|
||||
|
||||
public Result OpenBaseFileSystem(out ReferenceCountedDisposable<IFileSystemSf> fileSystem,
|
||||
BaseFileSystemId fileSystemId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Result OpenBisFileSystem(out ReferenceCountedDisposable<IFileSystemSf> fileSystem, in FspPath rootPath,
|
||||
BisPartitionId partitionId)
|
||||
{
|
||||
|
@ -630,6 +636,35 @@ namespace LibHac.FsSrv
|
|||
return saveFsService.GetCacheStorageSize(out dataSize, out journalSize, index);
|
||||
}
|
||||
|
||||
public Result OpenSaveDataTransferManager(out ReferenceCountedDisposable<ISaveDataTransferManager> manager)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Result OpenSaveDataTransferManagerVersion2(
|
||||
out ReferenceCountedDisposable<ISaveDataTransferManagerWithDivision> manager)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Result OpenSaveDataTransferManagerForSaveDataRepair(
|
||||
out ReferenceCountedDisposable<ISaveDataTransferManagerForSaveDataRepair> manager)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Result OpenSaveDataTransferManagerForRepair(
|
||||
out ReferenceCountedDisposable<ISaveDataTransferManagerForRepair> manager)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Result OpenSaveDataTransferProhibiter(
|
||||
out ReferenceCountedDisposable<ISaveDataTransferProhibiter> prohibiter, Ncm.ApplicationId applicationId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Result ListAccessibleSaveDataOwnerId(out int readCount, OutBuffer idBuffer, ProgramId programId,
|
||||
int startIndex, int bufferIdCount)
|
||||
{
|
||||
|
@ -826,6 +861,11 @@ namespace LibHac.FsSrv
|
|||
return ncaFsService.SetSdCardEncryptionSeed(in seed);
|
||||
}
|
||||
|
||||
public Result GetAndClearErrorInfo(out FileSystemProxyErrorInfo errorInfo)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Result RegisterProgramIndexMapInfo(InBuffer programIndexMapInfoBuffer, int programCount)
|
||||
{
|
||||
return GetProgramIndexRegistryService()
|
||||
|
@ -914,6 +954,16 @@ namespace LibHac.FsSrv
|
|||
return GetAccessLogService().OutputMultiProgramTagAccessLog();
|
||||
}
|
||||
|
||||
public Result OutputApplicationInfoAccessLog(in ApplicationInfo applicationInfo)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Result FlushAccessLogOnSdCard()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Result RegisterUpdatePartition()
|
||||
{
|
||||
Result rc = GetNcaFileSystemService(out NcaFileSystemService ncaFsService);
|
||||
|
@ -934,6 +984,16 @@ namespace LibHac.FsSrv
|
|||
return ncaFsService.OpenRegisteredUpdatePartition(out fileSystem);
|
||||
}
|
||||
|
||||
public Result GetAndClearMemoryReportInfo(out MemoryReportInfo report)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Result GetFsStackUsage(out uint stackUsage, FsStackUsageThreadType threadType)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Result OverrideSaveDataTransferTokenSignVerificationKey(InBuffer key)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
|
@ -957,6 +1017,32 @@ namespace LibHac.FsSrv
|
|||
return saveFsService.IsSdCardAccessible(out isAccessible);
|
||||
}
|
||||
|
||||
public Result OpenAccessFailureDetectionEventNotifier(out ReferenceCountedDisposable<IEventNotifier> notifier,
|
||||
ulong processId, bool notifyOnDeepRetry)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Result GetAccessFailureDetectionEvent(out NativeHandle eventHandle)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Result IsAccessFailureDetected(out bool isDetected, ulong processId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Result ResolveAccessFailure(ulong processId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Result AbandonAccessFailure(ulong processId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Result OpenMultiCommitManager(out ReferenceCountedDisposable<IMultiCommitManager> commitManager)
|
||||
{
|
||||
commitManager = null;
|
||||
|
|
|
@ -54,10 +54,15 @@ namespace LibHac.FsSrv.Sf
|
|||
Result WriteSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(in SaveDataAttribute attribute, SaveDataSpaceId spaceId, InBuffer extraDataBuffer, InBuffer maskBuffer);
|
||||
Result ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(OutBuffer extraDataBuffer, SaveDataSpaceId spaceId, in SaveDataAttribute attribute, InBuffer maskBuffer);
|
||||
Result OpenSaveDataMetaFile(out ReferenceCountedDisposable<IFileSf> file, SaveDataSpaceId spaceId, in SaveDataAttribute attribute, SaveDataMetaType type);
|
||||
|
||||
Result OpenSaveDataTransferManager(out ReferenceCountedDisposable<ISaveDataTransferManager> manager);
|
||||
Result OpenSaveDataTransferManagerVersion2(out ReferenceCountedDisposable<ISaveDataTransferManagerWithDivision> manager);
|
||||
Result OpenSaveDataTransferProhibiter(out ReferenceCountedDisposable<ISaveDataTransferProhibiter> prohibiter, Ncm.ApplicationId applicationId);
|
||||
Result ListAccessibleSaveDataOwnerId(out int readCount, OutBuffer idBuffer, ProgramId programId, int startIndex, int bufferIdCount);
|
||||
Result OpenSaveDataTransferManagerForSaveDataRepair(out ReferenceCountedDisposable<ISaveDataTransferManagerForSaveDataRepair> manager);
|
||||
Result OpenSaveDataMover(out ReferenceCountedDisposable<ISaveDataMover> saveMover, SaveDataSpaceId sourceSpaceId, SaveDataSpaceId destinationSpaceId, NativeHandle workBufferHandle, ulong workBufferSize);
|
||||
Result OpenSaveDataTransferManagerForRepair(out ReferenceCountedDisposable<ISaveDataTransferManagerForRepair> manager);
|
||||
Result OpenImageDirectoryFileSystem(out ReferenceCountedDisposable<IFileSystemSf> fileSystem, ImageDirectoryId directoryId);
|
||||
Result OpenBaseFileSystem(out ReferenceCountedDisposable<IFileSystemSf> fileSystem, BaseFileSystemId fileSystemId);
|
||||
Result OpenContentStorageFileSystem(out ReferenceCountedDisposable<IFileSystemSf> fileSystem, ContentStorageId storageId);
|
||||
Result OpenCloudBackupWorkStorageFileSystem(out ReferenceCountedDisposable<IFileSystemSf> fileSystem, CloudBackupWorkStorageId storageId);
|
||||
Result OpenCustomStorageFileSystem(out ReferenceCountedDisposable<IFileSystemSf> fileSystem, CustomStorageId storageId);
|
||||
|
@ -68,13 +73,11 @@ namespace LibHac.FsSrv.Sf
|
|||
Result OpenDataFileSystemWithProgramIndex(out ReferenceCountedDisposable<IFileSystemSf> fileSystem, byte programIndex);
|
||||
Result OpenDataStorageWithProgramIndex(out ReferenceCountedDisposable<IStorageSf> storage, byte programIndex);
|
||||
Result OpenDeviceOperator(out ReferenceCountedDisposable<IDeviceOperator> deviceOperator);
|
||||
|
||||
Result OpenSdCardDetectionEventNotifier(out ReferenceCountedDisposable<IEventNotifier> eventNotifier);
|
||||
Result OpenGameCardDetectionEventNotifier(out ReferenceCountedDisposable<IEventNotifier> eventNotifier);
|
||||
Result OpenSystemDataUpdateEventNotifier(out ReferenceCountedDisposable<IEventNotifier> eventNotifier);
|
||||
Result NotifySystemDataUpdateEvent();
|
||||
Result SimulateDeviceDetectionEvent(SdmmcPort port, SimulatingDeviceDetectionMode mode, bool signalEvent);
|
||||
|
||||
Result QuerySaveDataTotalSize(out long totalSize, long dataSize, long journalSize);
|
||||
Result VerifySaveDataFileSystem(ulong saveDataId, OutBuffer readBuffer);
|
||||
Result CorruptSaveDataFileSystem(ulong saveDataId);
|
||||
|
@ -95,7 +98,12 @@ namespace LibHac.FsSrv.Sf
|
|||
Result SetSdCardEncryptionSeed(in EncryptionSeed seed);
|
||||
Result SetSdCardAccessibility(bool isAccessible);
|
||||
Result IsSdCardAccessible(out bool isAccessible);
|
||||
|
||||
Result OpenAccessFailureDetectionEventNotifier(out ReferenceCountedDisposable<IEventNotifier> notifier, ulong processId, bool notifyOnDeepRetry);
|
||||
Result GetAccessFailureDetectionEvent(out NativeHandle eventHandle);
|
||||
Result IsAccessFailureDetected(out bool isDetected, ulong processId);
|
||||
Result ResolveAccessFailure(ulong processId);
|
||||
Result AbandonAccessFailure(ulong processId);
|
||||
Result GetAndClearErrorInfo(out FileSystemProxyErrorInfo errorInfo);
|
||||
Result RegisterProgramIndexMapInfo(InBuffer programIndexMapInfoBuffer, int programCount);
|
||||
Result SetBisRootForHost(BisPartitionId partitionId, in FspPath path);
|
||||
Result SetSaveDataSize(long saveDataSize, long saveDataJournalSize);
|
||||
|
@ -106,9 +114,12 @@ namespace LibHac.FsSrv.Sf
|
|||
Result OutputAccessLogToSdCard(InBuffer textBuffer);
|
||||
Result RegisterUpdatePartition();
|
||||
Result OpenRegisteredUpdatePartition(out ReferenceCountedDisposable<IFileSystemSf> fileSystem);
|
||||
|
||||
Result GetAndClearMemoryReportInfo(out MemoryReportInfo report);
|
||||
Result GetProgramIndexForAccessLog(out int programIndex, out int programCount);
|
||||
Result GetFsStackUsage(out uint stackUsage, FsStackUsageThreadType threadType);
|
||||
Result UnsetSaveDataRootPath();
|
||||
Result FlushAccessLogOnSdCard();
|
||||
Result OutputApplicationInfoAccessLog(in ApplicationInfo applicationInfo);
|
||||
Result OutputMultiProgramTagAccessLog();
|
||||
Result OverrideSaveDataTransferTokenSignVerificationKey(InBuffer key);
|
||||
Result CorruptSaveDataFileSystemByOffset(SaveDataSpaceId spaceId, ulong saveDataId, long offset);
|
||||
|
|
Loading…
Reference in a new issue