Skip to content

Latest commit

 

History

History
272 lines (202 loc) · 5.8 KB

File metadata and controls

272 lines (202 loc) · 5.8 KB

ResourceManager Plugin

Version: 1.0.0

A ResourceManager plugin for Thunder framework.

Table of Contents

Abbreviation, Acronyms and Terms

[Refer to this link]

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].

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

Methods

The following methods are provided by the ResourceManager plugin:

ResourceManager interface methods:

Method Description
getBlockedAVApplications Gets a list of blacklisted clients
reserveTTSResource Reserves the Text To Speech resource for a specified client
reserveTTSResourceForApps Reserves the Text To Speech resource for specified clients
setAVBlocked Adds/removes the application with the given callsign to/from the AV blacklist

getBlockedAVApplications

Gets a list of blacklisted clients

Events

Event details will be updated soon.

Parameters

This method takes no parameters.

Results

Name Type Description
result object
result.clients IStringIterator IStringIterator
result.clients[#] string
result.success bool boolean

Examples

Request

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

CURL Command

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

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

reserveTTSResource

Reserves the Text To Speech resource for a specified client

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 boolean

Examples

Request

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

CURL Command

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

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

reserveTTSResourceForApps

Reserves the Text To Speech resource for specified clients

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.appids IStringIterator IStringIterator
params.appids[#] string

Results

Name Type Description
result object
result.success bool boolean

Examples

Request

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

CURL Command

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

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

setAVBlocked

Adds/removes the application with the given callsign to/from the AV blacklist

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.appId string string
params.blocked bool boolean

Results

Name Type Description
result object
result.success bool boolean

Examples

Request

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

CURL Command

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

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