Songbird / Development / Songbird Add-Ons API Documentation

sbISeekableChannel Interface Reference

A seekable wrapper for an nsIChannel. More...

List of all members.

Public Member Functions

void open (in nsIChannel aChannel, in sbISeekableChannelListener aListener)
 Open the channel and start downloading the file.
void close ()
 Close the channel and free all references.
void skip (in PRUint64 aDistance)
 Skip forward in the read buffer.
PRUint32 read (in charPtr aBuffer, in PRUint32 aSize)
 Read from the buffer.
char readChar ()
 Read a byte from the buffer.
PRInt32 readInt32 ()
 Read a 32bit int from the buffer.
PRInt64 readInt64 ()
 Read a 64bit int from the buffer.

Public Attributes

attribute PRUInt64 pos
 The current read position (for the read methods).
readonly attribute PRUInt64 size
 The size of the file targeted by the nsIChannel.
readonly attribute PRBool completed
 If the nsIChannel has finished (by completion or error).


Detailed Description

A seekable wrapper for an nsIChannel.

See also:
sbISeekableChannel

Definition at line 70 of file sbISeekableChannel.idl.


Member Function Documentation

void sbISeekableChannel::open ( in nsIChannel  aChannel,
in sbISeekableChannelListener  aListener 
)

Open the channel and start downloading the file.

Parameters:
aChannel The channel from which to download
aListener The listener to be informed of the channel progress

void sbISeekableChannel::skip ( in PRUint64  aDistance  ) 

Skip forward in the read buffer.

Parameters:
aDistance The number of bytes to skip forward in the buffer (you can pass negative numbers)

PRUint32 sbISeekableChannel::read ( in charPtr  aBuffer,
in PRUint32  aSize 
)

Read from the buffer.

Parameters:
aBuffer The buffer into which to read
aSize The size of the buffer in bytes
Returns:
The number of bytes read

char sbISeekableChannel::readChar (  ) 

Read a byte from the buffer.

Returns:
The byte read

PRInt32 sbISeekableChannel::readInt32 (  ) 

Read a 32bit int from the buffer.

Returns:
The value read

PRInt64 sbISeekableChannel::readInt64 (  ) 

Read a 64bit int from the buffer.

Returns:
The value read


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