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