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
11namespace Core { class Path; }
12namespace Core { class PathView; }
13// clang-format on
14
15class FileSecureStorage : public ::SecureStorage {
16public:
17 // FileSecureStorage inner types declare
18 // clang-format off
19 class StorageSystem;
21 // clang-format on
22
23 // FileSecureStorage inner types define
25 public:
26 // virtual functions
27 // NOLINTBEGIN
28 virtual bool getData(::std::string& output, ::Core::Path path);
29
30 virtual void setData(::std::string const& data, ::Core::Path path);
31
32 virtual ~StorageSystem() = default;
33 // NOLINTEND
34
35 public:
36 // virtual function thunks
37 // NOLINTBEGIN
38 MCNAPI bool $getData(::std::string& output, ::Core::Path path);
39
40 MCNAPI void $setData(::std::string const& data, ::Core::Path path);
41
42
43 // NOLINTEND
44 };
45
46 class FileStorageSystem : public ::FileSecureStorage::StorageSystem {
47 public:
48 // member variables
49 // NOLINTBEGIN
51 // NOLINTEND
52
53 public:
54 // prevent constructor by default
55 FileStorageSystem& operator=(FileStorageSystem const&);
56 FileStorageSystem(FileStorageSystem const&);
57 FileStorageSystem();
58
59 public:
60 // virtual functions
61 // NOLINTBEGIN
62 virtual bool getData(::std::string& output, ::Core::Path path) /*override*/;
63
64 virtual void setData(::std::string const& data, ::Core::Path path) /*override*/;
65 // NOLINTEND
66
67 public:
68 // virtual function thunks
69 // NOLINTBEGIN
70 MCNAPI bool $getData(::std::string& output, ::Core::Path path);
71
72 MCNAPI void $setData(::std::string const& data, ::Core::Path path);
73
74
75 // NOLINTEND
76 };
77
78public:
79 // member variables
80 // NOLINTBEGIN
91 // NOLINTEND
92
93public:
94 // prevent constructor by default
95 FileSecureStorage& operator=(FileSecureStorage const&);
96 FileSecureStorage(FileSecureStorage const&);
97 FileSecureStorage();
98
99public:
100 // virtual functions
101 // NOLINTBEGIN
102#ifdef LL_PLAT_S
103 virtual ~FileSecureStorage() /*override*/ = default;
104#else // LL_PLAT_C
105 virtual ~FileSecureStorage() /*override*/;
106#endif
107
108 virtual bool add(::std::string const& key, ::std::string const& value) /*override*/;
109
110 virtual bool addOrUpdate(::std::string const& key, ::std::string const& value) /*override*/;
111
112 virtual bool remove(::std::string const& key) /*override*/;
113
114 virtual bool get(::std::string const& key, ::std::string& outValue) /*override*/;
115 // NOLINTEND
116
117public:
118 // member functions
119 // NOLINTBEGIN
121 ::Core::PathView settingsPath,
122 ::Core::PathView baseSettingsPath,
123 ::ISecureStorageKeySystem* sskSystem,
124 ::Core::PathView userDataPath,
126 );
127
128 MCNAPI ::std::string _contentKeyObfuscator(::std::string const& codedData, ::std::string const& identifier);
129
130#ifdef LL_PLAT_C
131 MCNAPI bool _init(bool expectedFailure);
132#endif
133
134#ifdef LL_PLAT_S
135 MCNAPI bool _init(bool expectedFailure);
136#endif
137
138 MCNAPI void _initalizeSymmetricEncyrption(::std::string& symmetricKey, bool force);
139
141 // NOLINTEND
142
143public:
144 // constructor thunks
145 // NOLINTBEGIN
146 MCNAPI void* $ctor(
147 ::Core::PathView settingsPath,
148 ::Core::PathView baseSettingsPath,
149 ::ISecureStorageKeySystem* sskSystem,
150 ::Core::PathView userDataPath,
152 );
153 // NOLINTEND
154
155public:
156 // destructor thunk
157 // NOLINTBEGIN
158#ifdef LL_PLAT_C
159 MCNAPI void $dtor();
160#endif
161 // NOLINTEND
162
163public:
164 // virtual function thunks
165 // NOLINTBEGIN
166 MCNAPI bool $add(::std::string const& key, ::std::string const& value);
167
168 MCNAPI bool $addOrUpdate(::std::string const& key, ::std::string const& value);
169
170 MCNAPI bool $remove(::std::string const& key);
171
172 MCNAPI bool $get(::std::string const& key, ::std::string& outValue);
173
174
175 // NOLINTEND
176};
Definition PathView.h:19
Definition Path.h:11
Definition FileSecureStorage.h:46
MCAPI bool $getData(::std::string &output, ::Core::Path path)
MCAPI void $setData(::std::string const &data, ::Core::Path path)
Definition FileSecureStorage.h:24
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 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 Alias.h:14