LunaSysMgr
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Service API com.palm.appinstaller/

Public methods:


install

Public.

com.palm.appinstaller/install

Install an application.

Syntax:

{
"target": string,
"id": string,
"uncompressedSize": integer,
"subscribe": boolean
}
Parameters
targetPackage file. Required.
idID for the package.
uncompressedSizeUncompressed size of the package.
subscribeSet to true to receive status change events.

Returns when installation request is made:

{
"returnValue": boolean,
"subscribed": boolean,
"ticket": string
}
Parameters
returnValueIndicates if the call was succesful.
subscribedIndicates if subscribed to receive status change events.
ticketIdentifier that was assigned for the installation request.

Returns when status changes:

{
"ticket": int,
"status": string
}
Parameters
ticketIdentifier that was assigned for the installation request.
statusDescribes the installation status.

Examples:

luna-send -n 10 -f luna://com.palm.appinstaller/install '{ "target": "/tmp/apackage", "id": "com.whatnot.package", "uncompressedSize": 100, "subscribe": true }'

Example response for a succesful call:

{
"returnValue": true,
"subscribed": true,
"ticket": "6"
}

Example status updates for a failed installation when subscribed:

{
"ticket": 6,
"status": "STARTING"
}
{
"ticket": 6,
"status": "FAILED_PACKAGEFILE_NOT_FOUND"
}
{
"ticket": 6,
"status": "FAILED_IPKG_INSTALL"
}

Example response for a failed call:

{
"returnValue": false,
"subscribed": false
}


installNoVerify

Public.

com.palm.appinstaller/installNoVerify

Install a package without verification.

Syntax:

{
"target": string,
"uncompressedSize": integer,
"systemMode": boolean,
"subscribe": boolean
}
Parameters
targetPackage file. Required.
uncompressedSizeUncompressed size of the package.
systemModeSet to true to turn on system mode, which disables ipkg flags.
subscribeSet to true to receive status change events.

Returns for a call:

{
"returnValue": boolean,
"ticket": int,
"subscribed": boolean
}
Parameters
returnValueIndicates if the call was succesful.
ticketIdentifier that was assigned for the installation request.
subscribedIndicates if subscribed to receive status change events.

Returns for status change events:

{
"ticket": int,
"status": string
}
Parameters
ticketIdentifier that was assigned for the installation request.
statusDescribes the installation status.

Examples:

luna-send -n 10 -f luna://com.palm.appinstaller/installNoVerify '{ "target": "/tmp/apackage", "uncompressedSize": 100, "systemMode": true, "subscribe": true }'

Example response for a succesful call:

{
"returnValue": true,
"ticket": 1,
"subscribed": true
}

Example of status changes for a failed installation:

{
"ticket": 1,
"status": "STARTING"
}
{
"ticket": 1,
"status": "FAILED_PACKAGEFILE_NOT_FOUND"
}
{
"ticket": 1,
"status": "FAILED_IPKG_INSTALL"
}

Example response for a failed call:

{
"returnValue": false,
"errorCode": "Failed to find param target in message"
}


remove

Public.

com.palm.appinstaller/remove

Remove a package.

Syntax:

{
"packageName": string,
"subscribe": boolean
}
Parameters
packageNameName of the package to remove.
subscribeSet to true to receive events on status changes.

Returns for a call:

{
"ticket": int,
"returnValue": boolean,
"version": version,
"subscribed": boolean
}
Parameters
ticketIdentifier for the removal.
returnValueIndicates if the call was succesful.
versionInstalled version of the package.
subscribedIndicates if subscribed to receive status change events.

Returns when ticket status changes:

{
"ticket": int,
"status": string
}
Parameters
ticketIdentifier for the removal.
statusDescribes the status of the remove action.

Examples:

luna-send -n 10 -f luna://com.palm.appinstaller/remove '{ "packageName": "com.palm.app.email", "subscribe": true }'

Example response for a succesful call:

{
"ticket": 6,
"returnValue": true,
"version": "3.0.13801",
"subscribed": true
}

Examples of removal status changes:

{
"ticket": 6,
"status": "IPKG_REMOVE"
}
{
"ticket": 6,
"status": "SUCCESS"
}

Example response for a failed call:

{
"returnValue": false
}


notifyOnChange

Public.

com.palm.appinstaller/notifyOnChange

Subscribe to receive notifications when applications are installed or removed.

Syntax:

{
"appId": string
}
Parameters
appIdID of the application to watch. If not specified, notifications are received for all applications.

Returns on call:

{
"returnValue": boolean,
"subscribed": boolean,
"appId":string
}
Parameters
returnValueIndicates if the call was succesful.
subscribedTrue when subscribed to receive change events.
appIdID of the watched application, or * in case all applications are watched.

Returns on status changes:

{
"appId": string,
"version": string,
"statusChange": string,
"cause": string
}
Parameters
appIdID of the application.
versionVersion of the application.
statusChangeDescribes the status change.
causeWhat caused the change.

Examples:

luna-send -n 10 -f luna://com.palm.appinstaller/notifyOnChange '{ "appId": "com.palm.app.email" }'

Example response for a succesful call:

{
"returnValue": true,
"subscribed": true,
"appId": "com.palm.app.email"
}

Example of an application removal:

{
"appId": "com.palm.app.email",
"version": "3.0.13801",
"statusChange": "REMOVED",
"cause": "USER"
}


getUserInstalledAppSizes

Public.

com.palm.appinstaller/getUserInstalledAppSizes

Get sizes for user installed applications.

Syntax:

{
}

Returns:

{
"returnValue": boolean,
"apps": [
{
"appName": string,
"size": int
}
],
"totalSize": int
}
Parameters
returnValueIndicates if the call was succesful.
appsObject array, see fields of contained objects below.
appNameName of the application.
sizeSize of the application in kilobytes.
totalSizeCombined size of all the applications in kilobytes.

Examples:

luna-send -n 1 -f luna://com.palm.appinstaller/getUserInstalledAppSizes '{ }'

Example response for a succesful call:

{
"returnValue": true,
"apps": [
{
"appName": "com.palm.app.enyo-facebook",
"size": 0
},
{
"appName": "com.palm.app.enyo-findapps",
"size": 0
},
{
"appName": "com.palm.app.kindle",
"size": 0
},
{
"appName": "com.palm.app.youtube",
"size": 0
},
{
"appName": "com.quickoffice.ar",
"size": 0
},
{
"appName": "com.quickoffice.webos",
"size": 0
}
],
"totalSize": 0
}


queryInstallCapacity

Public.

com.palm.appinstaller/queryInstallCapacity

Query for the space that is available, and space that is required to install an application package.

Syntax:

{
"appId": string,
"packageId": string,
"size": string,
"uncompressedSize": string
}
Parameters
appIdApplication ID. Either this, or packageId is required.
packageIdPackage ID. Either this, or appId is required.
sizeSize of the package in kilobytes. Required.
uncompressedSizeUncompressed size of the package in kilobytes.

Returns:

{
"returnValue": boolean,
"result": int,
"spaceNeededInKB": string,
"errorCode": string,
"errorText": string
}
Parameters
returnValueIndicates if the call was succesful.
resultAvailable space in kilobytes.
spaceNeededInKBSpace required to install the package.
errorCodeError code in case the call failed.
errorTextDescribes the error in more detail.

Examples:

luna-send -n 1 -f luna://com.palm.appinstaller/queryInstallCapacity '{ "packageId": "com.whatnot.app", "size": "300", "uncompressedSize": "1200" }'

Example response for a succesful call:

{
"returnValue": true,
"result": 0,
"spaceNeededInKB": "1536"
}

Example response for a failed call:

{
"returnValue": false,
"errorCode": "appinstaller_error",
"errorText": "missing size parameter"
}


revoke

Public.

com.palm.appinstaller/revoke

Revoke one on more applications.

Syntax:

{
"item": {
"payload": {
"signature": string,
"appId": [ string array ]
}
}
}
Parameters
itemObject.
payloadObject.
signatureValid signature required to revoke applications.
appIdIDs of applications to revoke

Returns:

{
"returnValue": boolean,
"errorCode": string
}
Parameters
returnValueIndicates if the call was succesful.
errorCodeDescribes the error if call was not succesful.

Examples:

luna-send -n 1 -f luna://com.palm.appinstaller/revoke '{ "item": { "payload": { "signature": "notAValidSignature", "appId": ["com.palm.app.oneApp", "com.palm.app.anotherApp" ] } } }'

Example response for a succesful call:

{
"returnValue": true
}

Example response for a failed call:

{
"returnValue": false,
"errorCode": "verify failed"
}