From 7c2e9a6596c8b6c5d366c3eaaf926ad7db406486 Mon Sep 17 00:00:00 2001 From: Narr the Reg Date: Thu, 8 Feb 2024 16:58:44 -0600 Subject: service: bcat: Migrate and refractor service to new IPC --- src/core/hle/service/bcat/bcat_types.h | 60 ++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 src/core/hle/service/bcat/bcat_types.h (limited to 'src/core/hle/service/bcat/bcat_types.h') diff --git a/src/core/hle/service/bcat/bcat_types.h b/src/core/hle/service/bcat/bcat_types.h new file mode 100644 index 000000000..a56f9248f --- /dev/null +++ b/src/core/hle/service/bcat/bcat_types.h @@ -0,0 +1,60 @@ +// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + +#pragma once + +#include "common/common_funcs.h" +#include "common/common_types.h" +#include "core/file_sys/vfs/vfs_types.h" + +namespace Service::BCAT { + +using DirectoryName = std::array; +using FileName = std::array; +using BcatDigest = std::array; +using Passphrase = std::array; +using DirectoryGetter = std::function; + +enum class SyncType { + Normal, + Directory, + Count, +}; + +enum class DeliveryCacheProgressStatus : s32 { + None = 0x0, + Queued = 0x1, + Connecting = 0x2, + ProcessingDataList = 0x3, + Downloading = 0x4, + Committing = 0x5, + Done = 0x9, +}; + +struct DeliveryCacheDirectoryEntry { + FileName name; + u64 size; + BcatDigest digest; +}; + +struct TitleIDVersion { + u64 title_id; + u64 build_id; +}; + +struct DeliveryCacheProgressImpl { + DeliveryCacheProgressStatus status; + Result result = ResultSuccess; + DirectoryName current_directory; + FileName current_file; + s64 current_downloaded_bytes; ///< Bytes downloaded on current file. + s64 current_total_bytes; ///< Bytes total on current file. + s64 total_downloaded_bytes; ///< Bytes downloaded on overall download. + s64 total_bytes; ///< Bytes total on overall download. + INSERT_PADDING_BYTES( + 0x198); ///< Appears to be unused in official code, possibly reserved for future use. +}; +static_assert(sizeof(DeliveryCacheProgressImpl) == 0x200, + "DeliveryCacheProgressImpl has incorrect size."); + +} // namespace Service::BCAT -- cgit v1.2.3