The Platform Service contains functions for rebooting, standby and factory reset.
import "ToiPlatformService.idl";
Public Member Functions | |
void | rebootNow () |
void | rebootAtNextStandby () |
void | setStandby (in boolean mode) |
void | factoryReset (in long flags) raises (TToiOperationNotSupportedException) |
boolean | registerComponentUsage (in string componentName) raises (TToiInvalidArgumentException, TToiInvalidPreconditionException) |
boolean | releaseComponentUsage (in string componentName) raises (TToiInvalidArgumentException, TToiInvalidPreconditionException) |
TToiComponentInfoSequence | getComponentsInfo () |
ToiPlatformServiceComponentInfo | getComponentInfo (in string componentName) raises (TToiInvalidArgumentException) |
void | addEventListener (in long type, in ToiEventListener listener) raises (TToiInvalidArgumentException) |
void | removeEventListener (in long type, in ToiEventListener listener) raises (TToiInvalidArgumentException) |
Public Attributes | |
Events | |
const long | ON_COMPONENT_INFO_CHANGED = 400 |
TToiResetFlag | |
const TToiResetFlag | REFORMAT_INTERNAL_HDD = 0x1 |
const TToiResetFlag | REMOVE_PERSISTENT_COOKIES = 0x2 |
const TToiResetFlag | REMOVE_PORTAL_DATABASES = 0x4 |
const TToiResetFlag | REMOVE_PERSISTENT_INFORMATION_OBJECTS = 0x8 |
const TToiResetFlag | RESET_TR069_DATA_MODEL = 0x10 |
const TToiResetFlag | CUSTOM_POST_PROCEDURE = 0x20 |
const TToiResetFlag | REMOVE_CHANNELS = 0x40 |
const TToiResetFlag | FULL_RESET = 0xff |
TToiComponentState | |
const TToiComponentState | COMPONENT_STATE_INACTIVE = 0x1 |
const TToiComponentState | COMPONENT_STATE_PENDING_INACTIVE = 0x2 |
const TToiComponentState | COMPONENT_STATE_PENDING_ACTIVE = 0x3 |
const TToiComponentState | COMPONENT_STATE_ACTIVE = 0x4 |
Public Types | |
typedef long | TToiResetFlag |
typedef long | TToiComponentState |
typedef sequence < ToiPlatformServiceComponentInfo > | TToiComponentInfoSequence |
typedef sequence< ToiPlatformServiceComponentInfo > ToiPlatformService::TToiComponentInfoSequence |
A sequence of component information.
typedef long ToiPlatformService::TToiComponentState |
The state describing a dynamic component.
typedef long ToiPlatformService::TToiResetFlag |
The reset flag indicates which parts of the STB that shall be reset when a factory reset is performed.
void ToiEventTarget::addEventListener | ( | in long | type, | |
in ToiEventListener | listener | |||
) | raises (TToiInvalidArgumentException) [inherited] |
This method registers an event listener for a specific event. Multiple listeners can be added for the same event. Events are broadcast to all registered listeners.
type | The event type of the event to subscribe to. | |
listener | The JavaScript function that will receive events. |
TInvalidArgumentException | Raised if the event type is not supported by this object or if the listener is not a valid JavaScript function. This exception is also raised if the application calls addEventListener with the same combination of type and listener twice. |
void ToiPlatformService::factoryReset | ( | in long | flags | ) | raises (TToiOperationNotSupportedException) |
Perform factory reset. Which parts of the persistent storage that is reset to factory state is dependent on which flags that are given to the function call. After the reset is perform, the STB will reboot to ensure that it boots up in a factory reset state.
flags | Flags indicating which parts to reset. |
TToiOperationNotSupportedException | Raised if some error occured. |
ToiPlatformServiceComponentInfo ToiPlatformService::getComponentInfo | ( | in string | componentName | ) | raises (TToiInvalidArgumentException) |
Returns information for a platform component.
componentName | The name of the dynamic component. |
info | Component information. |
TToiInvalidArgumentException | Raised if the component name is not valid. |
TToiComponentInfoSequence ToiPlatformService::getComponentsInfo | ( | ) |
Returns information of available platform components.
infoSequence | A sequence of component information. |
void ToiPlatformService::rebootAtNextStandby | ( | ) |
Reboot the platform the next time the system goes from active to standby state. This is used for starting a new boot image in a way that is less disturbing to the end user.
void ToiPlatformService::rebootNow | ( | ) |
Reboot the platform immediately in a controlled way. This is useful to force the usage of a new boot image after upgrade.
boolean ToiPlatformService::registerComponentUsage | ( | in string | componentName | ) | raises (TToiInvalidArgumentException, TToiInvalidPreconditionException) |
Registers interest in a dynamic component. If not already active this method activates the dynamic component with the given identifier. The calling application should register itself as an ToiPlatformObserver and listen to ToiPlatformComponentInfoChangedEvent to know when the component is activated. If the component has already been activated by another user (indicated by the active flag) no event will be sent.
componentName | The name of the dynamic component. |
active | A flag indicating if the component is already active, i.e. no need to wait for an active state event. |
TToiInvalidArgumentException | Raised if the component name is not valid. | |
TToiInvalidPreconditionException | Raised if the component is in state COMPONENT_STATE_PENDING_INACTIVE. |
boolean ToiPlatformService::releaseComponentUsage | ( | in string | componentName | ) | raises (TToiInvalidArgumentException, TToiInvalidPreconditionException) |
Releases interest in a dynamic component with the given identifier. All resources allocated by the dynamic component will be released when it becomes inactive. If another user still has interest in the component it will not be deactivated (indicated by the active flag).
componentName | The name of the dynamic component. |
active | A flag indicating if the component is still active after release due to another user, i.e. the component will be inactivated only when all users have released the component. |
TToiInvalidArgumentException | Raised if the component name is not valid. | |
TToiInvalidPreconditionException | Raised if the user has not called ToiPlatformService::registerComponentUsage(). |
void ToiEventTarget::removeEventListener | ( | in long | type, | |
in ToiEventListener | listener | |||
) | raises (TToiInvalidArgumentException) [inherited] |
This method removes an event listener for a specific event.
type | The event type of the event to remove the listener from. | |
listener | The JavaScript function that was previously added as an event listener. |
TInvalidArgumentException | Raised if the event type is not supported by this object or if the listener is not a valid JavaScript function. This exception is also raised if the listener had not previously been added. |
void ToiPlatformService::setStandby | ( | in boolean | mode | ) |
Enter or leave standby. In standby all video and audio outputs are disabled. Applications are stopped or left running depending on the system configuration. If the system is already in the requested mode the call will have no effect.
mode | The requested mode. True corresponds to standby, while false corresponds to normal operation. |
The dynamic component is active and ready for use.
This constant can also be accessed from toi.consts.ToiPlatformService.COMPONENT_STATE_ACTIVE.
The dynamic component is inactive with no resources allocated.
This constant can also be accessed from toi.consts.ToiPlatformService.COMPONENT_STATE_INACTIVE.
The dynamic component has been activated and is allocating its initial resources but is not yet ready for use.
This constant can also be accessed from toi.consts.ToiPlatformService.COMPONENT_STATE_PENDING_ACTIVE.
The dynamic component has been deactivated and is releasing its resources and is not yet ready to be activated again.
This constant can also be accessed from toi.consts.ToiPlatformService.COMPONENT_STATE_PENDING_INACTIVE.
const TToiResetFlag ToiPlatformService::CUSTOM_POST_PROCEDURE = 0x20 |
Execute custom script/procedures. This is done after any other reset actions.
This constant can also be accessed from toi.consts.ToiPlatformService.CUSTOM_POST_PROCEDURE.
const TToiResetFlag ToiPlatformService::FULL_RESET = 0xff |
Perform a full factory reset.
This constant can also be accessed from toi.consts.ToiPlatformService.FULL_RESET.
const long ToiPlatformService::ON_COMPONENT_INFO_CHANGED = 400 |
This is an Event identifier for ToiPlatformComponentInfoChangedEvent.
This constant can also be accessed from toi.consts.ToiPlatformService.ON_COMPONENT_INFO_CHANGED.
Reformat the internal HDD.
This constant can also be accessed from toi.consts.ToiPlatformService.REFORMAT_INTERNAL_HDD.
const TToiResetFlag ToiPlatformService::REMOVE_CHANNELS = 0x40 |
This constant can also be accessed from toi.consts.ToiPlatformService.REMOVE_CHANNELS.
Remove all persistent cookies for SVG and HTML browsers.
This constant can also be accessed from toi.consts.ToiPlatformService.REMOVE_PERSISTENT_COOKIES.
Remove all persistent InformationService variables.
This constant can also be accessed from toi.consts.ToiPlatformService.REMOVE_PERSISTENT_INFORMATION_OBJECTS.
Remove all portal databases. Currently only affects the HTML browser for which the HTML5 database is removed.
This constant can also be accessed from toi.consts.ToiPlatformService.REMOVE_PORTAL_DATABASES.
const TToiResetFlag ToiPlatformService::RESET_TR069_DATA_MODEL = 0x10 |
Reset the TR-069 data model.
This constant can also be accessed from toi.consts.ToiPlatformService.RESET_TR069_DATA_MODEL.