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