WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.

nsIFastLoadService

IID:759e475e-0c23-4dbf-b1b8-78c9369e3072
Inherits From:nsISupports

This interface is intended to be used as a service. To create an object implementing this interface:

var obj = Components.classes["@mozilla.org/fast-load-service;1"].
            getService(Components.interfaces.nsIFastLoadService);

This interface is implemented by the following components:


Constants

PRInt32 NS_FASTLOAD_READ = 1
PRInt32 NS_FASTLOAD_WRITE = 2

Properties

readonly PRInt32 direction

nsIFastLoadFileIO fileIO

nsIObjectInputStream inputStream

nsIObjectOutputStream outputStream


Methods

void addDependency ( nsIFile file ) void cacheChecksum ( nsIFile file , nsIObjectOutputStream stream ) PRUint32 computeChecksum ( nsIFile file , nsIFastLoadReadControl control ) void endMuxedDocument ( nsISupports URI ) [noscript] void getFastLoadReferent ( inout nsISupports ptr ) PRBool hasMuxedDocument ( char* URISpec ) nsIFile newFastLoadFile ( char* baseName ) nsIObjectInputStream newInputStream ( nsIInputStream srcStream ) nsIObjectOutputStream newOutputStream ( nsIOutputStream destStream ) [noscript] void readFastLoadPtr ( nsIObjectInputStream inputStream , inout nsISupports ptr ) nsISupports selectMuxedDocument ( nsISupports URI ) void startMuxedDocument ( nsISupports URI , char* URISpec , PRInt32 directionFlags ) [noscript] void writeFastLoadPtr ( nsIObjectOutputStream outputStream , nsISupports ptr )

void addDependency ( nsIFile file )

Arguments:
file

void cacheChecksum ( nsIFile file , nsIObjectOutputStream stream )

Arguments:
file
stream

PRUint32 computeChecksum ( nsIFile file , nsIFastLoadReadControl control )

Arguments:
file
control

void endMuxedDocument ( nsISupports URI )

Arguments:
URI

void getFastLoadReferent ( inout nsISupports ptr )

Arguments:
ptr

PRBool hasMuxedDocument ( char* URISpec )

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

Arguments:
URISpec

nsIFile newFastLoadFile ( char* baseName )

Arguments:
baseName

nsIObjectInputStream newInputStream ( nsIInputStream srcStream )

Arguments:
srcStream

nsIObjectOutputStream newOutputStream ( nsIOutputStream destStream )

Arguments:
destStream

void readFastLoadPtr ( nsIObjectInputStream inputStream , inout nsISupports ptr )

Arguments:
inputStream
ptr

nsISupports selectMuxedDocument ( nsISupports URI )

Arguments:
URI

void startMuxedDocument ( nsISupports URI , char* URISpec , PRInt32 directionFlags )

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.

Arguments:
URI
URISpec
directionFlags

void writeFastLoadPtr ( nsIObjectOutputStream outputStream , nsISupports ptr )

Arguments:
outputStream
ptr

Reference documentation is generated from Mozilla's source.