2018-06-10 17:11:05 +00: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;
|
|
|
|
|
2018-06-12 22:00:09 +00:00
|
|
|
/* Necessary evils. */
|
|
|
|
Result ipcCopyFromDomain(Handle session, u32 object_id, Service *out);
|
|
|
|
|
2018-06-10 17:11:05 +00:00
|
|
|
/* Missing fsp-srv commands. */
|
2018-06-14 23:50:01 +00:00
|
|
|
Result fsOpenDataStorageByCurrentProcessFwd(Service* s, FsStorage* out);
|
|
|
|
Result fsOpenDataStorageByCurrentProcessFromDomainFwd(Service* s, u32 *out_object_id);
|
2018-06-10 17:11:05 +00:00
|
|
|
Result fsOpenDataStorageByDataId(Service* s, FsStorageId storage_id, u64 data_id, FsStorage* out);
|
2018-06-12 22:00:09 +00:00
|
|
|
Result fsOpenDataStorageByDataIdFromDomain(Service* s, FsStorageId storage_id, u64 data_id, u32 *out_object_id);
|
2018-06-10 17:11:05 +00: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
|