Version: 1.0
Status: :black_circle::black_circle::white_circle:
Cobalt plugin for Thunder framework.
This document describes purpose and functionality of the Cobalt plugin. It includes detailed specification of its configuration, methods and properties provided, as well as notifications sent.
All identifiers on the interfaces described in this document are case-sensitive. Thus, unless stated otherwise, all keywords, entities, properties, relations and actions should be treated as such.
The table below provides and overview of acronyms used in this document and their definitions.
| Acronym | Description |
|---|---|
| API | Application Programming Interface |
| HTTP | Hypertext Transfer Protocol |
| JSON | JavaScript Object Notation; a data interchange format |
| JSON-RPC | A remote procedure call protocol encoded in JSON |
The table below provides and overview of terms and abbreviations used in this document and their definitions.
| Term | Description |
|---|---|
| callsign | The name given to an instance of a plugin. One plugin can be instantiated multiple times, but each instance the instance name, callsign, must be unique. |
| Ref ID | Description |
|---|---|
| HTTP | HTTP specification |
| JSON-RPC | JSON-RPC 2.0 specification |
| JSON | JSON specification |
| Thunder | Thunder API Reference |
The Cobalt plugin provides web browsing functionality based on the Cobalt engine.
The plugin is designed to be loaded and executed within the Thunder framework. For more information about the framework refer to [Thunder].
The table below lists configuration options of the plugin.
| Name | Type | Description |
|---|---|---|
| callsign | string | Plugin instance name (default: Cobalt) |
| classname | string | Class name: Cobalt |
| locator | string | Library name: libWPEFrameworkCobalt.so |
| autostart | boolean | Determines if the plugin is to be started automatically along with the framework |
| configuration | object | (optional) |
| configuration?.url | string | (optional) The URL that is loaded upon starting the browser |
| configuration?.language | string | (optional) POSIX-style Language(Locale) ID. Example: ‘en_US’ |
The following methods are provided by the Cobalt plugin:
Cobalt interface methods:
| Method | Description |
|---|---|
| deeplink | Send a deep link to the application |
Send a deep link to the application.
| Name | Type | Description |
|---|---|---|
| params | string | An application-specific link |
| Name | Type | Description |
|---|---|---|
| result | null |
{ "jsonrpc": "2.0", "id": 1234567890, "method": "Cobalt.1.deeplink", "params": "" }
{ "jsonrpc": "2.0", "id": 1234567890, "result": null }
The following properties are provided by the Cobalt plugin:
StateControl interface properties:
| Property | Description |
|---|---|
| state | Running state of the service |
Provides access to the running state of the service.
Also see: statechange
| Name | Type | Description |
|---|---|---|
| (property) | string | Running state of the service (must be one of the following: resumed, suspended) |
{ "jsonrpc": "2.0", "id": 1234567890, "method": "Cobalt.1.state" }
{ "jsonrpc": "2.0", "id": 1234567890, "result": "resumed" }
{ "jsonrpc": "2.0", "id": 1234567890, "method": "Cobalt.1.state", "params": "resumed" }
{ "jsonrpc": "2.0", "id": 1234567890, "result": "null" }
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 Cobalt plugin:
StateControl interface events:
| Event | Description |
|---|---|
| statechange | Signals a state change of the service |
Signals a state change of the service.
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.suspended | boolean | Determines if the service has entered suspended state (true) or resumed state (false) |
{ "jsonrpc": "2.0", "method": "client.events.1.statechange", "params": { "suspended": false } }