Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Functions
nsILocalStore.h File Reference
#include "rdf.h"
#include "nsISupports.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  nsILocalStore

Defines

#define NS_ILOCALSTORE_IID   { 0xdf71c6f1, 0xec53, 0x11d2, { 0xbd, 0xca, 0x0, 0x0, 0x64, 0x65, 0x73, 0x74 } }
#define NS_LOCALSTORE_CID   { 0xdf71c6f0, 0xec53, 0x11d2, { 0xbd, 0xca, 0x0, 0x0, 0x64, 0x65, 0x73, 0x74 } }
#define NS_LOCALSTORE_CONTRACTID   NS_RDF_DATASOURCE_CONTRACTID_PREFIX "local-store"

Functions

NS_IMETHODIMP NS_NewLocalStore (nsISupports *aOuter, REFNSIID aIID, void **aResult)

Define Documentation

#define NS_ILOCALSTORE_IID   { 0xdf71c6f1, 0xec53, 0x11d2, { 0xbd, 0xca, 0x0, 0x0, 0x64, 0x65, 0x73, 0x74 } }

Definition at line 45 of file nsILocalStore.h.

#define NS_LOCALSTORE_CID   { 0xdf71c6f0, 0xec53, 0x11d2, { 0xbd, 0xca, 0x0, 0x0, 0x64, 0x65, 0x73, 0x74 } }

Definition at line 49 of file nsILocalStore.h.

Definition at line 52 of file nsILocalStore.h.


Function Documentation

NS_IMETHODIMP NS_NewLocalStore ( nsISupports *  aOuter,
REFNSIID  aIID,
void **  aResult 
)

Definition at line 256 of file nsLocalStore.cpp.

{
    NS_PRECONDITION(aOuter == nsnull, "no aggregation");
    if (aOuter)
        return NS_ERROR_NO_AGGREGATION;

    NS_PRECONDITION(aResult != nsnull, "null ptr");
    if (! aResult)
        return NS_ERROR_NULL_POINTER;

    LocalStoreImpl* impl = new LocalStoreImpl();
    if (! impl)
        return NS_ERROR_OUT_OF_MEMORY;

    NS_ADDREF(impl);

    nsresult rv;
    rv = impl->Init();
    if (NS_SUCCEEDED(rv)) {
        // Set up the result pointer
        rv = impl->QueryInterface(aIID, aResult);
    }

    NS_RELEASE(impl);
    return rv;
}

Here is the call graph for this function: