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 MCAPI_C bool _addValidFile(::Core::Path path);
39
40 MCAPI_C bool _isValidFile(::Core::Path file);
41
42 MCAPI_C bool _readFile(::Core::Path path, ::std::string& resultData);
43
44 MCAPI void _readManifest();
45
46 MCAPI_C bool _writeFile(::Core::Path path, ::std::string const& photoData);
47
48 MCAPI_C void _writeManifest();
49
50 MCAPI_C void getLoosePhotos(::Player& owner, ::std::vector<::Core::PathBuffer<::std::string>>& result);
51
52 MCAPI_C ::Core::PathBuffer<::std::string> getPath(::PhotoStorageContainer const& container);
53
54 MCAPI_C void
55 getPhoto(::PhotoStorageContainer const& container, ::std::string const& photoName, ::std::string& resultData);
56
57 MCAPI_C ::Core::PathBuffer<::std::string> getPhotoPath(::Actor const& owner) const;
58
59 MCAPI_C void setValidLoosePhoto(::PhotoStorageContainer const& container, ::std::string const& photoName);
60
61 MCAPI_C void storePhoto(
62 ::PhotoStorageContainer const& container,
63 ::std::string const& photoName,
64 ::std::string const& photoData
65 );
66
67 MCAPI_C ::Core::PathBuffer<::Core::BasicStackString<char, 1024>> storePhotoFront(
68 ::Player& owner,
69 ::PhotoStorageContainer const& container,
70 ::std::string const& photoName,
71 ::std::string const& photoData
72 );
73
74 MCAPI ~PhotoStorage();
75 // NOLINTEND
76
77public:
78 // static functions
79 // NOLINTBEGIN
80 MCAPI_C static ::Core::PathBuffer<::std::string> getScreenshotFilename();
81 // NOLINTEND
82
83public:
84 // static variables
85 // NOLINTBEGIN
86 MCAPI static ::std::string const& BOOKS_DIR();
87
88 MCAPI static ::std::string const& MANIFEST_NAME();
89
90 MCAPI static ::std::string const& PHOTOITEM_DIR();
91
92 MCAPI static ::std::string const& PHOTO_DIR();
93 // NOLINTEND
94
95public:
96 // constructor thunks
97 // NOLINTBEGIN
98 MCAPI void* $ctor(::Core::Path const& baseDir);
99 // NOLINTEND
100
101public:
102 // destructor thunk
103 // NOLINTBEGIN
104 MCAPI void $dtor();
105 // NOLINTEND
106};
Definition Actor.h:105
Definition PathBuffer.h:8
Definition Path.h:10
Definition Player.h:125
Definition PhotoStorageContainer.h:9