Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion apis/Ids.h
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,11 @@ namespace Exchange {
ID_APP_NOTIFICATIONS_HANDLER_INTERNAL_EMITTER = ID_APP_NOTIFICATIONS + 2,

ID_FIRMWARE_DOWNLOAD = ID_ENTOS_OFFSET + 0x460,
ID_FIRMWARE_DOWNLOAD_NOTIFICATION = ID_FIRMWARE_DOWNLOAD + 1
ID_FIRMWARE_DOWNLOAD_NOTIFICATION = ID_FIRMWARE_DOWNLOAD + 1,

ID_RESOURCEMANAGER = ID_ENTOS_OFFSET + 0x470,
ID_RESOURCEMANAGER_CLIENT_ITERATOR = ID_RESOURCEMANAGER + 1,
ID_RESOURCEMANAGER_APPID_ITERATOR = ID_RESOURCEMANAGER + 2
}; // enum IDS

} // namespace Exchange
Expand Down
86 changes: 86 additions & 0 deletions apis/ResourceManager/IResourceManager.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:
*
* Copyright 2026 RDK Management
*
* Licensed under the Apache License, Version 2.0 (the "License");

Check failure on line 7 in apis/ResourceManager/IResourceManager.h

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'apis/ResourceManager/IResourceManager.h' (Match: peridyno/peridyno/0.4.0, 14 lines, url: https://github.com/peridyno/peridyno/archive/refs/tags/v0.4.0.tar.gz, file: src/Framework/Module/Pipeline.h)
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once
#include "Module.h"

// @stubgen:include <com/IIteratorType.h>

namespace WPEFramework
{
namespace Exchange
{
/* @json 1.0.0 @text:keep */
struct EXTERNAL IResourceManager : virtual public Core::IUnknown
{
enum { ID = ID_RESOURCEMANAGER };

// @brief Define custom iterators for ResourceManager
using IClientIterator = RPC::IIteratorType<string, ID_RESOURCEMANAGER_CLIENT_ITERATOR>;
using IAppIdIterator = RPC::IIteratorType<string, ID_RESOURCEMANAGER_APPID_ITERATOR>;

// @brief Result struct for TTS operations
struct EXTERNAL TTSResult {
bool success /* @text success */ /* @brief Indicates whether the TTS operation was successful */;
};

/**********************setAVBlocked() - start****************************/
// @text setAVBlocked
// @brief Sets AV blocking status for an application
// @param appId: The unique identifier of the application
// @param blocked: Boolean flag indicating whether to block (true) or unblock (false) AV access
// @param message: Status or error message describing the result of the operation
// @param success: Boolean flag indicating whether the operation was successful
// @retval ERROR_NONE: Operation completed successfully
// @retval ERROR_GENERAL: Operation failed
virtual Core::hresult SetAVBlocked(const string& appId /* @text appId */, const bool blocked /* @text blocked */, string& message /* @out */, bool& success /* @out */) = 0;
/**********************setAVBlocked() - end******************************/

/**********************getBlockedAVApplications() - start***************/
// @text getBlockedAVApplications
// @brief Gets list of applications with blocked AV access
// @param clients: Iterator containing the list of application identifiers that have blocked AV access
// @param success: Boolean flag indicating whether the operation was successful
// @retval ERROR_NONE: Operation completed successfully
// @retval ERROR_GENERAL: Operation failed
virtual Core::hresult GetBlockedAVApplications(IClientIterator*& clients /* @out */, bool& success /* @out */) const = 0;
/**********************getBlockedAVApplications() - end*****************/

/**********************reserveTTSResource() - start*********************/
// @text reserveTTSResource
// @brief Reserves TTS resource for a single application
// @param appId: The unique identifier of the application requesting TTS resource reservation
// @param ttsResult: Structure containing the result of the TTS resource reservation operation
// @retval ERROR_NONE: Operation completed successfully
// @retval ERROR_GENERAL: Operation failed
virtual Core::hresult ReserveTTSResource(const string& appId /* @text appId */, TTSResult& ttsResult /* @out */) = 0;
/**********************reserveTTSResource() - end***********************/

/**********************reserveTTSResourceForApps() - start***************/
// @text reserveTTSResourceForApps
// @brief Reserves TTS resource for multiple applications
// @param appIds: Iterator containing the list of application identifiers requesting TTS resource reservation
// @param ttsResult: Structure containing the result of the TTS resource reservation operation
// @retval ERROR_NONE: Operation completed successfully
// @retval ERROR_GENERAL: Operation failed
virtual Core::hresult ReserveTTSResourceForApps(IAppIdIterator* const appIds /* @text appIds */, TTSResult& ttsResult /* @out */) = 0;
/**********************reserveTTSResourceForApps() - end*****************/
};
} // namespace Exchange
} // namespace WPEFramework
1 change: 1 addition & 0 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
- [RDKShell<sup>@</sup>](apis/RDKShellPlugin.md)
- [RDKWindowManager](apis/RDKWindowManager.md)
- [RemoteControl<sup>@</sup>](apis/RemoteControlPlugin.md)
- [ResourceManager](apis/ResourceManager.md)
- [ResourceManager<sup>@</sup>](apis/ResourceManagerPlugin.md)
- [ScreenCapture](apis/ScreenCapture.md)
- [SharedStorage](apis/SharedStorage.md)
Expand Down
274 changes: 274 additions & 0 deletions docs/apis/ResourceManager.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,274 @@
<!-- Generated automatically, DO NOT EDIT! -->
<a id="ResourceManager_Plugin"></a>
# ResourceManager Plugin

**Version: [1.0.0](https://github.com/rdkcentral/entservices-apis/tree/main/apis/ResourceManager/IResourceManager.h)**

A ResourceManager plugin for Thunder framework.

### Table of Contents

- [Abbreviation, Acronyms and Terms](#abbreviation-acronyms-and-terms)
- [Description](#Description)
- [Configuration](#Configuration)
- [Methods](#Methods)

<a id="abbreviation-acronyms-and-terms"></a>
# Abbreviation, Acronyms and Terms

[[Refer to this link](overview/aat.md)]

<a id="Description"></a>
# Description

The `ResourceManager` plugin provides an interface for ResourceManager.

The plugin is designed to be loaded and executed within the Thunder framework. For more information about the framework refer to [[Thunder](https://rdkcentral.github.io/Thunder/)].

<a id="Configuration"></a>
# Configuration

The table below lists configuration options of the plugin.

| Name | Type | Description |
| :-------- | :-------- | :-------- |
| callsign | string | Plugin instance name (default: org.rdk.ResourceManager) |
| classname | string | Class name: *ResourceManager* |
| locator | string | Library name: *libWPEFrameworkResourceManager.so* |
| autostart | boolean | Determines if the plugin shall be started automatically along with the framework |

<a id="Methods"></a>
# Methods

The following methods are provided by the ResourceManager plugin:

ResourceManager interface methods:

| Method | Description |
| :-------- | :-------- |
| [getBlockedAVApplications](#getBlockedAVApplications) | Gets list of applications with blocked AV access |
| [reserveTTSResource](#reserveTTSResource) | Reserves TTS resource for a single application |
| [reserveTTSResourceForApps](#reserveTTSResourceForApps) | Reserves TTS resource for multiple applications |
| [setAVBlocked](#setAVBlocked) | Sets AV blocking status for an application |

<a id="getBlockedAVApplications"></a>
## *getBlockedAVApplications*

Gets list of applications with blocked AV access

### Events
Event details will be updated soon.
### Parameters
This method takes no parameters.
### Results
| Name | Type | Description |
| :-------- | :-------- | :-------- |
| result | object | |
| result.clients | IClientIterator | Iterator containing the list of application identifiers that have blocked AV access |
| result.clients[#] | string | |
| result.success | bool | Indicates whether the TTS operation was successful |

### Examples


#### Request

```json
{
"jsonrpc": 2.0,
"id": 0,
"method": "org.rdk.ResourceManager.getBlockedAVApplications"
}
```


#### CURL Command

```curl
curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 0, "method": "org.rdk.ResourceManager.getBlockedAVApplications"}' http://127.0.0.1:9998/jsonrpc
```


#### Response

```json
{
"jsonrpc": 2.0,
"id": 0,
"result": {
"clients": [
""
],
"success": true
}
}
```

<a id="reserveTTSResource"></a>
## *reserveTTSResource*

Reserves TTS resource for a single application

### Events
Event details will be updated soon.
### Parameters
| Name | Type | Description |
| :-------- | :-------- | :-------- |
| params | object | |
| params.appId | string | The unique identifier of the application |
### Results
| Name | Type | Description |
| :-------- | :-------- | :-------- |
| result | object | |
| result.success | bool | Indicates whether the TTS operation was successful |

### Examples


#### Request

```json
{
"jsonrpc": 2.0,
"id": 1,
"method": "org.rdk.ResourceManager.reserveTTSResource",
"params": {
"appId": ""
}
}
```


#### CURL Command

```curl
curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 1, "method": "org.rdk.ResourceManager.reserveTTSResource", "params": {"appId": ""}}' http://127.0.0.1:9998/jsonrpc
```


#### Response

```json
{
"jsonrpc": 2.0,
"id": 1,
"result": {
"success": true
}
}
```

<a id="reserveTTSResourceForApps"></a>
## *reserveTTSResourceForApps*

Reserves TTS resource for multiple applications

### Events
Event details will be updated soon.
### Parameters
| Name | Type | Description |
| :-------- | :-------- | :-------- |
| params | object | |
| params.appIds | IAppIdIterator | Iterator containing the list of application identifiers requesting TTS resource reservation |
| params.appIds[#] | string | |
### Results
| Name | Type | Description |
| :-------- | :-------- | :-------- |
| result | object | |
| result.success | bool | Indicates whether the TTS operation was successful |

### Examples


#### Request

```json
{
"jsonrpc": 2.0,
"id": 2,
"method": "org.rdk.ResourceManager.reserveTTSResourceForApps",
"params": [
""
]
}
```


#### CURL Command

```curl
curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 2, "method": "org.rdk.ResourceManager.reserveTTSResourceForApps", "params": [""]}' http://127.0.0.1:9998/jsonrpc
```


#### Response

```json
{
"jsonrpc": 2.0,
"id": 2,
"result": {
"success": true
}
}
```

<a id="setAVBlocked"></a>
## *setAVBlocked*

Sets AV blocking status for an application

### Events
Event details will be updated soon.
### Parameters
| Name | Type | Description |
| :-------- | :-------- | :-------- |
| params | object | |
| params.appId | string | The unique identifier of the application |
| params.blocked | bool | Boolean flag indicating whether to block (true) or unblock (false) AV access |
### Results
| Name | Type | Description |
| :-------- | :-------- | :-------- |
| result | object | |
| result.message | string | Status or error message describing the result of the operation |
| result.success | bool | Indicates whether the TTS operation was successful |

### Examples


#### Request

```json
{
"jsonrpc": 2.0,
"id": 3,
"method": "org.rdk.ResourceManager.setAVBlocked",
"params": {
"appId": "",
"blocked": true
}
}
```


#### CURL Command

```curl
curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 3, "method": "org.rdk.ResourceManager.setAVBlocked", "params": {"appId": "", "blocked": true}}' http://127.0.0.1:9998/jsonrpc
```


#### Response

```json
{
"jsonrpc": 2.0,
"id": 3,
"result": {
"message": "",
"success": true
}
}
```


Loading