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)

Public Types

enum  TStartupType {
  STARTUP_TYPE_POWER_ON, STARTUP_TYPE_REBOOT, STARTUP_TYPE_WAKE_UP, STARTUP_TYPE_PLATFORM_FAILURE,
  STARTUP_TYPE_PLATFORM_RESTART
}

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


Member Function Documentation

void IPlatformService::ClearFlash (  ) 

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

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