Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions
nsIStorageStream.idl File Reference
import "nsISupports.idl";
import "nsrootidl.idl";

Go to the source code of this file.

Classes

interface  nsIStorageStream
 The nsIStorageStream interface maintains an internal data buffer that can be filled using a single output stream. More...

Functions

NS_COM nsresult NS_NewStorageStream (PRUint32 segmentSize, PRUint32 maxSize, nsIStorageStream **result)

Function Documentation

NS_COM nsresult NS_NewStorageStream ( PRUint32  segmentSize,
PRUint32  maxSize,
nsIStorageStream **  result 
)

Definition at line 578 of file nsStorageStream.cpp.

{
    NS_ENSURE_ARG(result);

    nsStorageStream* storageStream = new nsStorageStream();
    if (!storageStream) return NS_ERROR_OUT_OF_MEMORY;
    
    NS_ADDREF(storageStream);
    nsresult rv = storageStream->Init(segmentSize, maxSize, nsnull);
    if (NS_FAILED(rv)) {
        NS_RELEASE(storageStream);
        return rv;
    }
    *result = storageStream;
    return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function: