mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
fs: Add fsOpenSaveDataInfoReaderWithFilter
This commit is contained in:
parent
04aa28c436
commit
e6c7ac7c0b
@ -122,6 +122,18 @@ typedef struct {
|
|||||||
u8 unk_x3b[0x25]; ///< Unknown. Usually zeros?
|
u8 unk_x3b[0x25]; ///< Unknown. Usually zeros?
|
||||||
} FsSaveDataInfo;
|
} FsSaveDataInfo;
|
||||||
|
|
||||||
|
/// SaveDataFilter
|
||||||
|
typedef struct {
|
||||||
|
bool filter_by_application_id; ///< Filter by \ref FsSaveDataAttribute::application_id
|
||||||
|
bool filter_by_save_data_type; ///< Filter by \ref FsSaveDataAttribute::save_data_type
|
||||||
|
bool filter_by_user_id; ///< Filter by \ref FsSaveDataAttribute::uid
|
||||||
|
bool filter_by_system_save_data_id; ///< Filter by \ref FsSaveDataAttribute::system_save_data_id
|
||||||
|
bool filter_by_index; ///< Filter by \ref FsSaveDataAttribute::save_data_index
|
||||||
|
u8 save_data_rank; ///< \ref FsSaveDataRank
|
||||||
|
u8 padding[0x2]; ///< Padding
|
||||||
|
FsSaveDataAttribute attr; ///< \ref FsSaveDataAttribute
|
||||||
|
} FsSaveDataFilter;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u64 created; ///< POSIX timestamp.
|
u64 created; ///< POSIX timestamp.
|
||||||
u64 modified; ///< POSIX timestamp.
|
u64 modified; ///< POSIX timestamp.
|
||||||
@ -368,6 +380,8 @@ Result fsWriteSaveDataFileSystemExtraData(const void* buf, size_t len, FsSaveDat
|
|||||||
|
|
||||||
Result fsOpenSaveDataInfoReader(FsSaveDataInfoReader* out, FsSaveDataSpaceId save_data_space_id);
|
Result fsOpenSaveDataInfoReader(FsSaveDataInfoReader* out, FsSaveDataSpaceId save_data_space_id);
|
||||||
|
|
||||||
|
Result fsOpenSaveDataInfoReaderWithFilter(FsSaveDataInfoReader* out, FsSaveDataSpaceId save_data_space_id, const FsSaveDataFilter *save_data_filter); ///< [6.0.0+]
|
||||||
|
|
||||||
Result fsOpenImageDirectoryFileSystem(FsFileSystem* out, FsImageDirectoryId image_directory_id);
|
Result fsOpenImageDirectoryFileSystem(FsFileSystem* out, FsImageDirectoryId image_directory_id);
|
||||||
Result fsOpenContentStorageFileSystem(FsFileSystem* out, FsContentStorageId content_storage_id);
|
Result fsOpenContentStorageFileSystem(FsFileSystem* out, FsContentStorageId content_storage_id);
|
||||||
Result fsOpenCustomStorageFileSystem(FsFileSystem* out, FsCustomStorageId custom_storage_id); ///< [7.0.0+]
|
Result fsOpenCustomStorageFileSystem(FsFileSystem* out, FsCustomStorageId custom_storage_id); ///< [7.0.0+]
|
||||||
|
@ -434,6 +434,19 @@ Result fsOpenSaveDataInfoReader(FsSaveDataInfoReader* out, FsSaveDataSpaceId sav
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result fsOpenSaveDataInfoReaderWithFilter(FsSaveDataInfoReader* out, FsSaveDataSpaceId save_data_space_id, const FsSaveDataFilter *save_data_filter) {
|
||||||
|
const struct {
|
||||||
|
u8 save_data_space_id;
|
||||||
|
u8 pad[7];
|
||||||
|
FsSaveDataFilter save_data_filter;
|
||||||
|
} in = { (u8)save_data_space_id, {0}, *save_data_filter };
|
||||||
|
|
||||||
|
return _fsObjectDispatchIn(&g_fsSrv, 68, in,
|
||||||
|
.out_num_objects = 1,
|
||||||
|
.out_objects = &out->s,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Result fsOpenImageDirectoryFileSystem(FsFileSystem* out, FsImageDirectoryId image_directory_id) {
|
Result fsOpenImageDirectoryFileSystem(FsFileSystem* out, FsImageDirectoryId image_directory_id) {
|
||||||
u32 tmp=image_directory_id;
|
u32 tmp=image_directory_id;
|
||||||
return _fsObjectDispatchIn(&g_fsSrv, 100, tmp,
|
return _fsObjectDispatchIn(&g_fsSrv, 100, tmp,
|
||||||
|
Loading…
Reference in New Issue
Block a user