diff options
| author | 2024-02-18 23:26:18 +0100 | |
|---|---|---|
| committer | 2024-02-19 19:06:31 +0100 | |
| commit | b7d9eba72b504039548c5bb1fb64cfec9f3011cb (patch) | |
| tree | 93b4e5c1438fa08c63aa6fffd764d806cfa9d903 /src/core/hle/service/filesystem | |
| parent | fsp: Move ISaveDataInfoReader to a seperate file (diff) | |
| download | yuzu-b7d9eba72b504039548c5bb1fb64cfec9f3011cb.tar.gz yuzu-b7d9eba72b504039548c5bb1fb64cfec9f3011cb.tar.xz yuzu-b7d9eba72b504039548c5bb1fb64cfec9f3011cb.zip | |
fsp: Move IMultiCommitManager to a seperate file
Diffstat (limited to 'src/core/hle/service/filesystem')
3 files changed, 58 insertions, 29 deletions
diff --git a/src/core/hle/service/filesystem/fsp/fs_i_multi_commit_manager.cpp b/src/core/hle/service/filesystem/fsp/fs_i_multi_commit_manager.cpp new file mode 100644 index 000000000..054bf5054 --- /dev/null +++ b/src/core/hle/service/filesystem/fsp/fs_i_multi_commit_manager.cpp | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include "core/hle/service/filesystem/fsp/fs_i_multi_commit_manager.h" | ||
| 5 | #include "core/hle/service/ipc_helpers.h" | ||
| 6 | |||
| 7 | namespace Service::FileSystem { | ||
| 8 | |||
| 9 | IMultiCommitManager::IMultiCommitManager(Core::System& system_) | ||
| 10 | : ServiceFramework{system_, "IMultiCommitManager"} { | ||
| 11 | static const FunctionInfo functions[] = { | ||
| 12 | {1, &IMultiCommitManager::Add, "Add"}, | ||
| 13 | {2, &IMultiCommitManager::Commit, "Commit"}, | ||
| 14 | }; | ||
| 15 | RegisterHandlers(functions); | ||
| 16 | } | ||
| 17 | |||
| 18 | IMultiCommitManager::~IMultiCommitManager() = default; | ||
| 19 | |||
| 20 | void IMultiCommitManager::Add(HLERequestContext& ctx) { | ||
| 21 | LOG_WARNING(Service_FS, "(STUBBED) called"); | ||
| 22 | |||
| 23 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 24 | rb.Push(ResultSuccess); | ||
| 25 | } | ||
| 26 | |||
| 27 | void IMultiCommitManager::Commit(HLERequestContext& ctx) { | ||
| 28 | LOG_WARNING(Service_FS, "(STUBBED) called"); | ||
| 29 | |||
| 30 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 31 | rb.Push(ResultSuccess); | ||
| 32 | } | ||
| 33 | |||
| 34 | } // namespace Service::FileSystem | ||
diff --git a/src/core/hle/service/filesystem/fsp/fs_i_multi_commit_manager.h b/src/core/hle/service/filesystem/fsp/fs_i_multi_commit_manager.h new file mode 100644 index 000000000..6124873b3 --- /dev/null +++ b/src/core/hle/service/filesystem/fsp/fs_i_multi_commit_manager.h | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #include "core/file_sys/vfs/vfs.h" | ||
| 7 | #include "core/hle/service/service.h" | ||
| 8 | |||
| 9 | namespace Service::FileSystem { | ||
| 10 | |||
| 11 | class IMultiCommitManager final : public ServiceFramework<IMultiCommitManager> { | ||
| 12 | public: | ||
| 13 | explicit IMultiCommitManager(Core::System& system_); | ||
| 14 | ~IMultiCommitManager() override; | ||
| 15 | |||
| 16 | private: | ||
| 17 | void Add(HLERequestContext& ctx); | ||
| 18 | void Commit(HLERequestContext& ctx); | ||
| 19 | |||
| 20 | FileSys::VirtualFile backend; | ||
| 21 | }; | ||
| 22 | |||
| 23 | } // namespace Service::FileSystem | ||
diff --git a/src/core/hle/service/filesystem/fsp/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp/fsp_srv.cpp index 8664ead29..228e6269e 100644 --- a/src/core/hle/service/filesystem/fsp/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp/fsp_srv.cpp | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #include "core/file_sys/vfs/vfs.h" | 28 | #include "core/file_sys/vfs/vfs.h" |
| 29 | #include "core/hle/result.h" | 29 | #include "core/hle/result.h" |
| 30 | #include "core/hle/service/filesystem/filesystem.h" | 30 | #include "core/hle/service/filesystem/filesystem.h" |
| 31 | #include "core/hle/service/filesystem/fsp/fs_i_multi_commit_manager.h" | ||
| 31 | #include "core/hle/service/filesystem/fsp/fs_i_filesystem.h" | 32 | #include "core/hle/service/filesystem/fsp/fs_i_filesystem.h" |
| 32 | #include "core/hle/service/filesystem/fsp/fs_i_save_data_info_reader.h" | 33 | #include "core/hle/service/filesystem/fsp/fs_i_save_data_info_reader.h" |
| 33 | #include "core/hle/service/filesystem/fsp/fs_i_storage.h" | 34 | #include "core/hle/service/filesystem/fsp/fs_i_storage.h" |
| @@ -562,35 +563,6 @@ void FSP_SRV::GetCacheStorageSize(HLERequestContext& ctx) { | |||
| 562 | rb.Push(s64{0}); | 563 | rb.Push(s64{0}); |
| 563 | } | 564 | } |
| 564 | 565 | ||
| 565 | class IMultiCommitManager final : public ServiceFramework<IMultiCommitManager> { | ||
| 566 | public: | ||
| 567 | explicit IMultiCommitManager(Core::System& system_) | ||
| 568 | : ServiceFramework{system_, "IMultiCommitManager"} { | ||
| 569 | static const FunctionInfo functions[] = { | ||
| 570 | {1, &IMultiCommitManager::Add, "Add"}, | ||
| 571 | {2, &IMultiCommitManager::Commit, "Commit"}, | ||
| 572 | }; | ||
| 573 | RegisterHandlers(functions); | ||
| 574 | } | ||
| 575 | |||
| 576 | private: | ||
| 577 | FileSys::VirtualFile backend; | ||
| 578 | |||
| 579 | void Add(HLERequestContext& ctx) { | ||
| 580 | LOG_WARNING(Service_FS, "(STUBBED) called"); | ||
| 581 | |||
| 582 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 583 | rb.Push(ResultSuccess); | ||
| 584 | } | ||
| 585 | |||
| 586 | void Commit(HLERequestContext& ctx) { | ||
| 587 | LOG_WARNING(Service_FS, "(STUBBED) called"); | ||
| 588 | |||
| 589 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 590 | rb.Push(ResultSuccess); | ||
| 591 | } | ||
| 592 | }; | ||
| 593 | |||
| 594 | void FSP_SRV::OpenMultiCommitManager(HLERequestContext& ctx) { | 566 | void FSP_SRV::OpenMultiCommitManager(HLERequestContext& ctx) { |
| 595 | LOG_DEBUG(Service_FS, "called"); | 567 | LOG_DEBUG(Service_FS, "called"); |
| 596 | 568 | ||