LeviLamina
Loading...
Searching...
No Matches
EncryptedFileAccessStrategy.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/NonOwnerPointer.h"
7#include "mc/resources/DirectoryPackAccessStrategy.h"
8#include "mc/resources/PackAccessAssetGenerationResult.h"
9#include "mc/resources/PackAccessStrategyType.h"
10
11// auto generated forward declare list
12// clang-format off
13class ContentIdentity;
17namespace Core { class Path; }
18// clang-format on
19
21public:
22 // member variables
23 // NOLINTBEGIN
26 // NOLINTEND
27
28public:
29 // prevent constructor by default
33
34public:
35 // virtual functions
36 // NOLINTBEGIN
37 // vIndex: 15
38 virtual ::PackAccessAssetGenerationResult generateAssetSet() /*override*/;
39
40 // vIndex: 5
41 virtual bool isTrusted() const /*override*/;
42
43 // vIndex: 4
44 virtual bool isWritable() const /*override*/;
45
46 // vIndex: 6
47 virtual bool hasAsset(::Core::Path const& packRelativePath, bool trustedContentOnly, bool caseSensative) const
48 /*override*/;
49
50 // vIndex: 8
51 virtual bool getAsset(::Core::Path const& packRelativePath, ::std::string& result, bool trustedContentOnly) const
52 /*override*/;
53
54 // vIndex: 14
55 virtual ::std::unique_ptr<::PackAccessStrategy> createSubPack(::Core::Path const& subPath) const /*override*/;
56
57 // vIndex: 20
58 virtual bool isAssetExtractionViable() const /*override*/;
59
60 // vIndex: 11
61 virtual ::PackAccessStrategyType getStrategyType() const /*override*/;
62
63 // vIndex: 19
64 virtual ::ContentIdentity readContentIdentity() const /*override*/;
65
66 // vIndex: 22
67 virtual ::std::string _getContentsFile();
68
69 // vIndex: 23
70 virtual ::std::string _getEncryptedAssetStream(::Core::Path const& packRelativePath) const;
71
72 // vIndex: 0
73 virtual ~EncryptedFileAccessStrategy() /*override*/;
74 // NOLINTEND
75
76public:
77 // member functions
78 // NOLINTBEGIN
80 ::ResourceLocation const& resourceLocation,
81 ::ContentIdentity const& contentIdentity,
82 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const> const& keyProvider,
83 bool canRecurse,
84 ::std::optional<::std::unordered_map<::Core::Path, ::std::string>> assetSet
85 );
86 // NOLINTEND
87
88public:
89 // static functions
90 // NOLINTBEGIN
91 MCNAPI static bool
92 _getContentIdentityFromEncryptedStream(::std::string& stream, ::ContentIdentity& contentIdentity);
93
94 MCNAPI static void _transformStream(
95 ::std::string& stream,
96 ::std::string const& key,
97 ::ContentIdentity const& contentIdentity,
98 uint64 offset
99 );
100
101 MCNAPI static bool isValidEncryptedPack(::Core::Path const& pathToPack, ::ContentIdentity& contentIdentity);
102 // NOLINTEND
103
104public:
105 // constructor thunks
106 // NOLINTBEGIN
107 MCNAPI void* $ctor(
108 ::ResourceLocation const& resourceLocation,
109 ::ContentIdentity const& contentIdentity,
110 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const> const& keyProvider,
111 bool canRecurse,
112 ::std::optional<::std::unordered_map<::Core::Path, ::std::string>> assetSet
113 );
114 // NOLINTEND
115
116public:
117 // destructor thunk
118 // NOLINTBEGIN
119 MCNAPI void $dtor();
120 // NOLINTEND
121
122public:
123 // virtual function thunks
124 // NOLINTBEGIN
125 MCNAPI ::PackAccessAssetGenerationResult $generateAssetSet();
126
127 MCNAPI bool $isTrusted() const;
128
129 MCNAPI bool $isWritable() const;
130
131 MCNAPI bool $hasAsset(::Core::Path const& packRelativePath, bool trustedContentOnly, bool caseSensative) const;
132
133 MCNAPI bool $getAsset(::Core::Path const& packRelativePath, ::std::string& result, bool trustedContentOnly) const;
134
135 MCNAPI ::std::unique_ptr<::PackAccessStrategy> $createSubPack(::Core::Path const& subPath) const;
136
137 MCNAPI bool $isAssetExtractionViable() const;
138
139 MCNAPI ::PackAccessStrategyType $getStrategyType() const;
140
141 MCNAPI ::ContentIdentity $readContentIdentity() const;
142
143 MCNAPI ::std::string $_getContentsFile();
144
145 MCNAPI ::std::string $_getEncryptedAssetStream(::Core::Path const& packRelativePath) const;
146 // NOLINTEND
147
148public:
149 // vftables
150 // NOLINTBEGIN
151 MCNAPI static void** $vftable();
152 // NOLINTEND
153};
Definition ContentIdentity.h:8
Definition Path.h:11
Definition DirectoryPackAccessStrategy.h:17
Definition EncryptedFileAccessStrategy.h:20
MCAPI bool $isWritable() const
MCAPI bool $isAssetExtractionViable() const
MCAPI::std::string $_getContentsFile()
MCAPI bool $isTrusted() const
MCAPI::ContentIdentity $readContentIdentity() const
static MCAPI void _transformStream(::std::string &stream, ::std::string const &key, ::ContentIdentity const &contentIdentity, uint64 offset)
static MCAPI bool isValidEncryptedPack(::Core::Path const &pathToPack, ::ContentIdentity &contentIdentity)
MCAPI bool $hasAsset(::Core::Path const &packRelativePath, bool trustedContentOnly, bool caseSensative) const
static MCAPI bool _getContentIdentityFromEncryptedStream(::std::string &stream, ::ContentIdentity &contentIdentity)
MCAPI EncryptedFileAccessStrategy(::ResourceLocation const &resourceLocation, ::ContentIdentity const &contentIdentity, ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const > const &keyProvider, bool canRecurse, ::std::optional<::std::unordered_map<::Core::Path, ::std::string > > assetSet)
MCAPI::std::string $_getEncryptedAssetStream(::Core::Path const &packRelativePath) const
MCAPI ::std::unique_ptr<::PackAccessStrategy > $createSubPack(::Core::Path const &subPath) const
static MCAPI void ** $vftable()
MCAPI::PackAccessStrategyType $getStrategyType() const
MCAPI void * $ctor(::ResourceLocation const &resourceLocation, ::ContentIdentity const &contentIdentity, ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const > const &keyProvider, bool canRecurse, ::std::optional<::std::unordered_map<::Core::Path, ::std::string > > assetSet)
MCAPI::PackAccessAssetGenerationResult $generateAssetSet()
MCAPI bool $getAsset(::Core::Path const &packRelativePath, ::std::string &result, bool trustedContentOnly) const
Definition IContentKeyProvider.h:13
Definition PackAccessStrategy.h:20
Definition Path.h:16
Definition ResourceLocation.h:14
Definition Alias.h:14