27
27
namespace WPEFramework {
28
28
namespace Exchange {
29
29
30
- /* @json */
30
+ // @json 1.0.0 @text:keep
31
31
struct EXTERNAL IPackageManager : virtual public Core::IUnknown {
32
32
33
33
using IStringIterator = RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>;
34
34
35
35
enum { ID = ID_PACKAGEMANAGER };
36
36
37
- /* @brief Download the application bundle. */
38
- virtual uint32_t Install (const string& type,
37
+ /* * Install an application bundle */
38
+ // @text install
39
+ // @brief Downloads and installs an application bundle.
40
+ virtual Core::hresult Install (const string& type,
39
41
const string& id,
40
42
const string& version,
41
43
const string& url,
42
44
const string& appName,
43
45
const string& category,
44
46
string& handle /* @out */ ) = 0;
45
47
46
- /* @brief Uninstall the application. */
47
- virtual uint32_t Uninstall (const string& type,
48
+ /* * Uninstall an application */
49
+ // @text uninstall
50
+ // @brief Uninstalls an application.
51
+ virtual Core::hresult Uninstall (const string& type,
48
52
const string& id,
49
53
const string& version,
50
54
const string& uninstallType,
51
55
string& handle /* @out */ ) = 0;
52
- /* @brief Download arbitrary application's resource file. */
53
- virtual uint32_t Download (const string& type,
56
+
57
+ /* * Download a resource for an app */
58
+ // @text download
59
+ // @brief Downloads a resource file for an application.
60
+ virtual Core::hresult Download (const string& type,
54
61
const string& id,
55
62
const string& version,
56
63
const string& resKey,
57
64
const string& url,
58
65
string& handle /* @out */ ) = 0;
59
66
60
- /* @brief Delete persistent data stored locally. */
61
- virtual uint32_t Reset (const string& type,
67
+ /* * Reset application state */
68
+ // @text reset
69
+ // @brief Deletes all persistent local data of the application.
70
+ virtual Core::hresult Reset (const string& type,
62
71
const string& id,
63
72
const string& version,
64
73
const string& resetType) = 0;
@@ -76,8 +85,10 @@ namespace Exchange {
76
85
StorageDetails persistent;
77
86
};
78
87
79
- /* @brief Information on the storage usage. */
80
- virtual uint32_t GetStorageDetails (const string& type,
88
+ /* * Get application storage usage */
89
+ // @text getStorageDetails
90
+ // @brief Retrieves details about app and persistent storage usage.
91
+ virtual Core::hresult GetStorageDetails (const string& type,
81
92
const string& id,
82
93
const string& version,
83
94
StorageInfo& storageinfo /* @out */ ) const = 0;
@@ -95,45 +106,58 @@ namespace Exchange {
95
106
string url;
96
107
};
97
108
98
- /* @brief Set an arbitrary metadata. */
99
- virtual uint32_t SetAuxMetadata (const string& type,
109
+ /* * Set custom metadata */
110
+ // @text setAuxMetadata
111
+ // @brief Sets a key-value pair of metadata for the application.
112
+ virtual Core::hresult SetAuxMetadata (const string& type,
100
113
const string& id,
101
114
const string& version,
102
115
const string& key,
103
116
const string& value) = 0;
104
117
105
- /* @brief Clears an arbitrary metadata. */
106
- virtual uint32_t ClearAuxMetadata (const string& type,
118
+ /* * Clear custom metadata */
119
+ // @text clearAuxMetadata
120
+ // @brief Clears the specified metadata key.
121
+ virtual Core::hresult ClearAuxMetadata (const string& type,
107
122
const string& id,
108
123
const string& version,
109
124
const string& key) = 0;
110
125
111
- /* @brief Get application metadata. */
112
- virtual uint32_t GetMetadata (const string& type,
126
+ /* * Get all metadata and resources */
127
+ // @text getMetadata
128
+ // @brief Retrieves metadata and auxiliary resource list for an application.
129
+ virtual Core::hresult GetMetadata (const string& type,
113
130
const string& id,
114
131
const string& version,
115
132
MetadataPayload& metadata /* @out */ ,
116
133
IPackageManager::IKeyValueIterator*& resources /* @out */ ,
117
134
IPackageManager::IKeyValueIterator*& auxMetadata /* @out */ ) const = 0;
118
135
119
- /* @brief Cancel asynchronous request. */
120
- virtual uint32_t Cancel (const string& handle) = 0;
136
+ /* * Cancel an ongoing operation */
137
+ // @text cancel
138
+ // @brief Cancels a previously issued asynchronous request.
139
+ virtual Core::hresult Cancel (const string& handle) = 0;
121
140
122
- /* @brief Estimated progress of a request. */
123
- virtual uint32_t GetProgress (const string& handle, uint32_t & progress /* @out */ ) const = 0;
141
+ /* * Get progress of an operation */
142
+ // @text getProgress
143
+ // @brief Provides the current progress of an ongoing operation.
144
+ virtual Core::hresult GetProgress (const string& handle, uint32_t & progress /* @out */ ) const = 0;
124
145
125
146
/* @event */
126
147
struct EXTERNAL INotification : virtual public Core::IUnknown {
127
148
128
149
enum {ID = ID_PACKAGEMANAGER_NOTIFICATION};
129
150
130
- /* @brief Completion of asynchronous operation. */
151
+ // @text operationStatus
152
+ // @brief Notifies completion of an asynchronous operation.
131
153
virtual void OperationStatus (const string& handle, const string& operation, const string& type, const string& id,
132
154
const string& version, const string& status, const string& details) = 0;
133
155
};
134
156
135
- virtual uint32_t Register (IPackageManager::INotification* notification) = 0;
136
- virtual uint32_t Unregister (IPackageManager::INotification* notification) = 0;
157
+ /* * Register for notifications */
158
+ virtual Core::hresult Register (IPackageManager::INotification* notification) = 0;
159
+ /* * Unregister from notifications */
160
+ virtual Core::hresult Unregister (IPackageManager::INotification* notification) = 0;
137
161
138
162
struct EXTERNAL PackageKey {
139
163
string id;
@@ -142,34 +166,42 @@ namespace Exchange {
142
166
143
167
using IPackageKeyIterator = RPC::IIteratorType<PackageKey, ID_PACKAGEMANAGER_PACKAGE_KEY_ITERATOR>;
144
168
145
- /* @brief List installed applications. */
146
- virtual uint32_t GetList (
169
+ /* * List installed apps */
170
+ // @text getList
171
+ // @brief Retrieves list of installed apps matching given filters.
172
+ virtual Core::hresult GetList (
147
173
const string& type,
148
174
const string& id,
149
175
const string& version,
150
176
const string& appName,
151
177
const string& category,
152
178
IPackageKeyIterator*& installedIds /* @out */ ) const = 0;
153
179
154
- /* @brief Lock the application. Preventing uninstallation. */
155
- virtual uint32_t Lock (const string& type,
180
+ /* * Lock application from uninstalling */
181
+ // @text lock
182
+ // @brief Locks an application to prevent uninstallation.
183
+ virtual Core::hresult Lock (const string& type,
156
184
const string& id,
157
185
const string& version,
158
186
const string& reason,
159
187
const string& owner,
160
188
string& handle /* @out */ ) = 0;
161
189
162
190
163
- /* @brief Unlock application. */
164
- virtual uint32_t Unlock (const string& handle) = 0;
191
+ /* * Unlock application */
192
+ // @text unlock
193
+ // @brief Unlocks a previously locked application.
194
+ virtual Core::hresult Unlock (const string& handle) = 0;
165
195
166
196
struct LockInfo {
167
197
string reason;
168
198
string owner;
169
199
};
170
200
171
- /* @brief Get lock info. */
172
- virtual uint32_t GetLockInfo (const string& type,
201
+ /* * Get lock details */
202
+ // @text getLockInfo
203
+ // @brief Provides lock reason and owner for an app.
204
+ virtual Core::hresult GetLockInfo (const string& type,
173
205
const string& id,
174
206
const string& version,
175
207
LockInfo& result /* @out */ ) const = 0;
@@ -180,8 +212,8 @@ namespace Exchange {
180
212
181
213
enum { ID = ID_PACKAGEMANAGER_BROKER };
182
214
183
- virtual uint32_t Offer (IPackageManager* packagemanager) = 0;
184
- virtual uint32_t Revoke (const IPackageManager* packagemanager) = 0;
215
+ virtual Core::hresult Offer (IPackageManager* packagemanager) = 0;
216
+ virtual Core::hresult Revoke (const IPackageManager* packagemanager) = 0;
185
217
186
218
};
187
219
@@ -193,6 +225,5 @@ namespace Exchange {
193
225
const string& version, const string& status, const string& details) = 0;
194
226
195
227
};
196
-
197
228
}
198
229
}
0 commit comments