Skip to content

Latest commit

 

History

History
272 lines (202 loc) · 5.75 KB

File metadata and controls

272 lines (202 loc) · 5.75 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 list of applications with blocked AV access
reserveTTSResource Reserves TTS resource for a single application
reserveTTSResourceForApps Reserves TTS resource for multiple applications
setAVBlocked Sets AV blocking status for an application

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

{
    "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 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

{
    "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 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

{
    "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

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

Results

Name Type Description
result object
result.success bool success status

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
    }
}