Skip to content

Latest commit

 

History

History
204 lines (150 loc) · 5.24 KB

File metadata and controls

204 lines (150 loc) · 5.24 KB

ScreenCapture Plugin

Version: 1.0.0

A ScreenCapture plugin for Thunder framework.

Table of Contents

Abbreviation, Acronyms and Terms

[Refer to this link]

Description

The ScreenCapture plugin provides an interface for ScreenCapture.

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.ScreenCapture)
classname string Class name: ScreenCapture
locator string Library name: libWPEFrameworkScreenCapture.so
autostart boolean Determines if the plugin shall be started automatically along with the framework

Methods

The following methods are provided by the ScreenCapture plugin:

ScreenCapture interface methods:

Method Description
sendScreenshot Takes screenshot and uploads it to a specified URL, where the URL value is retrieved from an RFC parameter named Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.ScreenCapture.URL and Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.ScreenCapture.Enable that check whether screencapture is enabled.@param: callGUID - A unique identifier of a call. The identifier is used to find a corresponding uploadComplete event @param: result - Whether the request succeeded
uploadScreenCapture Takes a screenshot and uploads it to the specified URL

sendScreenshot

Takes a screenshot and uploads it to the specified URL @param: callGUID - A unique identifier of a call. The identifier is used to find a corresponding uploadComplete event @param: result - Whether the request succeeded

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.callGUID string string

Results

Name Type Description
result object
result.success bool success

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 0,
    "method": "org.rdk.ScreenCapture.sendScreenshot",
    "params": {
        "callGUID": ""
    }
}

CURL Command

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

Response

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

uploadScreenCapture

Takes a screenshot and uploads it to the specified URL

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.url string string
params.callGUID string string

Results

Name Type Description
result object
result.success bool success

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 1,
    "method": "org.rdk.ScreenCapture.uploadScreenCapture",
    "params": {
        "url": "",
        "callGUID": ""
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 1, "method": "org.rdk.ScreenCapture.uploadScreenCapture", "params": {"url": "", "callGUID": ""}}' http://127.0.0.1:9998/jsonrpc

Response

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

Notifications

Notifications are autonomous events, triggered by the internals of the implementation, and broadcasted via JSON-RPC to all registered observers. Refer to [Thunder] for information on how to register for a notification.

The following events are provided by the ScreenCapture plugin:

ScreenCapture interface events:

Event Description
uploadComplete Triggered after uploading a screen capture

uploadComplete

Triggered after uploading a screen capture

Parameters

Name Type Description
params object
params.status bool boolean
params.message string string
params.call_guid string string

Examples

{
    "jsonrpc": 2.0,
    "id": 2,
    "method": "org.rdk.ScreenCapture.uploadComplete",
    "params": {
        "status": true,
        "message": "",
        "call_guid": ""
    }
}