3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/deps/core/file/PathBuffer.h"
7#include "mc/deps/core/utility/NonOwnerPointer.h"
8#include "mc/platform/Result.h"
9#include "mc/resources/PackAccessStrategy.h"
10#include "mc/resources/PackAccessStrategyType.h"
20namespace Bedrock::Resources::Archive {
class Reader; }
21namespace Core {
class Path; }
25class ZipPackAccessStrategy :
public ::PackAccessStrategy {
41 ZipPackAccessStrategy& operator=(ZipPackAccessStrategy
const&);
42 ZipPackAccessStrategy(ZipPackAccessStrategy
const&);
43 ZipPackAccessStrategy();
48 virtual ~ZipPackAccessStrategy() =
default;
50 virtual uint64 getPackSize()
const ;
52 virtual ::ResourceLocation
const& getPackLocation()
const ;
54 virtual ::std::string
const& getPackName()
const ;
56 virtual bool isWritable()
const ;
58 virtual bool isTrusted()
const ;
60 virtual bool hasAsset(
::Core::PathView const& packRelativePath,
bool trustedContentOnly,
bool caseSensative)
const
63 virtual bool hasFolder(
::Core::Path const& packRelativePath)
const ;
66 getAsset(
::Core::PathView const& packRelativePath, ::std::string& result,
bool trustedContentOnly)
const
69 virtual void forEachIn(
75 virtual ::PackAccessStrategyType getStrategyType()
const ;
77 virtual ::Core::PathBuffer<::std::string>
const& getSubPath()
const ;
79 virtual bool supportsSignatureVerification()
const ;
81 virtual ::std::unique_ptr<::PackAccessStrategy> createSubPack(
::Core::Path const& subPath)
const ;
83 virtual void unload() ;
85 virtual ::ContentIdentity readContentIdentity()
const ;
87 virtual ::Bedrock::Result<::StreamableAssetSource>
88 getStreamableSource(
::Core::Path const& packRelativePath, ::std::optional<::Core::PathView> tempDirectory)
const
91 virtual ::std::unique_ptr<::Bedrock::Resources::Archive::Reader>
92 _loadArchive(
::Core::Path const& packRelativePath)
const ;
94 virtual ::std::vector<::Bedrock::Resources::PreloadedPathHandle>
95 _preloadSubFolders(
::Core::Path const& packRelativePath)
const ;
104 ::std::variant<::Bedrock::NotNullNonOwnerPtr<::IFileAccess>, ::gsl::not_null<::std::shared_ptr<::IFileAccess>>>
115 MCNAPI
void*
$ctor(::gsl::not_null<::std::shared_ptr<::IFileAccess>> fileAccess,
::ZipPackArgs&& args);
118 ::std::variant<::Bedrock::NotNullNonOwnerPtr<::IFileAccess>, ::gsl::not_null<::std::shared_ptr<::IFileAccess>>>
152 MCNAPI ::Core::PathBuffer<::std::string>
const&
$getSubPath()
const;
162 MCNAPI ::Bedrock::Result<::StreamableAssetSource>
165 MCNAPI ::std::unique_ptr<::Bedrock::Resources::Archive::Reader>
168 MCNAPI ::std::vector<::Bedrock::Resources::PreloadedPathHandle>
Definition PreloadedPathHandle.h:16
Definition ContentIdentity.h:8
Definition IFileAccess.h:15
Definition ResourceLocation.h:15
MCAPI bool initZipFile() const
MCAPI bool $isTrusted() const
MCAPI ::std::unique_ptr<::Bedrock::Resources::Archive::Reader > $_loadArchive(::Core::Path const &packRelativePath) const
MCAPI bool $hasAsset(::Core::PathView const &packRelativePath, bool trustedContentOnly, bool caseSensative) const
MCAPI bool $isWritable() const
MCAPI uint64 $getPackSize() const
MCAPI void * $ctor(::gsl::not_null<::std::shared_ptr<::IFileAccess > > fileAccess, ::ZipPackArgs &&args)
MCAPI bool $supportsSignatureVerification() const
MCAPI::std::string const & $getPackName() const
MCAPI ::std::unique_ptr<::PackAccessStrategy > $createSubPack(::Core::Path const &subPath) const
MCAPI void * $ctor(::std::variant<::Bedrock::NotNullNonOwnerPtr<::IFileAccess >, ::gsl::not_null<::std::shared_ptr<::IFileAccess > > > fileAccess, ::ZipPackArgs &&args)
MCAPI ::Core::PathBuffer<::std::string > const & $getSubPath() const
MCAPI void $forEachIn(::Core::Path const &packRelativePath, ::std::function< void(::Core::Path const &)> callback, bool recurseAnyways) const
MCAPI bool $hasFolder(::Core::Path const &packRelativePath) const
MCAPI bool $getAsset(::Core::PathView const &packRelativePath, ::std::string &result, bool trustedContentOnly) const
MCAPI::PackAccessStrategyType $getStrategyType() const
MCAPI ZipPackAccessStrategy(::std::variant<::Bedrock::NotNullNonOwnerPtr<::IFileAccess >, ::gsl::not_null<::std::shared_ptr<::IFileAccess > > > fileAccess, ::ZipPackArgs &&args)
MCAPI ::std::vector<::Bedrock::Resources::PreloadedPathHandle > $_preloadSubFolders(::Core::Path const &packRelativePath) const
MCAPI::ResourceLocation const & $getPackLocation() const
MCAPI ZipPackAccessStrategy(::gsl::not_null<::std::shared_ptr<::IFileAccess > > fileAccess, ::ZipPackArgs &&args)
MCAPI::ContentIdentity $readContentIdentity() const
MCAPI ::Bedrock::Result<::StreamableAssetSource > $getStreamableSource(::Core::Path const &packRelativePath, ::std::optional<::Core::PathView > tempDirectory) const
Definition StreamableAssetSource.h:5
Definition ZipPackArgs.h:5