D0301
HTML Application SDK  A1.8
Classes | Public Member Functions | Public Attributes | List of all members
GeneralSettings Interface Reference

import"GeneralSettingsPlugin.idl";

Classes

interface  systemLanguageChangeEvent
 
interface  tvModeChangeEvent
 

Public Member Functions

void addEventListener ([in] String event_name, [in] EventListener listener)
 
void disableHbbTV ()
 
void enableHbbTV ()
 
void enableRepeatForDirectionKeys ([in] Boolean enable)
 
void enableRepeatForProgramUpDownKeys ([in] Boolean enable)
 
Boolean getHbbTVEnabled ()
 
String getRoomId ()
 
Integer getTVMode ()
 
void removeEventListener ([in] String event_name, [in] EventListener listener)
 
void removeEventListener ([in] String event_name)
 
Boolean setTVMode ([in] enumerations mode)
 

Public Attributes

const Integer TV_MODE_HOME = 0
 
const Integer TV_MODE_HOTEL = 2
 
const Integer TV_MODE_STORE = 1
 

Detailed Description

This is a class which implements global General Settings.

Member Function Documentation

void GeneralSettings.addEventListener ( [in] String  event_name,
[in] EventListener  listener 
)

Adds DOM2 event listener for specified event.

Possible values are: event_name: "systemLanguageChangeEvent", listener: function that has arguments similar to the systemLanguageChangeEvent interface properties. event_name: "tvModeChangeEvent", listener: function that has arguments similar to the tvModeChangeEvent interface properties.

Parameters
event_nameName of the event.
listenerjavascript function that has arguments like the properties listed in the listener's interface.
void GeneralSettings.disableHbbTV ( )

HbbTV apps are disabled

if (isHbbTVEnabled) {
if (isCountryUK) {
//When country is selected as UK, cannot disable HbbTV
expect(GeneralSettings.getHbbTVEnabled()).toBe(true);
} else {
expect(GeneralSettings.getHbbTVEnabled()).toBe(false);
}
}
void GeneralSettings.enableHbbTV ( )

HbbTV apps are enabled

if (isHbbTVEnabled) {
if (isCountryUK) {
//When country is selected as UK, cannot disable HbbTV
expect(GeneralSettings.getHbbTVEnabled()).toBe(true);
} else {
expect(GeneralSettings.getHbbTVEnabled()).toBe(true);
}
}
void GeneralSettings.enableRepeatForDirectionKeys ( [in] Boolean  enable)

Allows or prevent pressing direction keys repeatedly

document.getElementById("logs").innerHTML = "EnableRepeatForDirectionKeys Test worked! \nIt can be checked by using the remote controller: Hold down a direction key and the focused element will be changed continuously.";
Parameters
enableallows if enable is true, prevents otherwise.
void GeneralSettings.enableRepeatForProgramUpDownKeys ( [in] Boolean  enable)

Allows or prevent pressing program up down keys repeatedly

document.getElementById("logs").innerHTML = "EnableRepeatForProgramUpDownKeys Test worked! \nIt can be checked by using the remote controller: Hold down program up or down key and the channels will be changed continuously.";
Parameters
enableallows if enable is true, prevents otherwise.
Boolean GeneralSettings.getHbbTVEnabled ( )

Get whether HbbTV is enabled or not.

if (isHbbTVEnabled) {
if (isCountryUK) {
//When country is selected as UK, cannot disable HbbTV
expect(GeneralSettings.getHbbTVEnabled()).toBe(true);
} else {
expect(GeneralSettings.getHbbTVEnabled()).toBe(true);
}
}
Returns
Return true if HbbTV is enabled.
String GeneralSettings.getRoomId ( )

Get room id.

var roomId = GeneralSettings.getRoomId();
Returns
Return room id
Integer GeneralSettings.getTVMode ( )

Get current display mode.

Returns
Current display mode.
void GeneralSettings.removeEventListener ( [in] String  event_name,
[in] EventListener  listener 
)

Removes single DOM2 event listener for specified event

Possible values are: event_name: "systemLanguageChangeEvent", listener: function that has arguments similar to the systemLanguageChangeEvent interface properties. event_name: "tvModeChangeEvent", listener: function that has arguments similar to the tvModeChangeEvent interface properties.

Parameters
event_nameName of the event
listenernamed javascript function that has arguments like the properties listed in the listener's interface.
void GeneralSettings.removeEventListener ( [in] String  event_name)

Removes all DOM2 event listeners for specified event

Parameters
event_nameName of the event
See also
removeEventListener([in] String event_name, [in] EventListener listener);
Boolean GeneralSettings.setTVMode ( [in] enumerations  mode)

Set current display mode. If the product is not Hotel TV, calling the method with TV_MODE_HOTEL throws runtime error. If the product is Hotel TV, calling the method with TV_MODE_HOME sets display mode to TV_MODE_HOTEL.

var mode = GeneralSettings.getTVMode();
var nextMode;
}
else {
}
Parameters
modeNew display mode.
Returns
true if function call is successful, false otherwise

Member Data Documentation

const Integer GeneralSettings.TV_MODE_HOME = 0

home mode

const Integer GeneralSettings.TV_MODE_HOTEL = 2

hotel mode

const Integer GeneralSettings.TV_MODE_STORE = 1

store mode


The documentation for this interface was generated from the following file: