Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
FileSecureStorage.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/secure_storage/SecureStorage.h"
7
8// auto generated forward declare list
9// clang-format off
12namespace Core { class Path; }
13namespace Core { class PathView; }
14// clang-format on
15
16class FileSecureStorage : public ::SecureStorage {
17public:
18 // FileSecureStorage inner types declare
19 // clang-format off
20 class StorageSystem;
22 // clang-format on
23
24 // FileSecureStorage inner types define
26 public:
27 // virtual functions
28 // NOLINTBEGIN
29 virtual bool getData(::std::string& output, ::Core::Path path);
30
31 virtual void setData(::std::string const& data, ::Core::Path path);
32
33 virtual ~StorageSystem() = default;
34 // NOLINTEND
35
36 public:
37 // virtual function thunks
38 // NOLINTBEGIN
39 MCNAPI bool $getData(::std::string& output, ::Core::Path path);
40
41 MCNAPI void $setData(::std::string const& data, ::Core::Path path);
42
43
44 // NOLINTEND
45 };
46
47 class FileStorageSystem : public ::FileSecureStorage::StorageSystem {
48 public:
49 // member variables
50 // NOLINTBEGIN
52 // NOLINTEND
53
54 public:
55 // prevent constructor by default
56 FileStorageSystem& operator=(FileStorageSystem const&);
57 FileStorageSystem(FileStorageSystem const&);
58 FileStorageSystem();
59
60 public:
61 // virtual functions
62 // NOLINTBEGIN
63 virtual bool getData(::std::string& output, ::Core::Path path) /*override*/;
64
65 virtual void setData(::std::string const& data, ::Core::Path path) /*override*/;
66 // NOLINTEND
67
68 public:
69 // virtual function thunks
70 // NOLINTBEGIN
71 MCNAPI bool $getData(::std::string& output, ::Core::Path path);
72
73 MCNAPI void $setData(::std::string const& data, ::Core::Path path);
74
75
76 // NOLINTEND
77 };
78
79public:
80 // member variables
81 // NOLINTBEGIN
92 // NOLINTEND
93
94public:
95 // prevent constructor by default
96 FileSecureStorage& operator=(FileSecureStorage const&);
97 FileSecureStorage(FileSecureStorage const&);
98 FileSecureStorage();
99
100public:
101 // virtual functions
102 // NOLINTBEGIN
103#ifdef LL_PLAT_S
104 virtual ~FileSecureStorage() /*override*/ = default;
105#else // LL_PLAT_C
106 virtual ~FileSecureStorage() /*override*/;
107#endif
108
109 virtual bool add(::std::string const& key, ::std::string const& value) /*override*/;
110
111 virtual bool addOrUpdate(::std::string const& key, ::std::string const& value) /*override*/;
112
113 virtual bool remove(::std::string const& key) /*override*/;
114
115 virtual bool get(::std::string const& key, ::std::string& outValue) /*override*/;
116 // NOLINTEND
117
118public:
119 // member functions
120 // NOLINTBEGIN
122 ::Core::PathView settingsPath,
123 ::Core::PathView baseSettingsPath,
124 ::ISecureStorageKeySystem* sskSystem,
125 ::Core::PathView userDataPath,
127 );
128
129 MCNAPI ::std::string _contentKeyObfuscator(::std::string const& codedData, ::std::string const& identifier);
130
131 MCNAPI ::SecureStorageKey _getSecureStorageKey() const;
132
133#ifdef LL_PLAT_C
134 MCNAPI bool _init(bool expectedFailure);
135#endif
136
137#ifdef LL_PLAT_S
138 MCNAPI bool _init(bool expectedFailure);
139#endif
140
141 MCNAPI void _initalizeSymmetricEncyrption(::std::string& symmetricKey, bool force);
142
144 // NOLINTEND
145
146public:
147 // constructor thunks
148 // NOLINTBEGIN
149 MCNAPI void* $ctor(
150 ::Core::PathView settingsPath,
151 ::Core::PathView baseSettingsPath,
152 ::ISecureStorageKeySystem* sskSystem,
153 ::Core::PathView userDataPath,
155 );
156 // NOLINTEND
157
158public:
159 // destructor thunk
160 // NOLINTBEGIN
161#ifdef LL_PLAT_C
162 MCNAPI void $dtor();
163#endif
164 // NOLINTEND
165
166public:
167 // virtual function thunks
168 // NOLINTBEGIN
169 MCNAPI bool $add(::std::string const& key, ::std::string const& value);
170
171 MCNAPI bool $addOrUpdate(::std::string const& key, ::std::string const& value);
172
173 MCNAPI bool $remove(::std::string const& key);
174
175 MCNAPI bool $get(::std::string const& key, ::std::string& outValue);
176
177
178 // NOLINTEND
179};
Definition PathView.h:19
Definition Path.h:10
Definition FileSecureStorage.h:47
MCAPI bool $getData(::std::string &output, ::Core::Path path)
MCAPI void $setData(::std::string const &data, ::Core::Path path)
Definition FileSecureStorage.h:25
MCAPI void $setData(::std::string const &data, ::Core::Path path)
MCAPI bool $getData(::std::string &output, ::Core::Path path)
MCAPI bool $addOrUpdate(::std::string const &key, ::std::string const &value)
MCAPI void _rebuildSecureStorageFile()
MCAPI::SecureStorageKey _getSecureStorageKey() const
MCAPI bool $add(::std::string const &key, ::std::string const &value)
MCAPI bool $get(::std::string const &key, ::std::string &outValue)
MCAPI void _initalizeSymmetricEncyrption(::std::string &symmetricKey, bool force)
MCAPI FileSecureStorage(::Core::PathView settingsPath, ::Core::PathView baseSettingsPath, ::ISecureStorageKeySystem *sskSystem, ::Core::PathView userDataPath, ::FileSecureStorage::StorageSystem *storage)
MCAPI bool $remove(::std::string const &key)
MCAPI::std::string _contentKeyObfuscator(::std::string const &codedData, ::std::string const &identifier)
MCAPI void * $ctor(::Core::PathView settingsPath, ::Core::PathView baseSettingsPath, ::ISecureStorageKeySystem *sskSystem, ::Core::PathView userDataPath, ::FileSecureStorage::StorageSystem *storage)
Definition ISecureStorageKeySystem.h:10
Definition SecureStorageKey.h:5
Definition Alias.h:14