LeviLamina
Loading...
Searching...
No Matches
PhotoStorage.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
8// auto generated forward declare list
9// clang-format off
10class Actor;
11class Player;
13namespace Core { class Path; }
14// clang-format on
15
16class PhotoStorage {
17public:
18 // member variables
19 // NOLINTBEGIN
20 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> mBaseDir;
21 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> mBookDir;
22 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> mPhotoDir;
23 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> mPhotoItemDir;
24 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> mManifestDir;
25 ::ll::TypedStorage<8, 64, ::std::unordered_set<::std::string>> mChecksums;
26 // NOLINTEND
27
28public:
29 // prevent constructor by default
30 PhotoStorage();
31
32public:
33 // member functions
34 // NOLINTBEGIN
35 MCAPI explicit PhotoStorage(::Core::Path const& baseDir);
36
37#ifdef LL_PLAT_C
38 MCAPI bool _addValidFile(::Core::Path path);
39
40 MCAPI bool _isValidFile(::Core::Path file);
41
42 MCAPI bool _readFile(::Core::Path path, ::std::string& resultData);
43#endif
44
45 MCAPI void _readManifest();
46
47#ifdef LL_PLAT_C
48 MCAPI bool _writeFile(::Core::Path path, ::std::string const& photoData);
49
50 MCAPI void _writeManifest();
51
52 MCAPI void getLoosePhotos(::Player& owner, ::std::vector<::Core::PathBuffer<::std::string>>& result);
53
54 MCAPI ::Core::PathBuffer<::std::string> getPath(::PhotoStorageContainer const& container);
55
56 MCAPI ::Core::PathBuffer<::std::string> getPhotoPath(::Actor const& owner) const;
57
58 MCAPI ::Core::PathBuffer<::std::string> getPhotoPathRelative(::Actor& owner);
59
60 MCAPI void setValidLoosePhoto(::PhotoStorageContainer const& container, ::std::string const& photoName);
61
62 MCAPI void storePhoto(
63 ::PhotoStorageContainer const& container,
64 ::std::string const& photoName,
65 ::std::string const& photoData
66 );
67#endif
68
69 MCAPI ~PhotoStorage();
70 // NOLINTEND
71
72public:
73 // static functions
74 // NOLINTBEGIN
75#ifdef LL_PLAT_C
76 MCAPI static ::Core::PathBuffer<::std::string> getScreenshotFilename();
77#endif
78 // NOLINTEND
79
80public:
81 // static variables
82 // NOLINTBEGIN
83 MCAPI static ::std::string const& BOOKS_DIR();
84
85 MCAPI static ::std::string const& MANIFEST_NAME();
86
87 MCAPI static ::std::string const& PHOTOITEM_DIR();
88
89 MCAPI static ::std::string const& PHOTO_DIR();
90 // NOLINTEND
91
92public:
93 // constructor thunks
94 // NOLINTBEGIN
95 MCAPI void* $ctor(::Core::Path const& baseDir);
96 // NOLINTEND
97
98public:
99 // destructor thunk
100 // NOLINTBEGIN
101 MCAPI void $dtor();
102 // NOLINTEND
103};
Definition Actor.h:106
Definition PathBuffer.h:8
Definition Path.h:17
Definition Player.h:129
Definition PhotoStorageContainer.h:9