Songbird / Development / Songbird Add-Ons API Documentation

sbIMediaItem Interface Reference

Interface that defines a single item of media in the system. More...

import "sbIMediaItem.idl";

Inheritance diagram for sbIMediaItem:

sbILibraryResource sbIMediaList sbILibrary sbILocalDatabaseSmartMediaList sbIDeviceLibrary List of all members.

Public Member Functions

void testIsAvailable (in nsIObserver aObserver)
 Test if this media item is available for playback.
nsIChannel openInputStreamAsync (in nsIStreamListener aListener, in nsISupports aContext)
 Asynchronously get an input stream to the content of the media item.
nsIInputStream openInputStream ()
 Synchronously get an input stream to the content of the media item.
nsIOutputStream openOutputStream ()
 Get an output stream to the content of the media item.
AString toString ()
 Get a string representation of the media item, useful for debugging.

Public Attributes

readonly attribute sbILibrary library
 The library that this media item is contained in.
readonly attribute boolean isMutable
 Can the media item be changed?
attribute long long mediaCreated
 Creation time of the media item as a unix timestamp.
attribute long long mediaUpdated
 Last modification time of the media item as a unix timestamp.
attribute nsIURI contentSrc
 A nsIURI that resolves to the content of the media item.
attribute long long contentLength
 Size (in bytes) of the content of the media item.
attribute AString contentType
 Content type of the content of the media item, typically a mime type (should this be renamed?).

Detailed Description

Interface that defines a single item of media in the system.

The Songbird concept of a media item is the abstraction of a renderable piece of media. A media item contains content as well as metadata about the content. A media item must be associated with a particular library.

See also:
sbILibrary, sbIMediaList

Definition at line 54 of file sbIMediaItem.idl.


Member Function Documentation

void sbIMediaItem::testIsAvailable ( in nsIObserver  aObserver  ) 

Test if this media item is available for playback.

Parameters:
aObserver An observer that is notified with the item's availabilty

nsIChannel sbIMediaItem::openInputStreamAsync ( in nsIStreamListener  aListener,
in nsISupports  aContext 
)

Asynchronously get an input stream to the content of the media item.

Note:
If the listener can also QI to an nsIInterfaceRequestor, it will be assigned to the internal channel's notificationCallbacks property.
Parameters:
aListener Provide an nsIStreamListener to receive streaming data.
aContext Value passed to the stream listener to provide context.

nsIInputStream sbIMediaItem::openInputStream (  ) 

Synchronously get an input stream to the content of the media item.

Returns:
The input stream

nsIOutputStream sbIMediaItem::openOutputStream (  ) 

Get an output stream to the content of the media item.

Returns:
The output stream

AString sbIMediaItem::toString (  ) 

Get a string representation of the media item, useful for debugging.

Returns:
A string representation of the media item


Member Data Documentation

attribute long long sbIMediaItem::mediaCreated

Creation time of the media item as a unix timestamp.

Note that this is the creation time of the media item itself, not the creation time of the item's content

Definition at line 94 of file sbIMediaItem.idl.

attribute long long sbIMediaItem::mediaUpdated

Last modification time of the media item as a unix timestamp.

Note that this is the last modification time of the media item itself, not the creation time of the item's content

Definition at line 111 of file sbIMediaItem.idl.


The documentation for this interface was generated from the following file:
Generated on Tue Mar 10 14:29:00 2009 for Songbird by  doxygen 1.5.2