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;
16class FileArchiver;
19class TaskGroup;
20namespace Core { class Path; }
21namespace Core::ZipUtils { class IZipUtility; }
22namespace ResourcePackPathLifetimeHelpers { class ResourcePackPathCache; }
23namespace ResourcePackPathLifetimeHelpers { class ScopeDestroyedPath; }
24// clang-format on
25
26class ResourcePackFileUploadManager : public ::FileUploadManager {
27public:
28 // member variables
29 // NOLINTBEGIN
30 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::AppPlatform>> mAppPlatform;
31 ::ll::TypedStorage<
32 8,
33 24,
34 ::std::vector<::std::shared_ptr<::ResourcePackPathLifetimeHelpers::ScopeDestroyedPath const>>>
35 mZipPaths;
36 ::ll::TypedStorage<8, 8, ::ResourcePackPathLifetimeHelpers::ResourcePackPathCache&> mResourcePackPathCache;
37 ::ll::TypedStorage<8, 16, ::gsl::not_null<::std::shared_ptr<::Bedrock::Threading::SharedAsync<void>>>>
38 mPreviousUpload;
39 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::Core::ZipUtils::IZipUtility>>> mZipUtility;
40 // NOLINTEND
41
42public:
43 // prevent constructor by default
44 ResourcePackFileUploadManager& operator=(ResourcePackFileUploadManager const&);
45 ResourcePackFileUploadManager(ResourcePackFileUploadManager const&);
46 ResourcePackFileUploadManager();
47
48public:
49 // virtual functions
50 // NOLINTBEGIN
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 virtual void
59 uploadFileToRealmStorage(::std::string const& uploadId, ::Core::Path const& path, int const slotIndex) /*override*/;
60 // NOLINTEND
61
62public:
63 // member functions
64 // NOLINTBEGIN
65 MCAPI ResourcePackFileUploadManager(
66 ::Bedrock::NotNullNonOwnerPtr<::AppPlatform> appPlatform,
67 ::TaskGroup& taskGroup,
68 ::std::shared_ptr<::IFileChunkUploader> fileUploader,
69 ::std::unique_ptr<::Core::ZipUtils::IZipUtility>&& zipUtility,
70 ::std::shared_ptr<::Bedrock::Threading::SharedAsync<void>> previousUpload,
72 );
73
74#ifdef LL_PLAT_C
75 MCAPI ResourcePackFileUploadManager(
76 ::Bedrock::NotNullNonOwnerPtr<::AppPlatform> appPlatform,
77 ::TaskGroup& taskGroup,
78 ::std::shared_ptr<::IFileChunkUploader> fileUploader,
79 ::Bedrock::NotNullNonOwnerPtr<::FileArchiver> const& FileArchiver,
80 ::std::unique_ptr<::Core::ZipUtils::IZipUtility>&& zipUtility,
81 ::std::shared_ptr<::Bedrock::Threading::SharedAsync<void>> previousUpload,
83 );
84#endif
85
86 MCAPI void _addZipPath(::Core::PathBuffer<::std::string> const& resourceZipPath);
87
88 MCAPI ::Bedrock::Threading::Async<void> uploadResourcePack(
89 ::std::string const& resourcePackName,
90 ::ResourceLocation const& resourceLocation,
91 bool isZipped,
92 ::Core::PathBuffer<::std::string> const& relativePathWithinZip,
93 bool isPremium,
94 ::PackType packType
95 );
96 // NOLINTEND
97
98public:
99 // constructor thunks
100 // NOLINTBEGIN
101 MCAPI void* $ctor(
102 ::Bedrock::NotNullNonOwnerPtr<::AppPlatform> appPlatform,
103 ::TaskGroup& taskGroup,
104 ::std::shared_ptr<::IFileChunkUploader> fileUploader,
105 ::std::unique_ptr<::Core::ZipUtils::IZipUtility>&& zipUtility,
106 ::std::shared_ptr<::Bedrock::Threading::SharedAsync<void>> previousUpload,
108 );
109
110#ifdef LL_PLAT_C
111 MCAPI void* $ctor(
112 ::Bedrock::NotNullNonOwnerPtr<::AppPlatform> appPlatform,
113 ::TaskGroup& taskGroup,
114 ::std::shared_ptr<::IFileChunkUploader> fileUploader,
115 ::Bedrock::NotNullNonOwnerPtr<::FileArchiver> const& FileArchiver,
116 ::std::unique_ptr<::Core::ZipUtils::IZipUtility>&& zipUtility,
117 ::std::shared_ptr<::Bedrock::Threading::SharedAsync<void>> previousUpload,
119 );
120#endif
121 // NOLINTEND
122
123public:
124 // virtual function thunks
125 // NOLINTBEGIN
126 MCAPI void $archiveAndUploadFileToRealmStorage(
127 ::std::string const& uploadId,
128 ::Core::Path const& path,
129 int const slotIndex,
130 ::std::string const& realmsGuid
131 );
132
133 MCAPI void $uploadFileToRealmStorage(::std::string const& uploadId, ::Core::Path const& path, int const slotIndex);
134
135
136 // NOLINTEND
137};
Definition AppPlatform.h:78
Definition SharedAsync.h:10
Definition PathBuffer.h:8
Definition Path.h:11
Definition IZipUtility.h:21
Definition FileArchiver.h:35
Definition IFileChunkUploader.h:15
Definition ResourceLocation.h:15
Definition ResourcePackPathCache.h:7
Definition TaskGroup.h:86