LeviLamina
Loading...
Searching...
No Matches
ShowcasedScreenshots.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/threading/Async.h"
8#include "mc/deps/core/utility/NonOwnerPointer.h"
9
10// auto generated forward declare list
11// clang-format off
12namespace Core { class FileSystem; }
13namespace Screenshots { class IScreenshotGalleryHttpCall; }
14namespace Social { struct XUID; }
15namespace Screenshots { struct RawShowcasedScreenshot; }
16// clang-format on
17
18namespace Screenshots {
19
20class ShowcasedScreenshots {
21public:
22 // member variables
23 // NOLINTBEGIN
37 // NOLINTEND
38
39public:
40 // prevent constructor by default
41 ShowcasedScreenshots& operator=(ShowcasedScreenshots const&);
42 ShowcasedScreenshots(ShowcasedScreenshots const&);
43 ShowcasedScreenshots();
44
45public:
46 // member functions
47 // NOLINTBEGIN
48#ifdef LL_PLAT_C
49 MCNAPI ShowcasedScreenshots(
50 ::Social::XUID xuid,
51 ::Core::PathBuffer<::std::string> const& cacheStoragePath,
52 ::Bedrock::NotNullNonOwnerPtr<::Core::FileSystem> const& fileSystem,
53 ::std::unique_ptr<::Screenshots::IScreenshotGalleryHttpCall> httpCaller
54 );
55
56 MCNAPI ::std::string _addScreenshotToShowcaseCallback(
57 ::Core::PathBuffer<::std::string> const& imagePath,
58 ::std::optional<::Screenshots::RawShowcasedScreenshot> const& rawScreenshot
59 );
60
61 MCNAPI bool
62 _cacheScreenshot(::Core::PathBuffer<::std::string> const& path, ::std::vector<uchar> const& imageData) const;
63
64 MCNAPI ::Core::PathBuffer<::std::string> _getFeaturedImagePath();
65
66 MCNAPI ::Core::PathBuffer<::std::string> _getShowcasedImagePath(::std::string const& guid, bool isThumbnail);
67
68 MCNAPI bool _loadFeaturedScreenshotCallback(::std::optional<::std::vector<uchar>> const& rawScreenshot);
69
70 MCNAPI bool _loadGalleryCallback(
71 ::std::optional<::std::vector<::Screenshots::RawShowcasedScreenshot>> const& showcasedScreenshots
72 );
73
74 MCNAPI void _pruneCache();
75
76 MCNAPI void _pruneIncrementally(::std::vector<::Core::PathBuffer<::std::string>> fileList);
77
78 MCNAPI ::Bedrock::Threading::Async<::std::string>
79 addScreenshotToShowcase(int64 captureTime, bool featured, ::Core::PathBuffer<::std::string> const& imagePath);
80
81 MCNAPI ::Core::PathBuffer<::std::string> const getFeaturedScreenshotPath() const;
82
83 MCNAPI ::Bedrock::Threading::Async<bool> loadCount();
84
85 MCNAPI ::Bedrock::Threading::Async<bool> loadFeaturedScreenshot();
86
87 MCNAPI ::Bedrock::Threading::Async<bool> loadGallery();
88
89 MCNAPI ::Bedrock::Threading::Async<bool> loadShowcasedScreenshot(::std::string const& guid);
90
91 MCNAPI ::Bedrock::Threading::Async<bool> removeFeaturedScreenshot();
92
93 MCNAPI ::Bedrock::Threading::Async<bool> removeShowcasedScreenshot(::std::string const& guid);
94
95 MCNAPI ::Bedrock::Threading::Async<bool> setFeaturedScreenshot(::std::string const& guid);
96
97 MCNAPI ~ShowcasedScreenshots();
98#endif
99 // NOLINTEND
100
101public:
102 // static variables
103 // NOLINTBEGIN
104 MCNAPI static ::std::add_lvalue_reference_t<char const[]> CACHE_DIR_NAME();
105 // NOLINTEND
106
107public:
108 // constructor thunks
109 // NOLINTBEGIN
110#ifdef LL_PLAT_C
111 MCNAPI void* $ctor(
112 ::Social::XUID xuid,
113 ::Core::PathBuffer<::std::string> const& cacheStoragePath,
114 ::Bedrock::NotNullNonOwnerPtr<::Core::FileSystem> const& fileSystem,
115 ::std::unique_ptr<::Screenshots::IScreenshotGalleryHttpCall> httpCaller
116 );
117#endif
118 // NOLINTEND
119
120public:
121 // destructor thunk
122 // NOLINTBEGIN
123#ifdef LL_PLAT_C
124 MCNAPI void $dtor();
125#endif
126 // NOLINTEND
127};
128
129} // namespace Screenshots
Definition FileSystem.h:28
Definition PathBuffer.h:8
Definition IScreenshotGalleryHttpCall.h:19
static MCAPI ::std::add_lvalue_reference_t< char const[]> CACHE_DIR_NAME()
Definition RawShowcasedScreenshot.h:7
Definition XUID.h:10
Definition Alias.h:14