LeviLamina
Loading...
Searching...
No Matches
ImportContext.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/resources/ImportContextType.h"
7#include "mc/client/resources/ImportFailure.h"
8#include "mc/client/resources/ImportMode.h"
9#include "mc/client/resources/ImportSuccess.h"
10#include "mc/deps/core/file/PathBuffer.h"
11#include "mc/resources/core/zip_utils/ZipProgressList.h"
12
13// auto generated forward declare list
14// clang-format off
15class PackManifest;
16class PackReport;
17class ResourcePack;
18namespace Core { class Path; }
19// clang-format on
20
21class ImportContext {
22public:
23 // member variables
24 // NOLINTBEGIN
25 ::ll::TypedStorage<8, 104, ::Core::ZipUtils::ZipProgressList> mZipProgressList;
26 ::ll::TypedStorage<8, 32, ::std::string> mSerializedGlobalStackPreUpdate;
27 ::ll::TypedStorage<1, 1, bool> mSuppressImportStartedToast;
28 ::ll::TypedStorage<1, 1, bool> mSuppressImportFinishedToast;
29 ::ll::TypedStorage<1, 1, bool> mSuppressSelfToasts;
30 ::ll::TypedStorage<1, 1, bool> mSuppressImportProgressScreen;
31 // NOLINTEND
32
33public:
34 // virtual functions
35 // NOLINTBEGIN
36 virtual ~ImportContext() = default;
37
38 virtual ::Core::PathBuffer<::std::string> generatePackFolderName(::PackManifest const& manifest) = 0;
39
40 virtual ::Core::PathBuffer<::std::string> getBehaviorPacksPath() const = 0;
41
42 virtual ::Core::PathBuffer<::std::string> getResourcePacksPath() const = 0;
43
44 virtual ::Core::PathBuffer<::std::string> getWorldTemplatePath() const = 0;
45
46 virtual ::Core::PathBuffer<::std::string> getSkinPacksPath() const = 0;
47
48 virtual ::Core::PathBuffer<::std::string> getPersonaPath() const = 0;
49
50 virtual ::ImportMode getImportMode() const = 0;
51
52 virtual bool shouldUnzipToDestination(::PackManifest const& manifest) const = 0;
53
54 virtual bool importAsFlatFile(::PackManifest const& manifest) const = 0;
55
56 virtual ::ImportContextType getImportContextType() const = 0;
57
58 virtual void notifyEarlyImportStarted(bool isWorld) = 0;
59
60 virtual void notifyImportStarted(::PackManifest const& manifest) = 0;
61
62 virtual void notifyMultiImportStarted(int pendingImportCount) = 0;
63
64 virtual void notifyImportSucceeded(
65 ::ResourcePack const* pack,
66 ::ImportSuccess success,
67 ::PackManifest const& manifest,
68 ::PackReport const& packReport,
69 ::Core::Path const& packOutputFolder
70 ) = 0;
71
72 virtual void notifyImportFailed(
73 ::ImportFailure failure,
74 ::PackManifest const* manifest,
75 ::PackReport* report,
76 ::Core::Path const& contentPath
77 ) = 0;
78
79 virtual bool modifyManifest(::PackManifest& manifest) = 0;
80 // NOLINTEND
81};
Definition Path.h:11
Definition ImportContext.h:5
Definition PackManifest.h:38
Definition PackReport.h:16
Definition ResourcePack.h:24