LeviLamina
Loading...
Searching...
No Matches
ResourcePackFileUploadManager.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/file/PathBuffer.h"
7#include "mc/deps/core/resource/PackType.h"
8#include "mc/deps/core/string/BasicStackString.h"
9#include "mc/deps/core/threading/Async.h"
10#include "mc/deps/core/threading/SharedAsync.h"
11#include "mc/deps/core/utility/NonOwnerPointer.h"
12#include "mc/util/FileUploadManager.h"
13
14// auto generated forward declare list
15// clang-format off
16class AppPlatform;
18namespace Core { class Path; }
19namespace Core::ZipUtils { class IZipUtility; }
20namespace Json { class Value; }
21namespace ResourcePackPathLifetimeHelpers { class ResourcePackPathCache; }
22namespace ResourcePackPathLifetimeHelpers { class ScopeDestroyedPath; }
23// clang-format on
24
26public:
27 // member variables
28 // NOLINTBEGIN
29 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::AppPlatform>> mAppPlatform;
30 ::ll::TypedStorage<
31 8,
32 24,
33 ::std::vector<::std::shared_ptr<::ResourcePackPathLifetimeHelpers::ScopeDestroyedPath const>>>
34 mZipPaths;
35 ::ll::TypedStorage<8, 8, ::ResourcePackPathLifetimeHelpers::ResourcePackPathCache&> mResourcePackPathCache;
36 ::ll::TypedStorage<8, 16, ::gsl::not_null<::std::shared_ptr<::Bedrock::Threading::SharedAsync<void>>>>
37 mPreviousUpload;
38 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::Core::ZipUtils::IZipUtility>>> mZipUtility;
39 // NOLINTEND
40
41public:
42 // prevent constructor by default
46
47public:
48 // virtual functions
49 // NOLINTBEGIN
50 // vIndex: 2
51 virtual void archiveAndUploadFileToRealmStorage(
52 ::std::string const& uploadId,
53 ::Core::Path const& path,
54 int const slotIndex,
55 ::std::string const& realmsGuid
56 ) /*override*/;
57
58 // vIndex: 3
59 virtual void
60 uploadFileToRealmStorage(::std::string const& uploadId, ::Core::Path const& path, int const slotIndex) /*override*/;
61
62 // vIndex: 0
63 virtual ~ResourcePackFileUploadManager() /*override*/ = default;
64 // NOLINTEND
65
66public:
67 // member functions
68 // NOLINTBEGIN
69 MCAPI void _addZipPath(::Core::PathBuffer<::std::string> const& resourceZipPath);
70
71 MCAPI void _archiveAndUploadPackToRealmStorage(
72 ::std::string const& uploadId,
73 ::Core::Path const& path,
74 int slotIndex,
75 ::std::string const&
76 );
77
78 MCAPI ::Bedrock::Threading::Async<void> _extractPackFromZipAndUpload(
79 ::std::string const& resourcePack,
80 ::ResourceLocation const& resourcePackLocation,
81 ::Core::PathBuffer<::std::string> const& relativePathWithinZip,
82 ::Core::PathBuffer<::std::string> const& resourceZipPath,
83 ::Json::Value const& uploadOptions
84 );
85
86 MCAPI ::std::optional<::Core::PathBuffer<::Core::BasicStackString<char, 1024>>> _unzipEmbeddedResourcePackForUpload(
87 ::std::string const& resourcePack,
88 ::ResourceLocation const& resourcePackLocation,
89 ::Core::PathBuffer<::std::string> const& relativePathWithinZip
90 );
91
92 MCAPI ::Bedrock::Threading::Async<void> _uploadResourcePackFolder(
93 ::std::string const& resourcePack,
94 ::ResourceLocation const& resourcePackLocation,
95 ::Core::PathBuffer<::std::string> const& resourceZipPath,
96 ::Json::Value const& uploadOptions
97 );
98
99 MCAPI bool _zipResourcePackForUpload(
100 ::ResourceLocation const& resourcePackLocation,
101 ::Core::PathBuffer<::std::string> const& resourceZipPath
102 );
103
104 MCAPI ::Bedrock::Threading::Async<void> uploadResourcePack(
105 ::std::string const& resourcePackName,
106 ::ResourceLocation const& resourceLocation,
107 bool isZipped,
108 ::Core::PathBuffer<::std::string> const& relativePathWithinZip,
109 bool isPremium,
110 ::PackType packType
111 );
112 // NOLINTEND
113
114public:
115 // virtual function thunks
116 // NOLINTBEGIN
117 MCAPI void $archiveAndUploadFileToRealmStorage(
118 ::std::string const& uploadId,
119 ::Core::Path const& path,
120 int const slotIndex,
121 ::std::string const& realmsGuid
122 );
123
124 MCAPI void $uploadFileToRealmStorage(::std::string const& uploadId, ::Core::Path const& path, int const slotIndex);
125 // NOLINTEND
126
127public:
128 // vftables
129 // NOLINTBEGIN
130 MCNAPI static void** $vftable();
131 // NOLINTEND
132};
Definition AppPlatform.h:51
Definition PathBuffer.h:8
Definition Path.h:11
Definition FileUploadManager.h:14
Definition Value.h:16
Definition Path.h:16
Definition ResourceLocation.h:14
Definition ResourcePackFileUploadManager.h:25
static MCAPI void ** $vftable()