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/threading/Async.h"
9#include "mc/deps/core/threading/SharedAsync.h"
10#include "mc/deps/core/utility/NonOwnerPointer.h"
11#include "mc/util/FileUploadManager.h"
12
13// auto generated forward declare list
14// clang-format off
15class AppPlatform;
17namespace Core { class Path; }
18namespace Core { class PathView; }
19namespace Core::ZipUtils { class IZipUtility; }
20namespace Json { class Value; }
21namespace ResourcePackPathLifetimeHelpers { class ResourcePackPathCache; }
22namespace ResourcePackPathLifetimeHelpers { class ScopeDestroyedPath; }
23// clang-format on
24
25class ResourcePackFileUploadManager : public ::FileUploadManager {
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
43 ResourcePackFileUploadManager& operator=(ResourcePackFileUploadManager const&);
44 ResourcePackFileUploadManager(ResourcePackFileUploadManager const&);
45 ResourcePackFileUploadManager();
46
47public:
48 // virtual functions
49 // NOLINTBEGIN
50 virtual void archiveAndUploadFileToRealmStorage(
51 ::std::string const& uploadId,
52 ::Core::Path const& path,
53 int const slotIndex,
54 ::std::string const& realmsGuid
55 ) /*override*/;
56
57 virtual void
58 uploadFileToRealmStorage(::std::string const& uploadId, ::Core::Path const& path, int const slotIndex) /*override*/;
59
60 virtual ~ResourcePackFileUploadManager() /*override*/;
61 // NOLINTEND
62
63public:
64 // member functions
65 // NOLINTBEGIN
66 MCAPI void _addZipPath(::Core::PathBuffer<::std::string> const& resourceZipPath);
67
68 MCAPI void _archiveAndUploadPackToRealmStorage(
69 ::std::string const& uploadId,
70 ::Core::Path const& path,
71 int slotIndex,
72 ::std::string const&
73 );
74
75 MCAPI ::Bedrock::Threading::Async<void> _extractPackFromZipAndUpload(
76 ::std::string const& resourcePack,
77 ::ResourceLocation const& resourcePackLocation,
78 ::Core::PathBuffer<::std::string> const& relativePathWithinZip,
79 ::Core::PathBuffer<::std::string> const& resourceZipPath,
80 ::Json::Value const& uploadOptions
81 );
82
83 MCAPI bool _unzipEmbeddedResourcePackForUpload(
84 ::ResourceLocation const& resourcePackLocation,
85 ::Core::PathBuffer<::std::string> const& relativePathWithinZip,
86 ::Core::PathView outputPath
87 );
88
89 MCAPI ::Bedrock::Threading::Async<void> _uploadResourcePackFolder(
90 ::std::string const& resourcePack,
91 ::ResourceLocation const& resourcePackLocation,
92 ::Core::PathBuffer<::std::string> const& resourceZipPath,
93 ::Json::Value const& uploadOptions
94 );
95
96 MCAPI bool _zipResourcePackForUpload(
97 ::ResourceLocation const& resourcePackLocation,
98 ::Core::PathBuffer<::std::string> const& resourceZipPath
99 );
100
101 MCAPI ::Bedrock::Threading::Async<void> uploadResourcePack(
102 ::std::string const& resourcePackName,
103 ::ResourceLocation const& resourceLocation,
104 bool isZipped,
105 ::Core::PathBuffer<::std::string> const& relativePathWithinZip,
106 bool isPremium,
107 ::PackType packType
108 );
109 // NOLINTEND
110
111public:
112 // destructor thunk
113 // NOLINTBEGIN
114 MCAPI void $dtor();
115 // NOLINTEND
116
117public:
118 // virtual function thunks
119 // NOLINTBEGIN
120 MCAPI void $archiveAndUploadFileToRealmStorage(
121 ::std::string const& uploadId,
122 ::Core::Path const& path,
123 int const slotIndex,
124 ::std::string const& realmsGuid
125 );
126
127 MCAPI void $uploadFileToRealmStorage(::std::string const& uploadId, ::Core::Path const& path, int const slotIndex);
128
129
130 // NOLINTEND
131
132public:
133 // vftables
134 // NOLINTBEGIN
135 MCNAPI static void** $vftable();
136 // NOLINTEND
137};
Definition AppPlatform.h:90
Definition PathBuffer.h:8
Definition PathView.h:17
Definition Path.h:10
Definition IZipUtility.h:21
MCAPI void $dtor()
Definition Value.h:16
Definition ResourceLocation.h:15
static MCAPI void ** $vftable()
Definition ResourcePackPathCache.h:7