Motorola Mobility Confidential Restricted.
ToiEventTarget Interface Reference

Description

ToiEventTarget is a base interface that allows applications to add and remove event listeners for specific events. In JavaScript an event listener is implemented with a function that takes a single argument of type ToiEvent or a type derived from ToiEvent depending on the specific event.

See also:
ToiEvent, ToiEventListener

import "ToiEventTarget.idl";

Inheritance diagram for ToiEventTarget:
ToiApplicationService ToiAssetManagerService ToiAudioOutputService ToiChannelService ToiDiagnosticsDataModel ToiDlnaContentDirectoryService ToiDlnaRendererManager ToiDlnaService ToiDvbEitCache ToiFrontendService ToiInformationService ToiMediaConsumer ToiMediaPlayerBase ToiMediaRecorderBase ToiMediaService ToiMediaSession ToiNetService ToiOperationManager ToiPlatformService ToiPowerControl ToiResourceService ToiSchedulerService ToiStorageService ToiVideoOutputConfiguration ToiVideoOutputService

List of all members.

Public Member Functions

void addEventListener (in long type, in ToiEventListener listener) raises (TToiInvalidArgumentException)
void removeEventListener (in long type, in ToiEventListener listener) raises (TToiInvalidArgumentException)

Member Function Documentation

void ToiEventTarget::addEventListener ( in long  type,
in ToiEventListener  listener 
) raises (TToiInvalidArgumentException)

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.

Parameters:
typeThe event type of the event to subscribe to.
listenerThe JavaScript function that will receive events.
Exceptions:
TInvalidArgumentExceptionRaised 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 ToiEventTarget::removeEventListener ( in long  type,
in ToiEventListener  listener 
) raises (TToiInvalidArgumentException)

This method removes an event listener for a specific event.

Parameters:
typeThe event type of the event to remove the listener from.
listenerThe JavaScript function that was previously added as an event listener.
Exceptions:
TInvalidArgumentExceptionRaised 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.