2018-06-10 19:11:05 +02:00
|
|
|
/**
|
|
|
|
* @file fs_shim.h
|
|
|
|
* @brief Filesystem Services (fs) IPC wrapper. To be merged into libnx, eventually.
|
|
|
|
* @author SciresM
|
|
|
|
* @copyright libnx Authors
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <switch.h>
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* TODO: Reverse this more. */
|
|
|
|
typedef struct {
|
|
|
|
u32 flags[0x40/sizeof(u32)];
|
|
|
|
} FsRangeInfo;
|
|
|
|
|
|
|
|
/* Missing fsp-srv commands. */
|
2018-11-15 03:39:48 +01:00
|
|
|
Result fsOpenBisStorageFwd(Service* s, FsStorage* out, u32 PartitionId);
|
2018-06-15 01:50:01 +02:00
|
|
|
Result fsOpenDataStorageByCurrentProcessFwd(Service* s, FsStorage* out);
|
2018-10-16 22:33:45 +02:00
|
|
|
Result fsOpenDataStorageByDataIdFwd(Service* s, FsStorageId storage_id, u64 data_id, FsStorage* out);
|
2019-03-26 19:53:30 +01:00
|
|
|
Result fsOpenFileSystemWithPatchFwd(Service* s, FsFileSystem* out, u64 titleId, FsFileSystemType fsType);
|
|
|
|
Result fsOpenFileSystemWithIdFwd(Service* s, FsFileSystem* out, u64 titleId, FsFileSystemType fsType, const char* contentPath);
|
2019-04-05 22:36:38 +02:00
|
|
|
Result fsOpenSaveDataFileSystemFwd(Service* s, FsFileSystem* out, u8 inval, FsSave *save);
|
2018-06-10 19:11:05 +02:00
|
|
|
|
|
|
|
/* Missing FS File commands. */
|
|
|
|
Result fsFileOperateRange(FsFile* f, u32 op_id, u64 off, u64 len, FsRangeInfo *out);
|
|
|
|
|
|
|
|
/* Missing FS Storage commands. */
|
|
|
|
Result fsStorageOperateRange(FsStorage* s, u32 op_id, u64 off, u64 len, FsRangeInfo *out);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|