27 #ifndef __SEEKABLE_CHANNEL_H__
28 #define __SEEKABLE_CHANNEL_H__
53 #define SONGBIRD_SEEKABLECHANNEL_CONTRACTID \
54 "@songbirdnest.com/Songbird/SeekableChannel;1"
55 #define SONGBIRD_SEEKABLECHANNEL_CLASSNAME \
56 "Songbird Seekable Channel Component"
57 #define SONGBIRD_SEEKABLECHANNEL_CID \
62 { 0xA1, 0xA7, 0x74, 0x70, 0x67, 0x47, 0x5B, 0xFD } \
73 #include <sbISeekableChannel.h>
77 #include <nsIChannel.h>
78 #include <nsIChannelEventSink.h>
79 #include <nsIInterfaceRequestor.h>
80 #include <nsIStreamListener.h>
92 #define NS_ERROR_SONGBIRD_SEEKABLE_CHANNEL_RESTART \
93 NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GENERAL, 1)
107 public nsIStreamListener,
108 public nsIChannelEventSink,
124 NS_DECL_SBISEEKABLECHANNEL
125 NS_DECL_NSISTREAMLISTENER
126 NS_DECL_NSIREQUESTOBSERVER
127 NS_DECL_NSICHANNELEVENTSINK
128 NS_DECL_NSIINTERFACEREQUESTOR
178 const Segment *pSegment1,
179 const Segment *pSegment2)
const;
187 typedef std::set<Segment *, Segment> DataSet;
203 nsCOMPtr<nsIChannel> mpChannel;
204 nsCOMPtr<sbISeekableChannelListener>
206 DataSet mChannelData;
207 PRUint64 mContentLength;
212 PRBool mDataReceivedSinceStart;
219 nsresult ReadSegment(
220 nsIInputStream *pStream,
223 nsresult InsertSegment(
226 nsresult MergeSegments(
229 Segment **ppMergedSegment);
231 PRBool AllDataRead();
236 void DumpChannelData();
virtual ~sbSeekableChannel()
A seekable wrapper for an nsIChannel.
NS_DECL_ISUPPORTS NS_DECL_SBISEEKABLECHANNEL NS_DECL_NSISTREAMLISTENER NS_DECL_NSIREQUESTOBSERVER NS_DECL_NSICHANNELEVENTSINK NS_DECL_NSIINTERFACEREQUESTOR sbSeekableChannel()
attribute PRUInt64 pos
The current read position (for the read methods)
const nsIInterfaceRequestor