ToiDlnaService Interface Reference


Description

Service:
This is a service and can be accessed through toi.dlnaService

This is the main interface which the DLNA service registers with the system's name service. The interface is used by applications to access the DLNA network and create their own DLNA service control point instances.

The typical procedure to set up a control point session and communicate with a service in another DLNA device looks like this:

Interface Procedure
ToiDlnaService
ToiDlnaContentDirectoryService
ToiOperationManager
ToiDlnaContentDirectoryServiceCdsObject
  • Read object data and properties.
See also:
ToiDlnaContentDirectoryService
ToiOperationManager
ToiOperationOperationResultEvent
ToiDlnaContentDirectoryContainerChangedEvent
ToiDlnaMediaServerAppearedEvent
ToiDlnaMediaServerDisappearedEvent

import "ToiDlnaService.idl";

List of all members.

Public Member Functions

TToiMediaServerUuidSequence getMediaServers ()
ToiDlnaServiceMediaServerInfo getMediaServerInfo (in TToiMediaServerUuid uuid) raises (TToiInvalidArgumentException)
ToiDlnaContentDirectoryService createContentDirectoryInstance (in TToiMediaServerUuid uuid) raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException, TToiOperationNotSupportedException)
ToiDlnaRendererManager createRendererInstance () raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException, TToiOperationNotSupportedException)
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_MEDIA_SERVER_APPEARED = 600
const long ON_MEDIA_SERVER_DISAPPEARED = 601
TToiServiceType

const TToiServiceType SERVICE_TYPE_CONTENT_DIRECTORY = 0
TToiMediaFormatProfile

const TToiMediaFormatProfile MEDIA_FORMAT_PROFILE_JPEG_LRG_ICO = 0
const TToiMediaFormatProfile MEDIA_FORMAT_PROFILE_JPEG_SM_ICO = 1
const TToiMediaFormatProfile MEDIA_FORMAT_PROFILE_PNG_LRG_ICO = 2
const TToiMediaFormatProfile MEDIA_FORMAT_PROFILE_PNG_SM_ICO = 3

Public Types

typedef string TToiMediaServerUuid
typedef sequence
< TToiMediaServerUuid
TToiMediaServerUuidSequence
typedef long TToiServiceType
typedef sequence< TToiServiceTypeTToiServiceTypeSequence
typedef long TToiMediaFormatProfile
typedef sequence
< ToiDlnaServiceMediaServerIconInfo
TToiMediaServerIconInfoSequence

Member Typedef Documentation

The DLNA media format profiles.

Universally unique identifier of a DLNA media server.

Sequence of unique DLNA media server identifiers.

The different kinds of DLNA services exposed by DLNA media servers.

A sequence of DLNA service types.


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.

This function creates a new Content Directory Service control point for a specific DLNA media server and associates it with the calling application.

When the application no longer needs the service, it should release it by calling ToiDlnaContentDirectoryService::releaseInstance().

Parameters:
uuid The DLNA media server identifier.
Return values:
IToiDlnaContentDirectoryService 
Exceptions:
TToiInvalidArgumentException Raised if the application identifier is invalid.
TToiNotEnoughResourcesException Raised if the system cannot create a new instance of the service.
TToiOperationNotSupportedException Raised if the DLNA server does not support the Content Directory Service.
Technical Preview:
method CreateRendererInstance is a TECHNICAL PREVIEW, it may change. This function creates a new DLNA Media Renderer Manager for control via an external DMC. This also notifies the internal DLNA stack there is a renderer available. When the application no longer needs the service, it should release it by calling ToiDlnaRendererManager::releaseInstance()
Return values:
IToiDlnaRendererManager 
Exceptions:
TToiInvalidArgumentException Raised if the application identifier is invalid.
TToiNotEnoughResourcesException Raised if the system cannot create a new instance of the manager.
TToiOperationNotSupportedException Raised if the platform does not support the Dlna Renderer manager.
ToiDlnaServiceMediaServerInfo ToiDlnaService::getMediaServerInfo ( in TToiMediaServerUuid  uuid  )  raises (TToiInvalidArgumentException)

Returns a list with device identifiers for the DLNA devices present in the network.

Parameters:
uuid The DLNA media server identifier.
Return values:
info The DLNA media server information.
Exceptions:
TToiInvalidArgumentException Raised if the uuid does not match any DLNA server.
TToiMediaServerUuidSequence ToiDlnaService::getMediaServers (  ) 

Returns a list with device identifiers for the DLNA devices present in the network.

Return values:
uuids The DLNA media server uuid identifiers.
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.

Member Data Documentation

Large JPEG icon: size 120x120 pixels, MIME type "image/jpeg".

This constant can also be accessed from toi.consts.ToiDlnaService.MEDIA_FORMAT_PROFILE_JPEG_LRG_ICO.

Small JPEG icon: size 48x48 pixels, MIME type "image/jpeg".

This constant can also be accessed from toi.consts.ToiDlnaService.MEDIA_FORMAT_PROFILE_JPEG_SM_ICO.

Large PNG icon: size 120x120 pixels, MIME type "image/png".

This constant can also be accessed from toi.consts.ToiDlnaService.MEDIA_FORMAT_PROFILE_PNG_LRG_ICO.

Small PNG icon: size 48x48 pixels, MIME type "image/png".

This constant can also be accessed from toi.consts.ToiDlnaService.MEDIA_FORMAT_PROFILE_PNG_SM_ICO.

This is an Event identifier for ToiDlnaMediaServerAppearedEvent.

This constant can also be accessed from toi.consts.ToiDlnaService.ON_MEDIA_SERVER_APPEARED.

This is an Event identifier for ToiDlnaMediaServerDisappearedEvent.

This constant can also be accessed from toi.consts.ToiDlnaService.ON_MEDIA_SERVER_DISAPPEARED.

The Content Directory Service used to browse and search for media files.

This constant can also be accessed from toi.consts.ToiDlnaService.SERVICE_TYPE_CONTENT_DIRECTORY.