sbISeekableChannel.idl
Go to the documentation of this file.
1 /*
2 //
3 // BEGIN SONGBIRD GPL
4 //
5 // This file is part of the Songbird web player.
6 //
7 // Copyright(c) 2005-2008 POTI, Inc.
8 // http://songbirdnest.com
9 //
10 // This file may be licensed under the terms of of the
11 // GNU General Public License Version 2 (the "GPL").
12 //
13 // Software distributed under the License is distributed
14 // on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
15 // express or implied. See the GPL for the specific language
16 // governing rights and limitations.
17 //
18 // You should have received a copy of the GPL along with this
19 // program. If not, go to http://www.gnu.org/licenses/gpl.html
20 // or write to the Free Software Foundation, Inc.,
21 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 //
23 // END SONGBIRD GPL
24 //
25 */
26 
32 #include "nsISupports.idl"
33 
34 interface nsIChannel;
35 interface sbISeekableChannel;
36 
44 [uuid(873ABEF5-AEE5-468E-8896-7768A13DC9A7)]
45 
47 {
57  void onChannelDataAvailable( in sbISeekableChannel aChannel );
58 };
59 
60 
68 [uuid(873E0403-B0B1-4E6D-BD32-E4ED51492109)]
69 
71 {
75  attribute PRUInt64 pos;
79  readonly attribute PRUInt64 size;
83  readonly attribute PRBool completed;
90  void open( in nsIChannel aChannel, in sbISeekableChannelListener aListener );
94  void close();
99  void skip( in PRUint64 aDistance );
106  PRUint32 read( in charPtr aBuffer, in PRUint32 aSize );
111  char readChar();
116  PRInt32 readInt32();
121  PRInt64 readInt64();
122 };
PRUint32 read(in charPtr aBuffer, in PRUint32 aSize)
Read from the buffer.
char readChar()
Read a byte from the buffer.
readonly attribute PRBool completed
If the nsIChannel has finished (by completion or error)
PRInt32 readInt32()
Read a 32bit int from the buffer.
var uuid
A seekable wrapper for an nsIChannel.
function E(H, I)
attribute PRUInt64 pos
The current read position (for the read methods)
readonly attribute PRUInt64 size
The size of the file targeted by the nsIChannel.
const nsIChannel
void open(in nsIChannel aChannel, in sbISeekableChannelListener aListener)
Open the channel and start downloading the file.
A listener interface for sbISeekableChannel.
void skip(in PRUint64 aDistance)
Skip forward in the read buffer.
void close()
Close the channel and free all references.
void onChannelDataAvailable(in sbISeekableChannel aChannel)
Be thou informst that one's sbISeekableChannel has just received data.
PRInt64 readInt64()
Read a 64bit int from the buffer.