IPlatformService Interface Reference


Description

The IPlatformService interface is implemented by the Platform Service which supervises the operation of all components in the platform. All components must use this interface to tell the Platform Service they have initialized successfully. If a component cannot initialize successfully it should just exit, which is a condition the Platform Service will detect very rapidly and it will handle the situation appropriately.

See also:
IToiPlatformService

import "IPlatformService.idl";

List of all members.

Public Member Functions

void ReportComponent (in long serviceId, in string address) raises (TToiInvalidArgumentException)
void UnloadDone (in long serviceId) raises (TToiInvalidArgumentException)
oneway void ReportPing (in long serviceId)
void ClearFlash ()
void IsInStandby (out boolean value)
void GetStartupType (out TStartupType type)
oneway void RestartPlatformNow ()
void RegisterFactoryResetHandler (in string address, out long handlerId) raises (TToiInvalidArgumentException)
void UnregisterFactoryResetHandler (in long handlerId) raises (TToiInvalidArgumentException)
oneway void FactoryResetHandlerDone (in long handlerId)
void RebootNow ()
void RebootAtNextStandby ()
void SetStandby (in boolean mode)
void FactoryReset (in long flags) raises (TToiOperationNotSupportedException)
void RegisterComponentUsage (in IToiApplicationService::TToiApplicationId applicationId, in string componentName, out boolean active) raises (TToiInvalidArgumentException, TToiInvalidPreconditionException)
void ReleaseComponentUsage (in IToiApplicationService::TToiApplicationId applicationId, in string componentName, out boolean active) raises (TToiInvalidArgumentException, TToiInvalidPreconditionException)
void GetComponentsInfo (out TToiComponentInfoSequence infoSequence)
void GetComponentInfo (in string componentName, out TToiComponentInfo info) raises (TToiInvalidArgumentException)
void RegisterObserver (in IToiApplicationService::TToiApplicationId applicationId, in string address) raises (TToiInvalidArgumentException)
void ReleaseObserver (in string address) raises (TToiInvalidArgumentException)

Public Types

enum  TStartupType {
  STARTUP_TYPE_POWER_ON, STARTUP_TYPE_REBOOT, STARTUP_TYPE_WAKE_UP, STARTUP_TYPE_PLATFORM_FAILURE,
  STARTUP_TYPE_PLATFORM_RESTART
}
enum  TToiResetFlag {
  REFORMAT_INTERNAL_HDD, REMOVE_PERSISTENT_COOKIES, REMOVE_PORTAL_DATABASES, REMOVE_PERSISTENT_INFORMATION_OBJECTS,
  RESET_TR069_DATA_MODEL, CUSTOM_POST_PROCEDURE, REMOVE_CHANNELS, FULL_RESET
}
enum  TToiComponentState { COMPONENT_STATE_INACTIVE, COMPONENT_STATE_PENDING_INACTIVE, COMPONENT_STATE_PENDING_ACTIVE, COMPONENT_STATE_ACTIVE }
typedef sequence
< TToiComponentInfo
TToiComponentInfoSequence

Member Typedef Documentation

A sequence of component information.


Member Enumeration Documentation

The TStartupType enumerates the ways in which the platform can be starting up.

Enumerator:
STARTUP_TYPE_POWER_ON 

The platform is starting after a hard reset (Power On)

STARTUP_TYPE_REBOOT 

The platform is rebooting due to a soft reset

STARTUP_TYPE_WAKE_UP 

The platform is waking up from power save mode. This mode is not used yet.

STARTUP_TYPE_PLATFORM_FAILURE 

The platform is restarting due to a failure in some platform component

STARTUP_TYPE_PLATFORM_RESTART 

Platform was restarted in standby mode

The state describing a dynamic component.

Enumerator:
COMPONENT_STATE_INACTIVE 

The dynamic component is inactive with no resources allocated.

COMPONENT_STATE_PENDING_INACTIVE 

The dynamic component has been deactivated and is releasing its resources and is not yet ready to be activated again.

COMPONENT_STATE_PENDING_ACTIVE 

The dynamic component has been activated and is allocating its initial resources but is not yet ready for use.

COMPONENT_STATE_ACTIVE 

The dynamic component is active and ready for use.

The reset flag indicates which parts of the STB that shall be reset when a factory reset is performed.

Enumerator:
REFORMAT_INTERNAL_HDD 

Reformat the internal HDD.

REMOVE_PERSISTENT_COOKIES 

Remove all persistent cookies for SVG and HTML browsers.

REMOVE_PORTAL_DATABASES 

Remove all portal databases. Currently only affects the HTML browser for which the HTML5 database is removed.

REMOVE_PERSISTENT_INFORMATION_OBJECTS 

Remove all persistent InformationService variables.

RESET_TR069_DATA_MODEL 

Reset the TR-069 data model.

CUSTOM_POST_PROCEDURE 

Execute custom script/procedures. This is done after any other reset actions.

REMOVE_CHANNELS 
Technical Preview:
The flag REMOVE_CHANNELS is a TECHNICAL PREVIEW, it may change. Remove the channel database.
FULL_RESET 

Perform a full factory reset.


Member Function Documentation

void IPlatformService::ClearFlash (  ) 

Set the flash to invalid to force the download of a new bootimage at next reboot.

void IToiPlatformService::FactoryReset ( in long  flags  )  raises (TToiOperationNotSupportedException) [inherited]

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.

Parameters:
flags Flags indicating which parts to reset.
See also:
TToiResetFlag.
Exceptions:
TToiOperationNotSupportedException Raised if some error occured.
oneway void IPlatformService::FactoryResetHandlerDone ( in long  handlerId  ) 

A factory reset handler must call FactoryResetHandlerDone after having received a IFactoryResetHandler::PerformFactoryReset callback and completed the requested reset to report that it has done its part of the factory reset.

Parameters:
handlerId The id returned from RegisterFactoryResetHandler.
void IToiPlatformService::GetComponentInfo ( in string  componentName,
out TToiComponentInfo  info 
) raises (TToiInvalidArgumentException) [inherited]
Technical Preview:
This method is a TECHNICAL PREVIEW, it may change.

Returns information for a platform component.

Parameters:
componentName The name of the dynamic component.
Return values:
info Component information.
Exceptions:
TToiInvalidArgumentException Raised if the component name is not valid.
void IToiPlatformService::GetComponentsInfo ( out TToiComponentInfoSequence  infoSequence  )  [inherited]
Technical Preview:
This method is a TECHNICAL PREVIEW, it may change.

Returns information of available platform components.

Return values:
infoSequence A sequence of component information.
void IPlatformService::GetStartupType ( out TStartupType  type  ) 

A platform component can call this method to get information about the current startup mode.

Return values:
type the current startup mode
void IPlatformService::IsInStandby ( out boolean  value  ) 

A platform component can call this IsInStandby to get information if we are in standby mode.

Return values:
value true if we are in standby mode.
void IToiPlatformService::RebootAtNextStandby (  )  [inherited]

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 IToiPlatformService::RebootNow (  )  [inherited]

Reboot the platform immediately in a controlled way. This is useful to force the usage of a new boot image after upgrade.

void IToiPlatformService::RegisterComponentUsage ( in IToiApplicationService::TToiApplicationId  applicationId,
in string  componentName,
out boolean  active 
) raises (TToiInvalidArgumentException, TToiInvalidPreconditionException) [inherited]
Technical Preview:
This method is a TECHNICAL PREVIEW, it may change.

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 IToiPlatformObserver and listen to IToiPlatformObserver::OnComponentInfoChanged() 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.

See also:
IToiPlatformObserver
Parameters:
applicationId The identifier of the calling application.
componentName The name of the dynamic component.
Return values:
active A flag indicating if the component is already active, i.e. no need to wait for an active state event.
Exceptions:
TToiInvalidArgumentException Raised if the component name is not valid.
TToiInvalidPreconditionException Raised if the component is in state COMPONENT_STATE_PENDING_INACTIVE.
void IPlatformService::RegisterFactoryResetHandler ( in string  address,
out long  handlerId 
) raises (TToiInvalidArgumentException)

