ToiDiagnosticsDataModel Interface Reference


Description

Technical Preview:
This interface is a TECHNICAL PREVIEW, it may change. This interface represents the data model of all the diagnostics information present on the device.

import "ToiDiagnosticsDataModel.idl";

List of all members.

Public Member Functions

ToiDiagnosticsDataModelObjectInfo getObject (in TToiObjectIdentifier objectId) raises (TToiInvalidArgumentException)
void setObject (in ToiDiagnosticsDataModelObjectInfo infoObject) raises (TToiInvalidArgumentException, TToiPermissionDeniedException)
void subscribeObject (in ToiEventListener eventListener, in TToiObjectIdentifier objectId) raises (TToiInvalidArgumentException)
void unsubscribeObject (in ToiEventListener eventListener, in TToiObjectIdentifier objectId) raises (TToiInvalidArgumentException)
void releaseInstance ()
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_OBJECTS_CHANGED = 900
const long ON_OBJECTS_ADDED = 901
const long ON_OBJECTS_REMOVED = 902

Public Types

typedef string TToiObjectIdentifier
typedef sequence
< ToiDiagnosticsDataModelObjectParameter
TToiObjectParameterSequence
typedef sequence
< TToiObjectIdentifier
TToiObjectIdentifierSequence
typedef sequence
< ToiDiagnosticsDataModelObjectInfo
TToiObjectInfoSequence

Member Typedef Documentation

Identifier for an object in the Data Model.

Sequence of object Identifiers.


Member Function Documentation

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.

Parameters:
type The event type of the event to subscribe to.
listener The JavaScript function that will receive events.
Exceptions:
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.
ToiDiagnosticsDataModelObjectInfo ToiDiagnosticsDataModel::getObject ( in TToiObjectIdentifier  objectId  )  raises (TToiInvalidArgumentException)

This function returns a ToiDiagnosticsDataModelObjectInfo corresponding to the given objectId.

Parameters:
objectId The Id for the object
Return values:
infoObject The ToiDiagnosticsDataModelObjectInfo representing that object in the data model.
Exceptions:
TToiInvalidArgumentException Raised if the specified object identifier is invalid.
void ToiDiagnosticsDataModel::releaseInstance (  ) 

This function releases the resources used by this instance. When this function returns all observers have also been released.

void ToiEventTarget::removeEventListener ( in long  type,
in ToiEventListener  listener 
) raises (TToiInvalidArgumentException) [inherited]

This method removes an event listener for a specific event.

Parameters:
type The event type of the event to remove the listener from.
listener The JavaScript function that was previously added as an event listener.
Exceptions:
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 ToiDiagnosticsDataModel::setObject ( in ToiDiagnosticsDataModelObjectInfo  infoObject  )  raises (TToiInvalidArgumentException, TToiPermissionDeniedException)

This function is used to set the parameters of an object in the data model.

Parameters:
infoObject The object containing new parameter values.
Exceptions:
TToiInvalidArgumentException Raised if the specified object indentifier is invalid.
TToiPermissionDeniedException Raised if the parameters of the data model object cannot be set.
void ToiDiagnosticsDataModel::subscribeObject ( in ToiEventListener  eventListener,
in TToiObjectIdentifier  objectId 
) raises (TToiInvalidArgumentException)

This function is used to register a ToiDiagnosticsDataModelObserver with the diagnostics framework to be notified of any changes to an object in the data model.

Parameters:
eventListener ToiEventListener
objectId The object id that the application is interested in.
Exceptions:
TToiInvalidArgumentException Raised if the specified object identifier is invalid.
See also:
ToiDiagnosticsDataModel::unsubscribeObject()
void ToiDiagnosticsDataModel::unsubscribeObject ( in ToiEventListener  eventListener,
in TToiObjectIdentifier  objectId 
) raises (TToiInvalidArgumentException)

This function is used to unregister a previously registered ToiDiagnosticsDataModelObserver.

Parameters:
eventListener ToiEventListener
objectId The object id that the application is interested in.
Exceptions:
TToiInvalidArgumentException Raised if the specified object identifier is invalid. Raised if the address is invalid.
See also:
ToiDiagnosticsDataModel::subscribeObject()

Member Data Documentation

This is an Event identifier for ToiDiagnosticsDataModelObjectsAddedEvent.

This constant can also be accessed from toi.consts.ToiDiagnosticsDataModel.ON_OBJECTS_ADDED.

This is an Event identifier for ToiDiagnosticsDataModelObjectsChangedEvent.

This constant can also be accessed from toi.consts.ToiDiagnosticsDataModel.ON_OBJECTS_CHANGED.

This is an Event identifier for ToiDiagnosticsDataModelObjectsRemovedEvent.

This constant can also be accessed from toi.consts.ToiDiagnosticsDataModel.ON_OBJECTS_REMOVED.