sbISeekableChannel Interface Reference

A seekable wrapper for an nsIChannel. More...

import"sbISeekableChannel.idl";

Inheritance diagram for sbISeekableChannel:
[legend]
Collaboration diagram for sbISeekableChannel:
[legend]

Public Member Functions

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

Public Attributes

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

Detailed Description

A seekable wrapper for an nsIChannel.

See Also
sbISeekableChannel

Definition at line 70 of file sbISeekableChannel.idl.

Member Function Documentation

void sbISeekableChannel::close ( )

Close the channel and free all references.

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

Open the channel and start downloading the file.

Parameters
aChannelThe channel from which to download
aListenerThe listener to be informed of the channel progress
PRUint32 sbISeekableChannel::read ( in charPtr  aBuffer,
in PRUint32  aSize 
)

Read from the buffer.

Parameters
aBufferThe buffer into which to read
aSizeThe 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
void sbISeekableChannel::skip ( in PRUint64  aDistance)

Skip forward in the read buffer.

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

Member Data Documentation

readonly attribute PRBool sbISeekableChannel::completed

If the nsIChannel has finished (by completion or error)

Definition at line 83 of file sbISeekableChannel.idl.

attribute PRUInt64 sbISeekableChannel::pos

The current read position (for the read methods)

Definition at line 75 of file sbISeekableChannel.idl.

readonly attribute PRUInt64 sbISeekableChannel::size

The size of the file targeted by the nsIChannel.

Definition at line 79 of file sbISeekableChannel.idl.


The documentation for this interface was generated from the following file: