6
6
7
7
namespace WPEFramework {
8
8
namespace Exchange {
9
+
9
10
#ifndef RUNTIME_CONFIG
10
11
struct RuntimeConfig {
11
12
bool dial;
12
13
bool wanLanAccess;
13
14
bool thunder;
14
15
int32_t systemMemoryLimit;
15
16
int32_t gpuMemoryLimit;
16
- std::string envVars ;
17
+ std::string envVariables ;
17
18
uint32_t userId;
18
19
uint32_t groupId;
19
20
uint32_t dataImageSize;
20
21
21
22
bool resourceManagerClientEnabled;
22
23
std::string dialId;
23
24
std::string command;
24
- uint32_t appType;
25
+ std::string appType;
25
26
std::string appPath;
26
27
std::string runtimePath;
27
28
29
+ std::string logFilePath;
30
+ uint32_t logFileMaxSize;
31
+ std::string logLevels; // json array of strings
32
+ bool mapi;
33
+ std::string fkpsFiles; // json array of strings
34
+
28
35
std::string fireboltVersion;
29
36
bool enableDebugger;
30
37
};
@@ -75,15 +82,27 @@ namespace Exchange {
75
82
virtual Core::hresult Deinitialize (PluginHost::IShell* service) = 0;
76
83
77
84
85
+ struct Options {
86
+ // @brief Priority
87
+ bool priority;
88
+ // @brief Retries
89
+ uint32_t retries;
90
+ // @brief RateLimit
91
+ uint64_t rateLimit;
92
+ };
93
+
94
+ struct DownloadId {
95
+ string downloadId;
96
+ };
97
+
78
98
// @brief Download
79
99
// @text download
80
100
// @param url: Download url
101
+ // @param options: Download options
81
102
virtual Core::hresult Download (
82
103
const string &url,
83
- const bool priority /* @optional */ ,
84
- const uint32_t retries /* @optional */ ,
85
- const uint64_t rateLimit /* @optional */ ,
86
- string &downloadId /* @out */ ) = 0;
104
+ const Options &options,
105
+ DownloadId &downloadId /* @out */ ) = 0;
87
106
88
107
// @brief Pause
89
108
// @text pause
@@ -105,18 +124,22 @@ namespace Exchange {
105
124
// @param fileLocator: FileLocator
106
125
virtual Core::hresult Delete (const string &fileLocator) = 0;
107
126
127
+ struct Percent {
128
+ uint8_t percent;
129
+ };
130
+
108
131
// @brief Delete
109
132
// @text progress
110
133
// @param downloadId: Download id
111
134
virtual Core::hresult Progress (
112
135
const string &downloadId,
113
- uint8_t &percent /* @out */ ) = 0;
136
+ Percent &percent /* @out */ ) = 0;
114
137
115
138
// @brief GetStorageDetails
116
139
// @text getStorageDetails
117
140
virtual Core::hresult GetStorageDetails (
118
- uint32_t "aKB /* @out */ ,
119
- uint32_t &usedKB /* @out */ ) = 0;
141
+ uint32_t "aKb /* @out */ ,
142
+ uint32_t &usedKb /* @out */ ) = 0;
120
143
121
144
// @brief RateLimit
122
145
// @text rateLimit
@@ -129,16 +152,18 @@ namespace Exchange {
129
152
struct EXTERNAL IPackageInstaller : virtual public Core::IUnknown {
130
153
enum { ID = ID_PACKAGE_INSTALLER };
131
154
132
- enum PackageLifecycleState : uint8_t {
133
- INSTALLING,
155
+ enum InstallState : uint8_t {
156
+ INSTALLING, // XXX: necessary ?!
134
157
INSTALLATION_BLOCKED,
158
+ INSTALL_FAILURE,
135
159
INSTALLED,
136
- UNINSTALLING,
160
+ UNINSTALLING, // XXX: necessary ?!
161
+ UNINSTALL_FAILURE,
137
162
UNINSTALLED
138
163
};
139
164
140
165
enum FailReason : uint8_t {
141
- NONE,
166
+ NONE, // XXX: Not in HLA
142
167
SIGNATURE_VERIFICATION_FAILURE,
143
168
PACKAGE_MISMATCH_FAILURE,
144
169
INVALID_METADATA_FAILURE,
@@ -149,8 +174,8 @@ namespace Exchange {
149
174
string packageId;
150
175
// @brief Version
151
176
string version;
152
- // @brief PackageState
153
- PackageLifecycleState packageState ;
177
+ // @brief state
178
+ InstallState state ;
154
179
// @brief Digest
155
180
string digest;
156
181
// @brief SizeKb
@@ -194,7 +219,7 @@ namespace Exchange {
194
219
const string &version,
195
220
IPackageInstaller::IKeyValueIterator* const & additionalMetadata,
196
221
const string &fileLocator,
197
- FailReason &reason /* @out */ ) = 0;
222
+ FailReason &failReason /* @out */ ) = 0;
198
223
199
224
// @brief Uninstall
200
225
// @text uninstall
@@ -225,7 +250,7 @@ namespace Exchange {
225
250
virtual Core::hresult PackageState (
226
251
const string &packageId,
227
252
const string &version,
228
- PackageLifecycleState &state /* @out */
253
+ InstallState &state /* @out */
229
254
) = 0;
230
255
};
231
256
0 commit comments