Skip to content

Commit 6165bf0

Browse files
committed
Merge branch 'release/1.15.3'
2 parents c922dbb + e15616e commit 6165bf0

File tree

7 files changed

+526
-609
lines changed

7 files changed

+526
-609
lines changed

CHANGELOG.md

Lines changed: 106 additions & 401 deletions
Large diffs are not rendered by default.

apis/PackageManager/IPackageManager.h

Lines changed: 66 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -27,38 +27,47 @@
2727
namespace WPEFramework {
2828
namespace Exchange {
2929

30-
/* @json */
30+
// @json 1.0.0 @text:keep
3131
struct EXTERNAL IPackageManager : virtual public Core::IUnknown {
3232

3333
using IStringIterator = RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>;
3434

3535
enum { ID = ID_PACKAGEMANAGER };
3636

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,
3941
const string& id,
4042
const string& version,
4143
const string& url,
4244
const string& appName,
4345
const string& category,
4446
string& handle /* @out */) = 0;
4547

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,
4852
const string& id,
4953
const string& version,
5054
const string& uninstallType,
5155
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,
5461
const string& id,
5562
const string& version,
5663
const string& resKey,
5764
const string& url,
5865
string& handle /* @out */) = 0;
5966

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,
6271
const string& id,
6372
const string& version,
6473
const string& resetType) = 0;
@@ -76,8 +85,10 @@ namespace Exchange {
7685
StorageDetails persistent;
7786
};
7887

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,
8192
const string& id,
8293
const string& version,
8394
StorageInfo& storageinfo /* @out */) const = 0;
@@ -95,45 +106,58 @@ namespace Exchange {
95106
string url;
96107
};
97108

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,
100113
const string& id,
101114
const string& version,
102115
const string& key,
103116
const string& value) = 0;
104117

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,
107122
const string& id,
108123
const string& version,
109124
const string& key) = 0;
110125

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,
113130
const string& id,
114131
const string& version,
115132
MetadataPayload& metadata /* @out */,
116133
IPackageManager::IKeyValueIterator*& resources /* @out */,
117134
IPackageManager::IKeyValueIterator*& auxMetadata /* @out */) const = 0;
118135

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;
121140

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;
124145

125146
/* @event */
126147
struct EXTERNAL INotification : virtual public Core::IUnknown {
127148

128149
enum {ID = ID_PACKAGEMANAGER_NOTIFICATION};
129150

130-
/* @brief Completion of asynchronous operation. */
151+
// @text operationStatus
152+
// @brief Notifies completion of an asynchronous operation.
131153
virtual void OperationStatus(const string& handle, const string& operation, const string& type, const string& id,
132154
const string& version, const string& status, const string& details) = 0;
133155
};
134156

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;
137161

138162
struct EXTERNAL PackageKey {
139163
string id;
@@ -142,34 +166,42 @@ namespace Exchange {
142166

143167
using IPackageKeyIterator = RPC::IIteratorType<PackageKey, ID_PACKAGEMANAGER_PACKAGE_KEY_ITERATOR>;
144168

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(
147173
const string& type,
148174
const string& id,
149175
const string& version,
150176
const string& appName,
151177
const string& category,
152178
IPackageKeyIterator*& installedIds /* @out */) const = 0;
153179

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,
156184
const string& id,
157185
const string& version,
158186
const string& reason,
159187
const string& owner,
160188
string& handle /* @out */) = 0;
161189

162190

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;
165195

166196
struct LockInfo {
167197
string reason;
168198
string owner;
169199
};
170200

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,
173205
const string& id,
174206
const string& version,
175207
LockInfo& result /* @out */) const = 0;
@@ -180,8 +212,8 @@ namespace Exchange {
180212

181213
enum { ID = ID_PACKAGEMANAGER_BROKER };
182214

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;
185217

186218
};
187219

@@ -193,6 +225,5 @@ namespace Exchange {
193225
const string& version, const string& status, const string& details) = 0;
194226

195227
};
196-
197228
}
198229
}