Register an IFactoryResetHandler callback interface to do something when IToiPlatformService::FactoryReset is called.

The platform service will call all registered handlers, passing along the reset flags. The handler is expected to take action after examining the flags and call FactoryResetHandlerDone when done.

Parameters:
address The address to the IFactoryResetHandler callback interface.
Return values:
handlerId An unique id that the handler must use in the FactoryResetHandlerDone callback.
Exceptions:
TToiInvalidArgumentException An invalid argument exception will be raised if the address parameter is invalid.
void IToiPlatformService::RegisterObserver ( in IToiApplicationService::TToiApplicationId  applicationId,
in string  address 
) raises (TToiInvalidArgumentException) [inherited]

Register an observer of type IToiPlatformObserver. The observer will receive events sent by this IToiPlatformService instance.

Parameters:
applicationId The identifier of the observing application.
address The address where the IToiPlatformService can find an IToiPlatformObserver interface.
Exceptions:
TToiInvalidArgumentException Raised if the specified address is invalid or if the application has already registered itself as an observer with the same address.
See also:
IToiPlatformObserver
void IToiPlatformService::ReleaseComponentUsage ( in IToiApplicationService::TToiApplicationId  applicationId,
in string  componentName,
out boolean  active 
) raises (TToiInvalidArgumentException, TToiInvalidPreconditionException) [inherited]
Technical Preview:
This method is a TECHNICAL PREVIEW, it may change.

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).

See also:
IToiPlatformObserver
Parameters:
applicationId The identifier of the calling application.
componentName The name of the dynamic component.
Return values:
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.
Exceptions:
TToiInvalidArgumentException Raised if the component name is not valid.
TToiInvalidPreconditionException Raised if the user has not called IToiPlatformService::RegisterComponentUsage().
void IToiPlatformService::ReleaseObserver ( in string  address  )  raises (TToiInvalidArgumentException) [inherited]

Release an observer previously registered with RegisterObserver.

Parameters:
address The address where the IToiPlatformService can find the registered IToiPlatformObserver interface.
Exceptions:
TToiInvalidArgumentException Raised if the specified address is invalid.
See also:
IToiPlatformObserver
void IPlatformService::ReportComponent ( in long  serviceId,
in string  address 
) raises (TToiInvalidArgumentException)

A platform component must call the ReportComponent function exactly once after it has initialized successfully. When doing so, it registers an IPlatformComponent callback interface on which the Platform Service will notify the component about changes in the system execution state.

Parameters:
serviceId The id of the component registering its IPlatformComponent interface.
address The address to the IPlatformComponent callback interface implemented by the component.
Exceptions:
TToiInvalidArgumentException An invalid argument exception will be raised if the serviceId parameter is not recognized by the Platform Service.
oneway void IPlatformService::ReportPing ( in long  serviceId  ) 

A platform component must call ReportPing after receiving a IPlatformComponent::Ping to report it is still alive.

Parameters:
serviceId The id of the component registering its IPlatformComponent interface.
oneway void IPlatformService::RestartPlatformNow (  ) 

Used by appman to restart the platform if an application fails.

void IToiPlatformService::SetStandby ( in boolean  mode  )  [inherited]

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.

Parameters:
mode The requested mode. True corresponds to standby, while false corresponds to normal operation.
void IPlatformService::UnloadDone ( in long  serviceId  )  raises (TToiInvalidArgumentException)

A platform component must call UnloadDone after receiving a IPlatformComponent::OnUnload and shutting down all running applications.

Parameters:
serviceId The id of the component registering its IPlatformComponent interface.
Exceptions:
TToiInvalidArgumentException An invalid argument exception will be raised if the serviceId parameter is not recognized by the Platform Service.
void IPlatformService::UnregisterFactoryResetHandler ( in long  handlerId  )  raises (TToiInvalidArgumentException)

Unregisters a previously registered factory reset handler.

Parameters:
handlerId The id returned from RegisterFactoryResetHandler.
Exceptions:
TToiInvalidArgumentException Raised if the handler id is invalid.