
© 2009-2010 OMTP Ltd. All rights reserved. OMTP and OMTP BONDI are registered trademarks of OMTP Ltd.
Provides access to DLNA services
DlnaObjectArray
DlnaRendererArray
DlnaServerArray
DlnaError
DlnaDevice
DlnaGetVolumeSuccessCallback
DlnaObject
DlnaObjectSelectSuccessCallback
DlnaSuccessCallback
DlnaErrorCallback
DlnaGetPositionSuccessCallback
DlnaServer
DlnaDeviceListener
DlnaServerListener
DlnaMediaObject
DlnaBrowseSuccessCallback
| Interface | Method |
|---|---|
| DlnaError | |
| DlnaDevice | |
| DlnaGetVolumeSuccessCallback | void onSuccess(unsigned short volume) |
| DlnaObject | |
| DlnaObjectSelectSuccessCallback | void onSuccess(DlnaPlaybackObject playbackObject) |
| DlnaSuccessCallback | void onSuccess() |
| DlnaErrorCallback | void onError(DlnaError error) |
| DlnaGetPositionSuccessCallback | void onSuccess(DOMString position) |
| DlnaServer | boolean registerServerListener(DlnaServerListener listener) void unregisterServerListener(DlnaServerListener listener) |
| DlnaDeviceListener | void deviceAdded(DlnaDevice device) void deviceRemoved(DlnaDevice device) |
| DlnaServerListener | void mediaObjectsAdded() void mediaObjectsRemoved() void mediaObjectsUpdated() void sortCapabilitiesReady() void searchCapabilitiesReady() |
| DlnaMediaObject | |
| DlnaBrowseSuccessCallback | void onSuccess(unsigned long startOffset, unsigned long totalCount, DlnaObjectArray mediaObjects) |
This API enables discovery of the DLNA devices in the local network, control of the devices. It shall/could be coupled with the Media Player API for local playback.
This is the list of URIs used to declare this API's features, for use in bondi.requestFeature. For each URL, the list of functions covered is provided.
Enables discovery of the devices and medias in the local network
Device capabilities:
dlna.discoverEnables rendering of the medias in the local network on DLNA renderer (DMR)
Device capabilities:
dlna.renderdlna.discoverDiscovery of the DLNA devices and medias
dlna.renderRendering of the DLNA media on DMR
DlnaObjectArray
Array of DLNA objects: media containers and media files.
typedef sequence<DlnaObject> DlnaObjectArray;
DlnaRendererArray
Array of DLNA renderers (DMR).
typedef sequence<DlnaRenderer> DlnaRendererArray;
DlnaServerArray
Array of DLNA servers (DMS).
typedef sequence<DlnaServer> DlnaServerArray;
DlnaError
DLNA Errors
interface DlnaError : GenericError {
const unsigned short NO_SELECTION_ERROR = 1;
};
unsigned short NO_SELECTION_ERRORNo media was selected for playback
DlnaDevice
Base interface for DLNA devices (renderer and server).
interface DlnaDevice {
const unsigned short DLNA_DEVICE_TYPE_RENDERER = 0;
const unsigned short DLNA_DEVICE_TYPE_SERVER = 1;
readonly attribute unsigned short deviceType;
readonly attribute DOMString name;
};
unsigned short DLNA_DEVICE_TYPE_RENDERERConstant used to identify the type of DLNA device as a renderer.
unsigned short DLNA_DEVICE_TYPE_SERVERConstant used to identify the type of DLNA device as a server.
readonly
unsigned short deviceTypeIndicates the type of device (renderer or server)
if(deviceType == DLNA_DEVICE_TYPE_SERVER) {
// this is a DLNA server
}
readonly
DOMString nameAdvertised name of the device
document.getElementById("servername").innerHTML = name;
DlnaGetVolumeSuccessCallback
DLNA DlnaRender.getVolume specific success callback.
[Callback=FunctionOnly, NoInterfaceObject] interface DlnaGetVolumeSuccessCallback {
void onSuccess(in unsigned short volume);
};
This callback interface specifies a success callback with a function taking the volume value as input argument. It is used only with getVolume method of DlnaRender interface.
onSuccessMethod invoked when the asynchronous call completes succesfully
void onSuccess(in unsigned short volume);
DlnaObject
Base interface for media container and media file.
interface DlnaObject {
readonly attribute unsigned short objectType;
};
readonly
unsigned short objectTypeIndicates the type of object (container or media file)
if(objectType == DLNA_OBJECT_TYPE_CONTAINER) {
// this is a container
}
DlnaObjectSelectSuccessCallback
DLNA DlnaController.select specific success callback.
[Callback=FunctionOnly, NoInterfaceObject] interface DlnaObjectSelectSuccessCallback {
void onSuccess(in DlnaPlaybackObject playbackObject);
};
This callback interface specifies a success callback with a function taking a PlaybackObject object as input argument. It is used only with select method of DlnaController interface.
onSuccessMethod invoked when the asynchronous call to DlnaController.select completes successfully.
void onSuccess(in DlnaPlaybackObject playbackObject);
DlnaSuccessCallback
DLNA specific success callback.
[Callback=FunctionOnly, NoInterfaceObject] interface DlnaSuccessCallback {
void onSuccess();
};
This callback interface specifies a generic success callback for DLNA APIs.
onSuccessMethod invoked when the asynchronous call completes successfully.
void onSuccess();
DlnaErrorCallback
DLNA specific error callback.
[Callback=FunctionOnly, NoInterfaceObject] interface DlnaErrorCallback {
void onError(in DlnaError error);
};
This callback interface specifies a generic error callback for DLNA APIs.
onErrorMethod invoked when the asynchronous call fails.
void onError(in DlnaError error);
DlnaGetPositionSuccessCallback
DLNA DlnaPlaybackObject.getPosition specific success callback.
[Callback=FunctionOnly, NoInterfaceObject] interface DlnaGetPositionSuccessCallback {
void onSuccess(in DOMString position);
};
This callback interface specifies a success callback with a function taking a PlaybackObject object as input argument. It is used only with select method of DlnaController interface.
onSuccessMethod invoked when the asynchronous call to DlnaPlaybackObject.getPosition succeeds.
void onSuccess(in DOMString position);
DlnaServer
DLNA Server (DMS) interface.
interface DlnaServer : DlnaDevice {
readonly attribute DlnaMediaContainer root;
readonly attribute DOMString sortCapabilities;
readonly attribute DOMString searchCapabilities;
boolean registerServerListener(in DlnaServerListener listener)
raises(SecurityError, DeviceAPIError);
void unregisterServerListener(in DlnaServerListener listener)
raises(SecurityError, DeviceAPIError);
};
This interface enable registratior of the listener for server specific events. It provides access to the root of the file hierarchy within the server and information about DMS' sort and search capabilities.
readonly
DlnaMediaContainer rootRoot media container (folder) of the server. Browsing of the data on the DMS starts here.
readonly
DOMString sortCapabilitiesSort capabilities of the DLNA server (DMS)
alert(server.sortCapabilities);//should display something like "upnp:foreignMetadata::fmBody::fmURI"
readonly
DOMString searchCapabilitiesSearch capabilities of the DLNA server (DMS)
alert(server.searchCapabilities);//should display something like "upnp:foreignMetadata::fmBody::fmURI"
registerServerListenerThis method registers the listener for server events
boolean registerServerListener(in DlnaServerListener listener);
unregisterServerListenerThis method unregisters the listener for server events
void unregisterServerListener(in DlnaServerListener listener);
DlnaDeviceListener
Listener for the generic DLNA device events
[Callback] interface DlnaDeviceListener {
void deviceAdded(in DlnaDevice device);
void deviceRemoved(in DlnaDevice device);
};
deviceAddedCalled when a new device advertised itself
void deviceAdded(in DlnaDevice device);
deviceRemovedCalled when a device was removed from the network
void deviceRemoved(in DlnaDevice device);
DlnaServerListener
Listener for the server events
[Callback] interface DlnaServerListener {
void mediaObjectsAdded();
void mediaObjectsRemoved();
void mediaObjectsUpdated();
void sortCapabilitiesReady();
void searchCapabilitiesReady();
};
mediaObjectsAddedCalled when a new media object was added to the server
void mediaObjectsAdded();
mediaObjectsRemovedCalled when a media object was removed from the server
void mediaObjectsRemoved();
mediaObjectsUpdatedCalled when a media object was updated on the server
void mediaObjectsUpdated();
sortCapabilitiesReadyCalled when the server's sorting capabilities are ready (sortCapabilities is filled with data)
void sortCapabilitiesReady();
searchCapabilitiesReadyCalled when the server's searching capabilities are ready (searchCapabilities is filled with data)
void searchCapabilitiesReady();
DlnaMediaObject
Type of this media file.
interface DlnaMediaObject : DlnaObject {
const unsigned short DLNA_OBJECT_TYPE_CONTAINER = 0;
const unsigned short DLNA_OBJECT_TYPE_MEDIA = 1;
readonly attribute DOMString type;
readonly attribute DOMString id;
readonly attribute DOMString title;
readonly attribute Date datetime;
readonly attribute DOMString url;
readonly attribute DOMString genre;
readonly attribute DOMString artist;
};
alert(media.type); // displays the type of the media file
unsigned short DLNA_OBJECT_TYPE_CONTAINERContainer object.
unsigned short DLNA_OBJECT_TYPE_MEDIAMedia object.
readonly
DOMString typeType of this media file.
alert(media.type); // displays the type of the media file
readonly
DOMString idIdentifier of this media file. The identifier is local to the DMS.
alert(media.id); // displays the identifier of the media file
readonly
DOMString titleTitle of this media file.
alert(media.title); // displays the title of the media file
readonly
Date datetimeDate and time associated with this media file.
alert(media.datetime); // displays the date and time of the media file
readonly
DOMString urlURL that points to this media file.
alert(media.url); // displays the URL of the media file
readonly
DOMString genreGenre of this media file.
alert(media.genre); // displays the genre of the media file
readonly
DOMString artistType of this media file.
alert(media.type); // displays the type of the media file
DlnaBrowseSuccessCallback
DLNA DlnaMediaContainer.browser and .search specific success callback.
[Callback=FunctionOnly, NoInterfaceObject] interface DlnaBrowseSuccessCallback {
void onSuccess(in unsigned long startOffset, in unsigned long totalCount, in DlnaObjectArray mediaObjects);
};
This callback interface specifies a success callback with a function taking the start offset, total count (on server) and the array of the media objects as input arguments. It is used only with browse and search methods of DlnaMediaContainer interface.
onSuccessMethod invoked when the asynchronous call completes successfully
void onSuccess(in unsigned long startOffset, in unsigned long totalCount, in DlnaObjectArray mediaObjects);