mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-11-22 14:35:43 +01:00
fs: add ISaveDataTransferProhibiter, stub FindSaveDataWithFilter
This commit is contained in:
parent
77107ba124
commit
22b91afa69
@ -623,6 +623,8 @@ add_library(core STATIC
|
|||||||
hle/service/filesystem/fsp/fsp_srv.cpp
|
hle/service/filesystem/fsp/fsp_srv.cpp
|
||||||
hle/service/filesystem/fsp/fsp_srv.h
|
hle/service/filesystem/fsp/fsp_srv.h
|
||||||
hle/service/filesystem/fsp/fsp_types.h
|
hle/service/filesystem/fsp/fsp_types.h
|
||||||
|
hle/service/filesystem/fsp/save_data_transfer_prohibiter.cpp
|
||||||
|
hle/service/filesystem/fsp/save_data_transfer_prohibiter.h
|
||||||
hle/service/filesystem/romfs_controller.cpp
|
hle/service/filesystem/romfs_controller.cpp
|
||||||
hle/service/filesystem/romfs_controller.h
|
hle/service/filesystem/romfs_controller.h
|
||||||
hle/service/filesystem/save_data_controller.cpp
|
hle/service/filesystem/save_data_controller.cpp
|
||||||
|
@ -164,6 +164,19 @@ static_assert(sizeof(SaveDataExtraData) == 0x200, "SaveDataExtraData has invalid
|
|||||||
static_assert(std::is_trivially_copyable_v<SaveDataExtraData>,
|
static_assert(std::is_trivially_copyable_v<SaveDataExtraData>,
|
||||||
"Data type must be trivially copyable.");
|
"Data type must be trivially copyable.");
|
||||||
|
|
||||||
|
struct SaveDataFilter {
|
||||||
|
bool use_program_id;
|
||||||
|
bool use_save_data_type;
|
||||||
|
bool use_user_id;
|
||||||
|
bool use_save_data_id;
|
||||||
|
bool use_index;
|
||||||
|
SaveDataRank rank;
|
||||||
|
SaveDataAttribute attribute;
|
||||||
|
};
|
||||||
|
static_assert(sizeof(SaveDataFilter) == 0x48, "SaveDataFilter has invalid size.");
|
||||||
|
static_assert(std::is_trivially_copyable_v<SaveDataFilter>,
|
||||||
|
"Data type must be trivially copyable.");
|
||||||
|
|
||||||
struct HashSalt {
|
struct HashSalt {
|
||||||
static constexpr size_t Size = 32;
|
static constexpr size_t Size = 32;
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include "core/hle/service/filesystem/fsp/fs_i_save_data_info_reader.h"
|
#include "core/hle/service/filesystem/fsp/fs_i_save_data_info_reader.h"
|
||||||
#include "core/hle/service/filesystem/fsp/fs_i_storage.h"
|
#include "core/hle/service/filesystem/fsp/fs_i_storage.h"
|
||||||
#include "core/hle/service/filesystem/fsp/fsp_srv.h"
|
#include "core/hle/service/filesystem/fsp/fsp_srv.h"
|
||||||
|
#include "core/hle/service/filesystem/fsp/save_data_transfer_prohibiter.h"
|
||||||
#include "core/hle/service/filesystem/romfs_controller.h"
|
#include "core/hle/service/filesystem/romfs_controller.h"
|
||||||
#include "core/hle/service/filesystem/save_data_controller.h"
|
#include "core/hle/service/filesystem/save_data_controller.h"
|
||||||
#include "core/hle/service/hle_ipc.h"
|
#include "core/hle/service/hle_ipc.h"
|
||||||
@ -87,7 +88,7 @@ FSP_SRV::FSP_SRV(Core::System& system_)
|
|||||||
{64, nullptr, "OpenSaveDataInternalStorageFileSystem"},
|
{64, nullptr, "OpenSaveDataInternalStorageFileSystem"},
|
||||||
{65, nullptr, "UpdateSaveDataMacForDebug"},
|
{65, nullptr, "UpdateSaveDataMacForDebug"},
|
||||||
{66, nullptr, "WriteSaveDataFileSystemExtraData2"},
|
{66, nullptr, "WriteSaveDataFileSystemExtraData2"},
|
||||||
{67, nullptr, "FindSaveDataWithFilter"},
|
{67, D<&FSP_SRV::FindSaveDataWithFilter>, "FindSaveDataWithFilter"},
|
||||||
{68, nullptr, "OpenSaveDataInfoReaderBySaveDataFilter"},
|
{68, nullptr, "OpenSaveDataInfoReaderBySaveDataFilter"},
|
||||||
{69, nullptr, "ReadSaveDataFileSystemExtraDataBySaveDataAttribute"},
|
{69, nullptr, "ReadSaveDataFileSystemExtraDataBySaveDataAttribute"},
|
||||||
{70, D<&FSP_SRV::WriteSaveDataFileSystemExtraDataBySaveDataAttribute>, "WriteSaveDataFileSystemExtraDataBySaveDataAttribute"},
|
{70, D<&FSP_SRV::WriteSaveDataFileSystemExtraDataBySaveDataAttribute>, "WriteSaveDataFileSystemExtraDataBySaveDataAttribute"},
|
||||||
@ -95,7 +96,7 @@ FSP_SRV::FSP_SRV(Core::System& system_)
|
|||||||
{80, nullptr, "OpenSaveDataMetaFile"},
|
{80, nullptr, "OpenSaveDataMetaFile"},
|
||||||
{81, nullptr, "OpenSaveDataTransferManager"},
|
{81, nullptr, "OpenSaveDataTransferManager"},
|
||||||
{82, nullptr, "OpenSaveDataTransferManagerVersion2"},
|
{82, nullptr, "OpenSaveDataTransferManagerVersion2"},
|
||||||
{83, nullptr, "OpenSaveDataTransferProhibiterForCloudBackUp"},
|
{83, D<&FSP_SRV::OpenSaveDataTransferProhibiter>, "OpenSaveDataTransferProhibiter"},
|
||||||
{84, nullptr, "ListApplicationAccessibleSaveDataOwnerId"},
|
{84, nullptr, "ListApplicationAccessibleSaveDataOwnerId"},
|
||||||
{85, nullptr, "OpenSaveDataTransferManagerForSaveDataRepair"},
|
{85, nullptr, "OpenSaveDataTransferManagerForSaveDataRepair"},
|
||||||
{86, nullptr, "OpenSaveDataMover"},
|
{86, nullptr, "OpenSaveDataMover"},
|
||||||
@ -308,6 +309,14 @@ Result FSP_SRV::OpenSaveDataInfoReaderOnlyCacheStorage(
|
|||||||
R_SUCCEED();
|
R_SUCCEED();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result FSP_SRV::FindSaveDataWithFilter(Out<s64> out_count,
|
||||||
|
OutBuffer<BufferAttr_HipcMapAlias> out_buffer,
|
||||||
|
FileSys::SaveDataSpaceId space_id,
|
||||||
|
FileSys::SaveDataFilter filter) {
|
||||||
|
LOG_WARNING(Service_FS, "(STUBBED) called");
|
||||||
|
R_THROW(FileSys::ResultTargetNotFound);
|
||||||
|
}
|
||||||
|
|
||||||
Result FSP_SRV::WriteSaveDataFileSystemExtraDataBySaveDataAttribute() {
|
Result FSP_SRV::WriteSaveDataFileSystemExtraDataBySaveDataAttribute() {
|
||||||
LOG_WARNING(Service_FS, "(STUBBED) called.");
|
LOG_WARNING(Service_FS, "(STUBBED) called.");
|
||||||
|
|
||||||
@ -332,6 +341,13 @@ Result FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(
|
|||||||
R_SUCCEED();
|
R_SUCCEED();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result FSP_SRV::OpenSaveDataTransferProhibiter(
|
||||||
|
OutInterface<ISaveDataTransferProhibiter> out_prohibiter, u64 id) {
|
||||||
|
LOG_WARNING(Service_FS, "(STUBBED) called, id={:016X}", id);
|
||||||
|
*out_prohibiter = std::make_shared<ISaveDataTransferProhibiter>(system);
|
||||||
|
R_SUCCEED();
|
||||||
|
}
|
||||||
|
|
||||||
Result FSP_SRV::OpenDataStorageByCurrentProcess(OutInterface<IStorage> out_interface) {
|
Result FSP_SRV::OpenDataStorageByCurrentProcess(OutInterface<IStorage> out_interface) {
|
||||||
LOG_DEBUG(Service_FS, "called");
|
LOG_DEBUG(Service_FS, "called");
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ class SaveDataController;
|
|||||||
|
|
||||||
class IFileSystem;
|
class IFileSystem;
|
||||||
class ISaveDataInfoReader;
|
class ISaveDataInfoReader;
|
||||||
|
class ISaveDataTransferProhibiter;
|
||||||
class IStorage;
|
class IStorage;
|
||||||
class IMultiCommitManager;
|
class IMultiCommitManager;
|
||||||
|
|
||||||
@ -66,11 +67,16 @@ private:
|
|||||||
Result OpenSaveDataInfoReaderBySaveDataSpaceId(OutInterface<ISaveDataInfoReader> out_interface,
|
Result OpenSaveDataInfoReaderBySaveDataSpaceId(OutInterface<ISaveDataInfoReader> out_interface,
|
||||||
FileSys::SaveDataSpaceId space);
|
FileSys::SaveDataSpaceId space);
|
||||||
Result OpenSaveDataInfoReaderOnlyCacheStorage(OutInterface<ISaveDataInfoReader> out_interface);
|
Result OpenSaveDataInfoReaderOnlyCacheStorage(OutInterface<ISaveDataInfoReader> out_interface);
|
||||||
|
Result FindSaveDataWithFilter(Out<s64> out_count, OutBuffer<BufferAttr_HipcMapAlias> out_buffer,
|
||||||
|
FileSys::SaveDataSpaceId space_id,
|
||||||
|
FileSys::SaveDataFilter filter);
|
||||||
Result WriteSaveDataFileSystemExtraDataBySaveDataAttribute();
|
Result WriteSaveDataFileSystemExtraDataBySaveDataAttribute();
|
||||||
Result ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(
|
Result ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(
|
||||||
FileSys::SaveDataSpaceId space_id, FileSys::SaveDataAttribute attribute,
|
FileSys::SaveDataSpaceId space_id, FileSys::SaveDataAttribute attribute,
|
||||||
InBuffer<BufferAttr_HipcMapAlias> mask_buffer,
|
InBuffer<BufferAttr_HipcMapAlias> mask_buffer,
|
||||||
OutBuffer<BufferAttr_HipcMapAlias> out_buffer);
|
OutBuffer<BufferAttr_HipcMapAlias> out_buffer);
|
||||||
|
Result OpenSaveDataTransferProhibiter(OutInterface<ISaveDataTransferProhibiter> out_prohibiter,
|
||||||
|
u64 id);
|
||||||
Result OpenDataStorageByCurrentProcess(OutInterface<IStorage> out_interface);
|
Result OpenDataStorageByCurrentProcess(OutInterface<IStorage> out_interface);
|
||||||
Result OpenDataStorageByDataId(OutInterface<IStorage> out_interface,
|
Result OpenDataStorageByDataId(OutInterface<IStorage> out_interface,
|
||||||
FileSys::StorageId storage_id, u32 unknown, u64 title_id);
|
FileSys::StorageId storage_id, u32 unknown, u64 title_id);
|
||||||
|
@ -0,0 +1,13 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include "core/hle/service/filesystem/fsp/save_data_transfer_prohibiter.h"
|
||||||
|
|
||||||
|
namespace Service::FileSystem {
|
||||||
|
|
||||||
|
ISaveDataTransferProhibiter::ISaveDataTransferProhibiter(Core::System& system_)
|
||||||
|
: ServiceFramework{system_, "ISaveDataTransferProhibiter"} {}
|
||||||
|
|
||||||
|
ISaveDataTransferProhibiter::~ISaveDataTransferProhibiter() = default;
|
||||||
|
|
||||||
|
} // namespace Service::FileSystem
|
@ -0,0 +1,16 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "core/hle/service/service.h"
|
||||||
|
|
||||||
|
namespace Service::FileSystem {
|
||||||
|
|
||||||
|
class ISaveDataTransferProhibiter : public ServiceFramework<ISaveDataTransferProhibiter> {
|
||||||
|
public:
|
||||||
|
explicit ISaveDataTransferProhibiter(Core::System& system_);
|
||||||
|
~ISaveDataTransferProhibiter() override;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace Service::FileSystem
|
Loading…
Reference in New Issue
Block a user