Smart Hospitality Display
API References
Web API References
Samsung Product API References
RemotePower API
To use Samsung Product API,
<script type="text/javascript" src="$WEBAPIS/webapis/webapis.js"></script>
Should be loaded in index.html
This module defines a device's remote power functionalities in standby mode, provided by the Tizen Samsung Product API.
The device power state can be controlled remotely if it is in remote mode (background standby mode).
Since : 6.5
Product : B2B (HTV, LFD)
Privilege Level : Partner
Privilege : http://developer.samsung.com/privilege/systemcontrol
Summary of Interfaces and Methods
1. Type Definitions
1.1 VirtualStandbyMode
Enable or disable a device.
enum VirtualStandbyMode {
"ACTIVATION",
"DEACTIVATION"
};
The following values are supported
ACTIVATION : Activated
DEACTIVATION : Deactivated
Since : 6.5
1.2 PowerState
The supported power states for a device.
enum PowerState {
"NORMAL",
"STANDBY"
};
The following values are supported
NORMAL : The device power state is normal
STANDBY : The device power state is on standby
1.3 Activation
Enable option on/off
enum Activation {
"ON",
"OFF"
};
The following values are supported
ON : enable
OFF : disable
1.4 RebootTime
If reboot time is set in virtual standby mode, the device automatically booting every corresponding time.
enum RebootTime {
"5MIN",
"15MIN",
"30MIN",
"60MIN"
};
The following values are supported
5MIN : Five minutes
15MIN : Fifteen minutes
30MIN : Thirty minutes
60MIN : Sixty minutes
2. Interfaces
2.1 RemotePowerManagerObject
This interface defines what is instantiated by the Remote Power object of the Tizen Samsung Product API.
A webapis.remotepower object allows access to the functionality of the Remote Power API.
[NoInterfaceObject] interface RemotePowerManagerObject {
readonly attribute RemotePowerManager remotepower;
};
WebApi implements RemotePowerManagerObject;
Since : 6.5
Attributes
2.2 RemotePowerManager
This interface provides methods to use the Power functionalities in standby mode.
[NoInterfaceObject] interface RemotePowerManager {
DOMString getVersion();
void powerOn();
void powerOff();
PowerState getPowerState();
void setVirtualStandbyMode(Activation info);
void setVirtualStandbyRebootTime(RebootTime info);
VirtualStandbyMode getVirtualStandbyMode();
RebootTime getVirtualStandbyRebootTime();
Activation getRemoteConfiguration();
void setRemoteConfiguration(Activation info);
};
Methods
getVersion
This interface provides a method to get a Power module's version.
DOMString getVersion();
Product : B2B (HTV, LFD)
Privilege Level : Partner
Privilege : http://developer.samsung.com/privilege/systemcontrol
Return Value :
DOMString : Version of a Power module
Exceptions :
WebAPIException
with the error type SecurityError if the application does not have the privilege to call this method
with the error type NotSupportedError if this feature is not supported
Since : 6.5
Code Example :
var Version = null;
try {
Version = webapis.remotepower.getVersion();
} catch (e) {
console.log("[getVersion] call exception [" + e.code + "] name: " + e.name + " message: " + e.message);
}
console.log("[getVersion] call type: " + Version);
powerOn
When the Virtual Standby mode is activated, the power state can operate and is changed to Normal after a powerOn operation. API action condition is Activation ON and PowerState is STANDBY
void powerOn();
Product : B2B (HTV)
Privilege Level : Partner
Privilege : http://developer.samsung.com/privilege/systemcontrol
Exceptions :
WebAPIException
with the error type SecurityError if the application does not have the privilege to call this method
with the error type NotSupportedError if this feature is not supported
Since : 6.5
Code Example :
try {
webapis.remotepower.powerOn();
} catch (e) {
console.log("[power] call exception [" + e.code + "] name: " + e.name + " message: " + e.message);
}
powerOff
When the Virtual Standby mode is activated, the power state is changed to Standby after a powerOff operation, and when it is deactivated, the device is turned off completely instead.
void powerOff();
Product : B2B (LFD, HTV)
Privilege Level : Partner
Privilege : http://developer.samsung.com/privilege/systemcontrol
Exceptions :
WebAPIException
with the error type SecurityError if the application does not have the privilege to call this method
with the error type NotSupportedError if this feature is not supported
with the error type UnknownError in any other error case
Since : 6.5
Code Example :
try {
webapis.remotepower.powerOff();
} catch (e) {
console.log("[power] call exception [" + e.code + "] name: " + e.name + " message: " + e.message);
}
getPowerState
This interface provides methods to get the power state.
PowerState getPowerState();
Product : B2B (HTV)
Privilege Level : Partner
Privilege : http://developer.samsung.com/privilege/systemcontrol
Return Value :
Exceptions :
WebAPIException
with the error type SecurityError if the application does not have the privilege to call this method
with the error type NotSupportedError if this feature is not supported
with the error type UnknownError in any other error case
Since : 6.5
Code Example :
var PowerState = null;
try {
PowerState = webapis.remotepower.getPowerState();
console.log("[getPowerState] call type: " + PowerState);
} catch (e) {
console.log("[getPowerState] call exception [" + e.code + "] name: " + e.name + " message: " + e.message);
}
setVirtualStandbyMode
Set the Virtual Standby mode value. This is intended only for HTV product models.
void setVirtualStandbyMode(Activation info);
Product : B2B (HTV)
Privilege Level : Partner
Privilege : http://developer.samsung.com/privilege/systemcontrol
Parameters :
info : Whether the Remote Configuration option is to be enable or disable
Exceptions :
WebAPIException
with the error type SecurityError if the application does not have the privilege to call this method
with the error type NotSupportedError if this feature is not supported
with the error type UnknownError in any other error case
with the error type TypeMismatchError if an input parameter is not compatible with its expected type
Since : 6.5
Code Example :
var info = "OFF";
try {
webapis.remotepower.setVirtualStandbyMode(info);
} catch (e) {
console.log("[setVirtualStandbyMode] call exception [" + e.code + "] name: " + e.name + " message: " + e.message);
}
setVirtualStandbyRebootTime
Set the Virtual Standby reboot time value. This is intended only for HTV product models.
void setVirtualStandbyRebootTime(RebootTime info);
Product : B2B (HTV)
Privilege Level : Partner
Privilege : http://developer.samsung.com/privilege/systemcontrol
Parameters :
info : Whether the Remote Configuration option is to be enable or disable
Exceptions :
WebAPIException
with the error type SecurityError if the application does not have the privilege to call this method
with the error type NotSupportedError if this feature is not supported
with the error type UnknownError in any other error case
with the error type TypeMismatchError if an input parameter is not compatible with its expected type
Since : 6.5
Code Example :
var info = "5MIN";
try {
webapis.remotepower.setVirtualStandbyRebootTime(info);
} catch (e) {
console.log("[setVirtualStandbyRebootTime] call exception [" + e.code + "] name: " + e.name + " message: " + e.message);
}
getVirtualStandbyMode
Get the Virtual Standby mode value. This is intended only for HTV product models.
VirtualStandbyMode getVirtualStandbyMode();
Product : B2B (HTV)
Privilege Level : Partner
Privilege : http://developer.samsung.com/privilege/systemcontrol
Return Value :
Exceptions :
WebAPIException
with the error type SecurityError if the application does not have the privilege to call this method
with the error type NotSupportedError if this feature is not supported
with the error type UnknownError in any other error case
Since : 6.5
Code Example :
var StandByState = null;
try {
StandByState = webapis.remotepower.getVirtualStandbyMode();
console.log("[getVirtualStandbyMode] call type: " + StandByState);
} catch (e) {
console.log("[getVirtualStandbyMode] call exception [" + e.code + "] name: " + e.name + " message: " + e.message);
}
getVirtualStandbyRebootTime
Get the Virtual Standby reboot time value. This is intended only for HTV product models.
RebootTime getVirtualStandbyRebootTime();
Product : B2B (HTV)
Privilege Level : Partner
Privilege : http://developer.samsung.com/privilege/systemcontrol
Return Value :
Exceptions :
WebAPIException
with the error type SecurityError if the application does not have the privilege to call this method
with the error type NotSupportedError if this feature is not supported
with the error type UnknownError in any other error case
Since : 6.5
Code Example :
var Time = null;
try {
Time = webapis.remotepower.getVirtualStandbyRebootTime();
console.log("[getVirtualStandbyRebootTime] call result: " + Time);
} catch (e) {
console.log("[getVirtualStandbyRebootTime] call exception [" + e.code + "] name: " + e.name + " message: " + e.message);
}
getRemoteConfiguration
This interface provides methods to get Remote Configuration status.
Activation getRemoteConfiguration();
Product : B2B (LFD)
Privilege Level : Partner
Privilege : http://developer.samsung.com/privilege/systemcontrol
Return Value :
Exceptions :
WebAPIException
with the error type SecurityError if the application does not have the privilege to call this method
with the error type NotSupportedError if this feature is not supported
with the error type UnknownError in any other error case
Since : 6.5
Code Example :
var Remote = null;
try {
Remote = webapis.remotepower.getRemoteConfiguration();
console.log("[getRemoteConfiguration] call type: " + Remote);
} catch (e) {
console.log("[getRemoteConfiguration] call exception [" + e.code + "] name: " + e.name + " message: " + e.message);
}
setRemoteConfiguration
This interface provides methods to Remote Configuration status.
void setRemoteConfiguration(Activation info);
Product : B2B (LFD)
Privilege Level : Partner
Privilege : http://developer.samsung.com/privilege/systemcontrol
Parameters :
info : Whether the Remote Configuration option is to be enable or disable
Exceptions :
WebAPIException
with the error type SecurityError if the application does not have the privilege to call this method
with the error type NotSupportedError if this feature is not supported
with the error type UnknownError in any other error case
with the error type TypeMismatchError if an input parameter is not compatible with its expected type
Since : 6.5
Code Example :
var info = "OFF";
try {
webapis.remotepower.setRemoteConfiguration(info);
} catch (e) {
console.log("[setRemoteConfiguration] call exception [" + e.code + "] name: " + e.name + " message: " + e.message);
}
2.3 PowerStateChangedCallback
Defines the power state listener.
[Callback = FunctionOnly, NoInterfaceObject] interface PowerStateChangedCallback {
};
3. Full WebIDL
module RemotePower {
enum VirtualStandbyMode {
"ACTIVATION",
"DEACTIVATION"
};
enum PowerState {
"NORMAL",
"STANDBY"
};
enum Activation {
"ON",
"OFF"
};
enum RebootTime {
"5MIN",
"15MIN",
"30MIN",
"60MIN"
};
[NoInterfaceObject] interface RemotePowerManagerObject {
readonly attribute RemotePowerManager remotepower;
};
WebApi implements RemotePowerManagerObject;
[NoInterfaceObject] interface RemotePowerManager {
DOMString getVersion();
void powerOn();
void powerOff();
PowerState getPowerState();
void setVirtualStandbyMode(Activation info);
void setVirtualStandbyRebootTime(RebootTime info);
VirtualStandbyMode getVirtualStandbyMode();
RebootTime getVirtualStandbyRebootTime();
Activation getRemoteConfiguration();
void setRemoteConfiguration(Activation info);
};
[Callback = FunctionOnly, NoInterfaceObject] interface PowerStateChangedCallback {
};
};