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

Private methods:


setState

Private.

com.palm.display/control/setState

Set the state of the display.

Syntax:

{
"state": string
}
Parameters
stateThe state to which the display is set. Can be:
  • on
  • dimmed
  • off
  • unlock
  • dock
  • undock

Returns:

{
"returnValue": boolean,
"errorText": string
}
Parameters
@subsectioncom_palm_display_control_set_state_examples Examples:
luna-send -n 1 -f luna://com.palm.display/control/setState '{ "state": "dock" }'

Example response for a succesful call:

{
"returnValue": true
}

Example response for a failed call:

{
"returnValue": false,
"errorText": "call failed"
}


getProperty

Private.

com.palm.display/control/getProperty

Get display properties.

Syntax:

{
"properties": [string array]
}
Parameters
propertiesList of properties to get, can include one or more of the following:
  • requestBlock
  • powerKeyBlock
  • timeout
  • maximumBrightness
  • onWhenConnected
  • proximityEnabled

Returns:

{
"returnValue": boolean,
"<property name>": <value>,
...
"<property name>": <value>,
"errorCode": int,
"errorText": string
}
Parameters
returnValueIndicates if the call was succesful.
errorCodeCode for the error if call was not succesful.
errorTextDescribes the error if call was not succesful.

Examples:

luna-send -n 1 -f luna://com.palm.display/control/getProperty '{ "properties": ["maximumBrightness", "timeout", "requestBlock", "onWhenConnected" ] } '

Example response for a succesful call:

{
"returnValue": true,
"maximumBrightness": 75,
"timeout": 120,
"requestBlock": false,
"onWhenConnected": false
}

Example response for a failed call:

{
"returnValue": false,
"errorCode": 1,
"errorText": "failed to get property"
}


setProperty

Private.

com.palm.display/control/setProperty

Set display properties.

Syntax:

{
"requestBlock": boolean,
"client": string,
"powerKeyBlock": boolean,
"timeout": integer,
"onWhenConnected": boolean,
"maximumBrightness": integer,
"proximityEnabled": boolean
}
Parameters
requestBlockBlock changes of display state. Requires client parameter to be set.
clientClient ID.
powerKeyBlockBlock the power key. Requires client parameter to be set.
timeoutTimeout in seconds for the display to turn off.
onWhenConnectedShould the display remain on when a USB cable is connected to the device.
maximumBrightnessDisplay maximum brightness.
proximityEnabledToggle proximity sensor. Requires client parameter to be set.

Returns:

{
"returnValue": boolean,
"errorCode": int,
"errorText": string
}
Parameters
returnValueIndicates if the call was succesful.
errorCodeCode for the error if call was not succesful.
errorTextDescribes the error if call was not succesful.

Examples:

luna-send -n 1 -f luna://com.palm.display/control/setProperty '{ "timeout": 140 }'

Example response for a succesful call:

{
"returnValue": true
}

Example response for a failed call:

{
"returnValue": false,
"errorCode": 22,
"errorText": "'powerKeyBlock' needs 'client' string"
}


status

Private.

com.palm.display/control/status

Get the status of the display.

Syntax:

{
"subscribe": boolean
}
Parameters
subscribeSubscribe for updates.

Returns:

{
"returnValue": boolean,
"event": string,
"state": string,
"timeout": int,
"blockDisplay": string,
"active": boolean,
"subscribed": boolean
}
Parameters
returnValueIndicates if the call was succesful.
eventEvent that triggered this call.
stateState of the display. "Undefined", "dimmed", "off" or "on".
timeoutTime in seconds after which the display turns off.
blockDisplayTrue if display state is blocked from changes.
activeTrue if the timer that shuts down the display after timeout seconds of inactivity is running.
subscribedTrue if subscribed for updates.

Examples:

luna-send -n 1 -f luna://com.palm.display/control/status '{}'

Example response for a succesful call:

{
"returnValue": true,
"event": "request",
"state": "off",
"timeout": 120,
"blockDisplay": "false",
"active": false,
"subscribed": false
}