Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Private Member Functions | Private Attributes
nsXPTZipLoader Class Reference

#include <nsXPTZipLoader.h>

Inheritance diagram for nsXPTZipLoader:
Inheritance graph
[legend]
Collaboration diagram for nsXPTZipLoader:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 nsXPTZipLoader ()
virtual ~nsXPTZipLoader ()
void enumerateEntries (in nsILocalFile file, in nsIXPTLoaderSink sink)
 enumerate entries in the given archive for each entry found, the loader will call the sink's foundEntry() method with the appropriate information and a stream that the consumer can read from
nsIInputStream loadEntry (in nsILocalFile file, in string name)
 Load a specific entry from the archive.

Private Member Functions

nsIZipReaderGetZipReader (nsILocalFile *aFile)

Private Attributes

nsCOMPtr< nsIZipReaderCachemCache

Detailed Description

Definition at line 51 of file nsXPTZipLoader.h.


Constructor & Destructor Documentation

Definition at line 50 of file nsXPTZipLoader.cpp.

                               {
}
virtual nsXPTZipLoader::~nsXPTZipLoader ( ) [inline, virtual]

Definition at line 55 of file nsXPTZipLoader.h.

{};

Member Function Documentation

enumerate entries in the given archive for each entry found, the loader will call the sink's foundEntry() method with the appropriate information and a stream that the consumer can read from

Parameters:
filethe file to read from
sinkan object which will be called with each file found in the file

Definition at line 115 of file nsXPTZipLoader.cpp.

{
    NS_ASSERTION(file, "bad file");
    
    if(!mCache)
    {
        mCache = do_CreateInstance(gCacheContractID);
        if(!mCache || NS_FAILED(mCache->Init(gCacheSize)))
            return nsnull;
    }

    nsIZipReader* reader = nsnull;

    if(NS_FAILED(mCache->GetZip(file, &reader)))
        return nsnull;

    return reader;
}

Here is the call graph for this function:

nsIInputStream nsIXPTLoader::loadEntry ( in nsILocalFile  file,
in string  name 
) [inherited]

Load a specific entry from the archive.

Parameters:
filethe file to read from
namethe name of the xpt within the file
Returns:
an input stream that will read the raw xpt data from the file

Member Data Documentation

Definition at line 62 of file nsXPTZipLoader.h.


The documentation for this class was generated from the following files: