Public Member Functions | Public Attributes

nsIFastLoadService Interface Reference

import "nsIFastLoadService.idl";

Inheritance diagram for nsIFastLoadService:
Collaboration diagram for nsIFastLoadService:

List of all members.

Public Member Functions

nsIFile newFastLoadFile (in string aBaseName)
nsIObjectInputStream newInputStream (in nsIFile aFile)
nsIObjectOutputStream newOutputStream (in nsIOutputStream aDestStream)
void startMuxedDocument (in nsISupports aURI, in string aURISpec, in PRInt32 aDirectionFlags)
 These methods associate a URI object with its spec, for faster select using the object pointer as a key, rather than the spec string.
nsISupports selectMuxedDocument (in nsISupports aURI)
void endMuxedDocument (in nsISupports aURI)
void addDependency (in nsIFile aFile)
PRUint32 computeChecksum (in nsIFile aFile, in nsIFastLoadReadControl aControl)
void cacheChecksum (in nsIFile aFile, in nsIObjectOutputStream aStream)
void getFastLoadReferent (inout nsISupports aPtr)
void readFastLoadPtr (in nsIObjectInputStream aInputStream, inout nsISupports aPtr)
void writeFastLoadPtr (in nsIObjectOutputStream aOutputStream, in nsISupports aPtr)
boolean hasMuxedDocument (in string aURISpec)
 Return true if aURISpec identifies a muxed document in the FastLoad file, false otherwise.

Public Attributes

const PRInt32 NS_FASTLOAD_READ = 1
const PRInt32 NS_FASTLOAD_WRITE = 2
attribute nsIObjectInputStream inputStream
attribute nsIObjectOutputStream outputStream
attribute nsIFastLoadFileIO fileIO
readonly attribute PRInt32 direction

Member Function Documentation

void nsIFastLoadService::addDependency ( in nsIFile  aFile  ) 
void nsIFastLoadService::cacheChecksum ( in nsIFile  aFile,
in nsIObjectOutputStream  aStream 
)
PRUint32 nsIFastLoadService::computeChecksum ( in nsIFile  aFile,
in nsIFastLoadReadControl  aControl 
)
void nsIFastLoadService::endMuxedDocument ( in nsISupports  aURI  ) 
void nsIFastLoadService::getFastLoadReferent ( inout nsISupports  aPtr  ) 
boolean nsIFastLoadService::hasMuxedDocument ( in string  aURISpec  ) 

Return true if aURISpec identifies a muxed document in the FastLoad file, false otherwise.

nsIFile nsIFastLoadService::newFastLoadFile ( in string  aBaseName  ) 
nsIObjectInputStream nsIFastLoadService::newInputStream ( in nsIFile  aFile  ) 
nsIObjectOutputStream nsIFastLoadService::newOutputStream ( in nsIOutputStream  aDestStream  ) 
void nsIFastLoadService::readFastLoadPtr ( in nsIObjectInputStream  aInputStream,
inout nsISupports  aPtr 
)
nsISupports nsIFastLoadService::selectMuxedDocument ( in nsISupports  aURI  ) 
void nsIFastLoadService::startMuxedDocument ( in nsISupports  aURI,
in string  aURISpec,
in PRInt32  aDirectionFlags 
)

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 nsIFastLoadService::writeFastLoadPtr ( in nsIObjectOutputStream  aOutputStream,
in nsISupports  aPtr 
)

Member Data Documentation

readonly attribute PRInt32 nsIFastLoadService::direction

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