IToiApplication Interface Reference


Description

The IToiApplication interface is used by the Application Service to control the applications and to inform them about state changes. It is also used to tell an application to load content identified by a URI (universal resource identifier) and to execute commands. All applications running on the KreaTV TV Application Platform must implement this interface.

See also:
IToiApplicationService::ReportStarted()

import "IToiApplication.idl";

List of all members.

Public Member Functions

oneway void Ping ()
oneway void ChangeState (in IToiApplicationService::TToiApplicationState newState)
oneway void LoadUri (in string uri, in string mimeType)
oneway void ExecuteCommand (in string command)

Member Function Documentation

oneway void IToiApplication::ChangeState ( in IToiApplicationService::TToiApplicationState  newState  ) 

Informs an application that its state has changed.

Parameters:
newState The new state of the application. Possible values are IToiApplicationService::STATE_INVISIBLE, IToiApplicationService::STATE_VISIBLE, and IToiApplicationService::STATE_ACTIVE. When the application starts it is always in IToiApplicationService::STATE_STARTING before moving on to one of the "running" states. It leaves IToiApplicationService::STATE_STARTING when the application reports that it has been started.
See also:
IToiApplicationService::TToiApplicationState
IToiApplicationService::ReportStarted
oneway void IToiApplication::ExecuteCommand ( in string  command  ) 

This function is called to make the application execute a command. The application itself defines what commands it supports and how they are interpreted.

Parameters:
command The command to execute.
oneway void IToiApplication::LoadUri ( in string  uri,
in string  mimeType 
)

Used to tell the application to load a URI. If the application cannot handle the URI but finds a MIME type (and the MIME type is not already provided by the URI Loader Service) the application should call the URI Loader Service with the newly found data. If there is no other application that has registered for this type the application might get a new callback immediately.

When the application cannot handle the URI and cannot provide additional info about the MIME type it should display an error message and ignore the URI.

Parameters:
uri The universal resource identifier pointing to the content to load.
mimeType If the URI loader knows which MIME type the data has it is provided here.
See also:
IToiUriLoaderService
oneway void IToiApplication::Ping (  ) 

Check that the application is responding to events. The application should acknowledge this event by calling IToiApplicationService::ReportPing. If it doesn't acknowledge within a time specified in the application properties the Application Service will consider the application as failed and stop it.

See also:
IToiApplicationService::ReportPing