Linux Mac OSX Windows

Implemented by


  
[scriptable, uuid(759e475e-0c23-4dbf-b1b8-78c9369e3072)]
interface nsIFastLoadService : nsISupports

Constants


        
const PRInt32 NS_FASTLOAD_READ = 1

        
const PRInt32 NS_FASTLOAD_WRITE = 2

Attributes


        
readonly attribute PRInt32 direction

        
attribute nsIFastLoadFileIO fileIO

        
attribute nsIObjectInputStream inputStream

        
attribute nsIObjectOutputStream outputStream

Methods


        
void addDependency(in nsIFile aFile)

        
void cacheChecksum(in nsIFile aFile, in nsIObjectOutputStream aStream)

        
PRUint32 computeChecksum(in nsIFile aFile, in nsIFastLoadReadControl aControl)

        
void endMuxedDocument(in nsISupports aURI)

        
[noscript] void getFastLoadReferent(inout nsISupports aPtr)
 Return true if aURISpec identifies a muxed document in the FastLoad
 file, false otherwise.
boolean hasMuxedDocument(in string aURISpec)

        
nsIFile newFastLoadFile(in string aBaseName)

        
nsIObjectInputStream newInputStream(in nsIInputStream aSrcStream)

        
nsIObjectOutputStream newOutputStream(in nsIOutputStream aDestStream)

        
[noscript] void readFastLoadPtr(in nsIObjectInputStream aInputStream, inout nsISupports aPtr)

        
nsISupports selectMuxedDocument(in nsISupports aURI)
 These methods associate a URI object with its spec, for faster select
 using the object pointer as a key, rather than the spec string.  The
 selectMuxedDocument method returns the previously selected URI object,
 in case a caller needs to reselect the previous after muxing data for
 a given URI synchronously.  For the non-blocking or "asynchronous" i/o
 case, the caller must select the source URI from the FastLoad multiplex
 before writing a new burst of data parsed from the slow-loaded source.

 Clients of inputStream and outputStream should try to demultiplex data
 from the input stream only if fastLoadService->StartMuxedDocument(uri,
 urispec, NS_FASTLOAD_READ) succeeds.  If StartMuxedDocument fails with
 NS_ERROR_NOT_AVAILABLE, callers should slow-load the documents, muxing
 their data to the current output stream.
void startMuxedDocument(in nsISupports aURI, in string aURISpec, in PRInt32 aDirectionFlags)

        
[noscript] void writeFastLoadPtr(in nsIObjectOutputStream aOutputStream, in nsISupports aPtr)