-
Notifications
You must be signed in to change notification settings - Fork 17
Plugin Testing #735
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Plugin Testing #735
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| /* | ||
| * 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
|
||
| * 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 }; | ||
|
|
||
| // Define string iterator for ResourceManager | ||
| using IStringIterator = RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>; | ||
|
|
||
| // Result struct for SetAVBlocked operation | ||
| struct EXTERNAL SetAVBlockedResult { | ||
| bool success; | ||
| Core::OptionalType<string> message; | ||
| }; | ||
|
|
||
| // Result struct for TTS operations | ||
| struct EXTERNAL TTSResult { | ||
| bool success; | ||
| Core::OptionalType<string> message; | ||
| }; | ||
|
|
||
| /**********************setAVBlocked() - start****************************/ | ||
| // @text setAVBlocked | ||
| // @brief Sets AV blocking status for an application | ||
| // @param appId - in - string | ||
| // @param blocked - in - bool | ||
| // @param result - out - SetAVBlockedResult | ||
| virtual Core::hresult SetAVBlocked(const string& appId, const bool blocked, SetAVBlockedResult& result /* @out */) = 0; | ||
| /**********************setAVBlocked() - end******************************/ | ||
|
|
||
| /**********************getBlockedAVApplications() - start***************/ | ||
| // @text getBlockedAVApplications | ||
| // @brief Gets list of applications with blocked AV access | ||
| // @param clients: list of blocked applications | ||
| // @param success: success status | ||
| virtual Core::hresult GetBlockedAVApplications(IStringIterator*& clients /* @out */, bool& success /* @out */) const = 0; | ||
| /**********************getBlockedAVApplications() - end*****************/ | ||
|
|
||
| /**********************reserveTTSResource() - start*********************/ | ||
| // @text reserveTTSResource | ||
| // @brief Reserves TTS resource for a single application | ||
| // @param appId - in - string | ||
| // @param ttsResult - out - TTSResult | ||
| virtual Core::hresult ReserveTTSResource(const string& appId, TTSResult& ttsResult /* @out */) = 0; | ||
| /**********************reserveTTSResource() - end***********************/ | ||
|
|
||
| /**********************reserveTTSResourceForApps() - start***************/ | ||
| // @text reserveTTSResourceForApps | ||
| // @brief Reserves TTS resource for multiple applications | ||
| // @param appids: list of application IDs | ||
| // @param ttsResult: result of the TTS reservation | ||
| virtual Core::hresult ReserveTTSResourceForApps(IStringIterator* const appids, TTSResult& ttsResult /* @out */) = 0; | ||
| /**********************reserveTTSResourceForApps() - end*****************/ | ||
| }; | ||
| } // namespace Exchange | ||
| } // namespace WPEFramework | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -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) | ||||||
|
||||||
| - [ResourceManager<sup>@</sup>](apis/ResourceManagerPlugin.md) | |
| - [ResourceManager Plugin<sup>@</sup>](apis/ResourceManagerPlugin.md) |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,272 @@ | ||||||
| <!-- 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 | IStringIterator | list of blocked applications | | ||||||
| | result.clients[#] | string | | | ||||||
| | result.success | bool | success status | | ||||||
|
|
||||||
| ### 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 | string | | ||||||
|
||||||
| ### Results | ||||||
| | Name | Type | Description | | ||||||
| | :-------- | :-------- | :-------- | | ||||||
| | result | object | | | ||||||
| | result.success | bool | success status | | ||||||
|
|
||||||
| ### 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 | IStringIterator | list of application IDs | | ||||||
| | params.appids[#] | string | | | ||||||
| ### Results | ||||||
| | Name | Type | Description | | ||||||
| | :-------- | :-------- | :-------- | | ||||||
| | result | object | | | ||||||
| | result.success | bool | success status | | ||||||
|
|
||||||
| ### 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 | string | | ||||||
| | params.blocked | bool | bool | | ||||||
|
||||||
| | params.blocked | bool | bool | | |
| | params.blocked | bool | Whether to block (`true`) or unblock (`false`) AV access for the application | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The message field in SetAVBlockedResult is not documented in the API documentation (ResourceManager.md), but it appears to be part of the interface. Users won't know this field exists or what it contains. This also applies to the message field in TTSResult on line 46.