ToiDlnaRendererManager Interface Reference


Description

Technical Preview:

interface ToiDlnarendererManager is a TECHNICAL PREVIEW, it may change.

This is an interface to the DLNA DMR (Digital Media Renderer) manager, which is running as a platform service. The DMR manager handles the communication between the DMC and DMR, and sends the relevant requests to the application. The application uses this manager to register for DMR events, specifically media render requests and media render closing. The application then may open the required resource, and notify the DMR manager to continue with the rendering, or deny the request and not render.

import "ToiDlnaRendererManager.idl";

List of all members.

Public Member Functions

void updateSessionStatus (in TToiRendererSessionId id, in TToiRendererStatus status) raises (TToiInvalidArgumentException)
ToiDlnaRendererManagerRendererSessionInfo getSessionInfo (in TToiRendererSessionId id) raises (TToiInvalidArgumentException)
TToiRendererSessionIdSequence getRendererSessions ()
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_RENDERER_SESSION_CHANGED = 4200
TToiRendererState

const TToiRendererState STATE_SESSION_REQUEST = 0
const TToiRendererState STATE_SESSION_ACTIVE = 1
const TToiRendererState STATE_SESSION_CLOSED = 2
TToiRendererStatus

const TToiRendererStatus RENDERER_SUCCESS = 0
const TToiRendererStatus RENDERER_UNAVAILABLE = 1
const TToiRendererStatus RENDERER_FAILURE = 2

Public Types

typedef long TToiRendererSessionId
typedef sequence
< TToiRendererSessionId
TToiRendererSessionIdSequence
typedef long TToiRendererState
typedef long TToiRendererStatus

Member Typedef Documentation

Type for a renderer session ID.

Type for holding a sequence of renderer session ID's.

State identifier used to identify the renderer session's state.

Status identifiers for a DMR session.


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.
TToiRendererSessionIdSequence ToiDlnaRendererManager::getRendererSessions (  ) 

Retreives all the session id's in REQUEST or ACTIVE states

Return values:
ids The list of active session ids.
ToiDlnaRendererManagerRendererSessionInfo ToiDlnaRendererManager::getSessionInfo ( in TToiRendererSessionId  id  )  raises (TToiInvalidArgumentException)

Retreives all the information associated with the current media being rendered for the session id provided.

Parameters:
id The session ID associated with the media in question.
Return values:
info The information associated with the given session id.
Exceptions:
TToiInvalidArgumentException Raised if the session id is invalid.
void ToiDlnaRendererManager::releaseInstance (  ) 

When an application is done using the Renderer Manager it should gracefully release it by calling this function.

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 ToiDlnaRendererManager::updateSessionStatus ( in TToiRendererSessionId  id,
in TToiRendererStatus  status 
) raises (TToiInvalidArgumentException)

Notifies the DMR of an update to the session. This typically will occur when 1, we just received a request, so we will activate a session (if successful) or notify a failure to renderer (if unsuccessful); 2, if the rendering resouce becomes unavailable during rendering; or 3, for any other error while rendering. This may cause a change in State, from REQUEST to ACTIVE (on successful REQUEST), from REQUEST to CLOSED (on unsuccessful REQUEST), or from ACTIVE to CLOSED (on error or resource unavailability).

Parameters:
id The session ID being updated.
status The status for this session's action.
Exceptions:
TToiInvalidArgumentException Raised if the session id is invalid, or the status is invalid for the state of the session.

Member Data Documentation

This is an Event identifier for ToiDlnaRendererRendererSessionChangedEvent.

This constant can also be accessed from toi.consts.ToiDlnaRendererManager.ON_RENDERER_SESSION_CHANGED.

RENDERER_FAILURE notifies the DMR the request to render failed, or the currently rendering media must close, because of an external failure.

This constant can also be accessed from toi.consts.ToiDlnaRendererManager.RENDERER_FAILURE.

RENDERER_SUCCESS notifies the DMR the request to render was successful.

This constant can also be accessed from toi.consts.ToiDlnaRendererManager.RENDERER_SUCCESS.

RENDERER_UNAVAILABLE notifies the DMR the request to render failed, or the currently rendering media must close, because the renderer is unavailable.

This constant can also be accessed from toi.consts.ToiDlnaRendererManager.RENDERER_UNAVAILABLE.

In STATE_SESSION_ACTIVE the DMR is actively rendering the requested session.

This constant can also be accessed from toi.consts.ToiDlnaRendererManager.STATE_SESSION_ACTIVE.

In STATE_SESSION_CLOSED the DMR has closed the given session. This can occur at the end of media, an error in rendering, or from an update from the application.

This constant can also be accessed from toi.consts.ToiDlnaRendererManager.STATE_SESSION_CLOSED.

In STATE_SESSION_REQUEST the DMR has issued a request to begin rendering and is waiting for an update to begin or close the rendering session.

This constant can also be accessed from toi.consts.ToiDlnaRendererManager.STATE_SESSION_REQUEST.