Version: 1.0
Status: ⚫⚫⚫
PackageManager plugin for Thunder framework.
This document describes purpose and functionality of the PackageManager plugin. It includes detailed specification about its configuration, methods provided and notifications sent.
All identifiers of 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.
Acronyms, Abbreviations and Terms
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 Package Manager plugin allows installation of packages on the system from a remote repository.
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: PackageManager )
classname
string
Class name: PackageManager
locator
string
Library name: libThunderPackageManager.so
autostart
boolean
Determines if the plugin shall be started automatically along with the framework
This plugin implements the following interfaces:
The following methods are provided by the PackageManager plugin:
PackageManager interface methods:
Download the application bundle.
Name
Type
Description
params
object
params.type
string
params.id
string
params.version
string
params.url
string
params.appname
string
params.category
string
Name
Type
Description
handle
string
{
"jsonrpc" : " 2.0" ,
"id" : 42 ,
"method" : " PackageManager.1.install" ,
"params" : {
"type" : " ..." ,
"id" : " ..." ,
"version" : " ..." ,
"url" : " ..." ,
"appname" : " ..." ,
"category" : " ..."
}
}
{
"jsonrpc" : " 2.0" ,
"id" : 42 ,
"result" : " ..."
}
Uninstall the application.
Name
Type
Description
params
object
params.type
string
params.id
string
params.version
string
params.uninstalltype
string
Name
Type
Description
handle
string
{
"jsonrpc" : " 2.0" ,
"id" : 42 ,
"method" : " PackageManager.1.uninstall" ,
"params" : {
"type" : " ..." ,
"id" : " ..." ,
"version" : " ..." ,
"uninstalltype" : " ..."
}
}
{
"jsonrpc" : " 2.0" ,
"id" : 42 ,
"result" : " ..."
}
Download arbitrary application's resource file.
Name
Type
Description
params
object
params.type
string
params.id
string
params.version
string
params.reskey
string
params.url
string
Name
Type
Description
handle
string
{
"jsonrpc" : " 2.0" ,
"id" : 42 ,
"method" : " PackageManager.1.download" ,
"params" : {
"type" : " ..." ,
"id" : " ..." ,
"version" : " ..." ,
"reskey" : " ..." ,
"url" : " ..."
}
}
{
"jsonrpc" : " 2.0" ,
"id" : 42 ,
"result" : " ..."
}
Delete persistent data stored locally.
Name
Type
Description
params
object
params.type
string
params.id
string
params.version
string
params.resettype
string
Name
Type
Description
result
null
Always null
{
"jsonrpc" : " 2.0" ,
"id" : 42 ,
"method" : " PackageManager.1.reset" ,
"params" : {
"type" : " ..." ,
"id" : " ..." ,
"version" : " ..." ,
"resettype" : " ..."
}
}
{
"jsonrpc" : " 2.0" ,
"id" : 42 ,
"result" : null
}
Information on the storage usage.
Name
Type
Description
params
object
params.type
string
params.id
string
params.version
string
Name
Type
Description
storageinfo
object
storageinfo.apps
object
storageinfo.apps.path
string
storageinfo.apps.quotakb
string
storageinfo.apps.usedkb
string
storageinfo.persistent
object
storageinfo.persistent.path
string
storageinfo.persistent.quotakb
string
storageinfo.persistent.usedkb
string
{
"jsonrpc" : " 2.0" ,
"id" : 42 ,
"method" : " PackageManager.1.getstoragedetails" ,
"params" : {
"type" : " ..." ,
"id" : " ..." ,
"version" : " ..."
}
}
{
"jsonrpc" : " 2.0" ,
"id" : 42 ,
"result" : {
"apps" : {
"path" : " ..." ,
"quotakb" : " ..." ,
"usedkb" : " ..."
},
"persistent" : {
"path" : " ..." ,
"quotakb" : " ..." ,
"usedkb" : " ..."
}
}
}
Set an arbitrary metadata.
Name
Type
Description
params
object
params.type
string
params.id
string
params.version
string
params.key
string
params.value
string
Name
Type
Description
result
null
Always null
{
"jsonrpc" : " 2.0" ,
"id" : 42 ,
"method" : " PackageManager.1.setauxmetadata" ,
"params" : {
"type" : " ..." ,
"id" : " ..." ,
"version" : " ..." ,
"key" : " ..." ,
"value" : " ..."
}
}
{
"jsonrpc" : " 2.0" ,
"id" : 42 ,
"result" : null
}
Clears an arbitrary metadata.
Name
Type
Description
params
object
params.type
string
params.id
string
params.version
string
params.key
string
Name
Type
Description
result
null
Always null
{
"jsonrpc" : " 2.0" ,
"id" : 42 ,
"method" : " PackageManager.1.clearauxmetadata" ,
"params" : {
"type" : " ..." ,
"id" : " ..." ,
"version" : " ..." ,
"key" : " ..."
}
}
{
"jsonrpc" : " 2.0" ,
"id" : 42 ,
"result" : null
}
Get application metadata.
Name
Type
Description
params
object
params.type
string
params.id
string
params.version
string
Name
Type
Description
result
object
result.metadata
object
result.metadata.appname
string
result.metadata.type
string
result.metadata.category
string
result.metadata.url
string
result.resources
array
result.resources[#]
object
result.resources[#].key
string
result.resources[#].value
string
result.auxmetadata
array
result.auxmetadata[#]
object
result.auxmetadata[#].key
string
result.auxmetadata[#].value
string
{
"jsonrpc" : " 2.0" ,
"id" : 42 ,
"method" : " PackageManager.1.getmetadata" ,
"params" : {
"type" : " ..." ,
"id" : " ..." ,
"version" : " ..."
}
}
{
"jsonrpc" : " 2.0" ,
"id" : 42 ,
"result" : {
"metadata" : {
"appname" : " ..." ,
"type" : " ..." ,
"category" : " ..." ,
"url" : " ..."
},
"resources" : [
{
"key" : " ..." ,
"value" : " ..."
}
],
"auxmetadata" : [
{
"key" : " ..." ,
"value" : " ..."
}
]
}
}
Cancel asynchronous request.
Name
Type
Description
params
object
params.handle
string
Name
Type
Description
result
null
Always null
{
"jsonrpc" : " 2.0" ,
"id" : 42 ,
"method" : " PackageManager.1.cancel" ,
"params" : {
"handle" : " ..."
}
}
{
"jsonrpc" : " 2.0" ,
"id" : 42 ,
"result" : null
}
Estimated progress of a request.
Name
Type
Description
params
object
params.handle
string
Name
Type
Description
progress
integer
{
"jsonrpc" : " 2.0" ,
"id" : 42 ,
"method" : " PackageManager.1.getprogress" ,
"params" : {
"handle" : " ..."
}
}
{
"jsonrpc" : " 2.0" ,
"id" : 42 ,
"result" : 0
}
List installed applications.
Name
Type
Description
params
object
params.type
string
params.id
string
params.version
string
params.appname
string
params.category
string
Name
Type
Description
installedids
array
installedids[#]
object
installedids[#].id
string
installedids[#].version
string
{
"jsonrpc" : " 2.0" ,
"id" : 42 ,
"method" : " PackageManager.1.getlist" ,
"params" : {
"type" : " ..." ,
"id" : " ..." ,
"version" : " ..." ,
"appname" : " ..." ,
"category" : " ..."
}
}
{
"jsonrpc" : " 2.0" ,
"id" : 42 ,
"result" : [
{
"id" : " ..." ,
"version" : " ..."
}
]
}
Lock the application. Preventing uninstallation.
Name
Type
Description
params
object
params.type
string
params.id
string
params.version
string
params.reason
string
params.owner
string
Name
Type
Description
handle
string
{
"jsonrpc" : " 2.0" ,
"id" : 42 ,
"method" : " PackageManager.1.lock" ,
"params" : {
"type" : " ..." ,
"id" : " ..." ,
"version" : " ..." ,
"reason" : " ..." ,
"owner" : " ..."
}
}
{
"jsonrpc" : " 2.0" ,
"id" : 42 ,
"result" : " ..."
}
Unlock application.
Name
Type
Description
params
object
params.handle
string
Name
Type
Description
result
null
Always null
{
"jsonrpc" : " 2.0" ,
"id" : 42 ,
"method" : " PackageManager.1.unlock" ,
"params" : {
"handle" : " ..."
}
}
{
"jsonrpc" : " 2.0" ,
"id" : 42 ,
"result" : null
}
Get lock info.
Name
Type
Description
params
object
params.type
string
params.id
string
params.version
string
Name
Type
Description
result
object
result.reason
string
result.owner
string
{
"jsonrpc" : " 2.0" ,
"id" : 42 ,
"method" : " PackageManager.1.getlockinfo" ,
"params" : {
"type" : " ..." ,
"id" : " ..." ,
"version" : " ..."
}
}
{
"jsonrpc" : " 2.0" ,
"id" : 42 ,
"result" : {
"reason" : " ..." ,
"owner" : " ..."
}
}
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 PackageManager plugin:
PackageManager interface events:
Completion of asynchronous operation.
Name
Type
Description
params
object
params.handle
string
params.operation
string
params.type
string
params.id
string
params.version
string
params.status
string
params.details
string
{
"jsonrpc" : " 2.0" ,
"method" : " client.events.1.operationstatus" ,
"params" : {
"handle" : " ..." ,
"operation" : " ..." ,
"type" : " ..." ,
"id" : " ..." ,
"version" : " ..." ,
"status" : " ..." ,
"details" : " ..."
}
}