Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions
nsContainerEnumerator.cpp File Reference
#include "nscore.h"
#include "nsCOMPtr.h"
#include "nsIRDFContainerUtils.h"
#include "nsIRDFDataSource.h"
#include "nsIRDFNode.h"
#include "nsIRDFService.h"
#include "nsIServiceManager.h"
#include "nsRDFCID.h"
#include "nsString.h"
#include "nsXPIDLString.h"
#include "prlog.h"
#include "rdf.h"
#include "rdfutil.h"

Go to the source code of this file.

Classes

class  ContainerEnumeratorImpl

Functions

static NS_DEFINE_CID (kRDFServiceCID, NS_RDFSERVICE_CID)
static NS_DEFINE_CID (kRDFContainerUtilsCID, NS_RDFCONTAINERUTILS_CID)
nsresult NS_NewContainerEnumerator (nsIRDFDataSource *aDataSource, nsIRDFResource *aContainer, nsISimpleEnumerator **aResult)
 Create a cursor on a container that enumerates its contents in order.

Function Documentation

static NS_DEFINE_CID ( kRDFServiceCID  ,
NS_RDFSERVICE_CID   
) [static]
static NS_DEFINE_CID ( kRDFContainerUtilsCID  ,
NS_RDFCONTAINERUTILS_CID   
) [static]
nsresult NS_NewContainerEnumerator ( nsIRDFDataSource aDataSource,
nsIRDFResource aContainer,
nsISimpleEnumerator **  aResult 
)

Create a cursor on a container that enumerates its contents in order.

Definition at line 269 of file nsContainerEnumerator.cpp.

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

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

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

    ContainerEnumeratorImpl* result = new ContainerEnumeratorImpl(aDataSource, aContainer);
    if (! result)
        return NS_ERROR_OUT_OF_MEMORY;

    NS_ADDREF(result);

    nsresult rv = result->Init();
    if (NS_FAILED(rv))
        NS_RELEASE(result);

    *aResult = result;
    return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function: