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

Public methods:


audio/status

Public.

com.palm.keys/audio/status

Subscribe to audio key status changes.

Syntax:

{
"subscribe": boolean
}
Parameters
subscribeSet to true to subscribe to status changes.

Returns:

{
"errorCode": int,
"errorText": string
"returnValue": boolean,
"subscribed": boolean
}
Parameters
errorCodeCode for the error if call was not succesful.
errorTextDescribes the error if call was not succesful.
returnValueIndicates if the call was succesful.
subscribedTrue if subscription to status changes is made.

Examples:

luna-send -n 2 -f luna://com.palm.keys/audio/status '{ "subscribe": true }'

Example response for a succesful call:

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

Example response for a failed call:

{
"errorCode": -1,
"errorText": "We were expecting a subscribe type message, but we did not recieve one.",
"returnValue": false,
"subscribed": false
}


media/status

Public.

com.palm.keys/media/status

Subscribe to media key status changes.

Syntax:

{
"subscribe": boolean
}
Parameters
subscribeSet to true to subscribe to status changes.

Returns:

{
"errorCode": int,
"errorText": string
"returnValue": boolean,
"subscribed": boolean
}
Parameters
errorCodeCode for the error if call was not succesful.
errorTextDescribes the error if call was not succesful.
returnValueIndicates if the call was succesful.
subscribedTrue if subscription to status changes is made.

Examples:

luna-send -n 2 -f luna://com.palm.keys/media/status '{ "subscribe": true }'

Example response for a succesful call:

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

Example response for a failed call:

{
"errorCode": -1,
"errorText": "We were expecting a subscribe type message, but we did not recieve one.",
"returnValue": false,
"subscribed": false
}


switches/status

Public.

com.palm.keys/switches/status

Subscribe to switch state changes or request the state of a particular switch.

Syntax for subscribing:

{
"subscribe": boolean
}
Parameters
subscribeSet to true to subscribe to status changes.

Syntax for requesting a switch state:

{
"get": string
}
Parameters
getName of the swtich, for example ringer, slider, etc.

Returns for subscribe messages:

{
"returnValue": boolean,
"subscribe": boolean
}
Parameters
returnValueIndicates if the call was succesful.
subscribeTrue if subscribed to switch status changes.

Returns for request messages:

{
"key": string,
"state": string,
"returnValue": boolean
}
Parameters
keyName of the switch.
stateState of the switch.
returnValueIndicates if the call was succesful.

Examples:

luna-send -n 1 -f luna://com.palm.keys/switches/status '{ "get": "ringer" } '

Example response for a succesful request call:

{
"key": "ringer",
"state": "up",
"returnValue": true
}

Example response for a succesful subscription call:

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

Example response for a failed call:

{
"returnValue": false
}


headset/status

Public.

com.palm.keys/headset/status

Subscribe to headset key events. Currently only "headset_button" exists with "up" "down" "hold" "single_press" and "double_press" states.

Syntax:

{
"subscribe": boolean
}
Parameters
subscribeSet to true to subscribe to status changes.

Returns:

{
"errorCode": int,
"errorText": string
"returnValue": boolean,
"subscribed": boolean
}
Parameters
errorCodeCode for the error if call was not succesful.
errorTextDescribes the error if call was not succesful.
returnValueIndicates if the call was succesful.
subscribedTrue if subscription to status changes is made.

Examples:

luna-send -n 2 -f luna://com.palm.keys/headset/status '{ "subscribe": true }'

Example response for a succesful call:

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

Example response for a failed call:

{
"errorCode": -1,
"errorText": "We were expecting a subscribe type message, but we did not recieve one.",
"returnValue": false,
"subscribed": false
}