docs/apis/StorageManagerPlugin.md

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
<!-- Generated automatically, DO NOT EDIT! -->
2+
<a name="head.StorageManager_Plugin"></a>
3+
# StorageManager Plugin
4+
5+
A org.rdk.StorageManager plugin for Thunder framework.
6+
7+
### Table of Contents
8+
9+
- [Abbreviation, Acronyms and Terms](#head.Abbreviation,_Acronyms_and_Terms)
10+
- [Description](#head.Description)
11+
- [Configuration](#head.Configuration)
12+
- [Methods](#head.Methods)
13+
14+
<a name="head.Abbreviation,_Acronyms_and_Terms"></a>
15+
# Abbreviation, Acronyms and Terms
16+
17+
[[Refer to this link](overview/aat.md)]
18+
19+
<a name="head.Description"></a>
20+
# Description
21+
22+
The StorageManager is responsible for maintaining the space on the flash disk needed for Web Applications to store Browser functions such as Cookies and Local Storage. It is a Thunder plugin that exposes a single Thunder interface(s) called IStorageManager.
23+
24+
Note: This document only describes the JSON-RPC methods exposed by the plugin, it does not cover COM-RPC interfaces or usage.
25+
26+
The plugin is designed to be loaded and executed within the Thunder framework. For more information about the framework refer to [[Thunder](#ref.Thunder)].
27+
28+
<a name="head.Configuration"></a>
29+
# Configuration
30+
31+
The table below lists configuration options of the plugin.
32+
33+
| Name | Type | Description |
34+
| :-------- | :-------- | :-------- |
35+
| callsign | string | Plugin instance name (default: *org.rdk.StorageManager*) |
36+
| classname | string | Class name: *org.rdk.StorageManager* |
37+
| locator | string | Library name: *libWPEFrameworkStorageManager.so* |
38+
| autostart | boolean | Determines if the plugin shall be started automatically along with the framework |
39+
40+
<a name="head.Methods"></a>
41+
# Methods
42+
43+
The following methods are provided by the org.rdk.StorageManager plugin:
44+
45+
StorageManager interface methods:
46+
47+
| Method | Description |
48+
| :-------- | :-------- |
49+
| [clear](#method.clear) | Clears app data for a given app id |
50+
| [clearAll](#method.clearAll) | Clears all app data except for the exempt app ids |
51+
52+
53+
<a name="method.clear"></a>
54+
## *clear [<sup>method</sup>](#head.Methods)*
55+
56+
Clears app data for a given app id.
57+
58+
### Events
59+
60+
No Events
61+
62+
### Parameters
63+
64+
| Name | Type | Description |
65+
| :-------- | :-------- | :-------- |
66+
| params | object | |
67+
| params.appId | string | Application Identifier |
68+
69+
### Result
70+
71+
| Name | Type | Description |
72+
| :-------- | :-------- | :-------- |
73+
| result | object | Returns success or error status |
74+
| result.error | string | Error message, if any |
75+
76+
### Errors
77+
78+
| Code | Message | Description |
79+
| :-------- | :-------- | :-------- |
80+
| 0 | ```Core::ERROR_NONE``` | Success |
81+
| 1 | ```Core::ERROR_GENERAL``` | General error |
82+
83+
### Example
84+
85+
#### Request
86+
87+
```json
88+
{
89+
"jsonrpc": "2.0",
90+
"id": 42,
91+
"method": "org.rdk.StorageManager.clear",
92+
"params": {
93+
"appId": "com.example.myapp"
94+
}
95+
}
96+
```
97+
98+
#### Response
99+
100+
```json
101+
{
102+
"jsonrpc": "2.0",
103+
"id": 42,
104+
"result": {
105+
"error": "null"
106+
}
107+
}
108+
```
109+
110+
<a name="method.clearAll"></a>
111+
## *clearAll [<sup>method</sup>](#head.Methods)*
112+
113+
Clears all app data except for the exempt app ids.
114+
115+
### Events
116+
117+
No Events
118+
119+
### Parameters
120+
121+
| Name | Type | Description |
122+
| :-------- | :-------- | :-------- |
123+
| params | object | |
124+
| params?.exemptionAppIds | string | <sup>*(optional)*</sup> A JSON-formatted string listing app IDs exempt from clearing |
125+
126+
### Result
127+
128+
| Name | Type | Description |
129+
| :-------- | :-------- | :-------- |
130+
| result | object | Returns success or error status |
131+
| result.error | string | Error message, if any |
132+
133+
### Errors
134+
135+
| Code | Message | Description |
136+
| :-------- | :-------- | :-------- |
137+
| 0 | ```Core::ERROR_NONE``` | Success |
138+
| 1 | ```Core::ERROR_GENERAL``` | General error |
139+
140+
### Example
141+
142+
#### Request
143+
144+
```json
145+
{
146+
"jsonrpc": "2.0",
147+
"id": 42,
148+
"method": "org.rdk.StorageManager.clearAll",
149+
"params": {
150+
"exemptionAppIds": "{\"exemptionAppIds\":[\"com.example.app1\", \"com.example.app2\"]}"
151+
}
152+
}
153+
```
154+
155+
#### Response
156+
157+
```json
158+
{
159+
"jsonrpc": "2.0",
160+
"id": 42,
161+
"result": {
162+
"error": "null"
163+
}
164+
}
165+
```
166+

0 commit comments

Comments
 (0)