nsCOMPtr<nsISupportsArray> folderArray;
nsCOMPtr<nsIRDFCompositeDataSource> database; nsCOMPtr<nsISupportsArray> resourceArray, folderArray; nsCOMPtr<nsIRDFResource> resource;  rv = srcFolderElement->GetResource(getter_AddRefs(resource));  if(NS_FAILED(rv)) return rv;  rv = tree->GetDatabase(getter_AddRefs(database)); if(NS_FAILED(rv)) return rv;  rv =ConvertDOMListToResourceArray(nodeList, getter_AddRefs(resourceArray)); if(NS_FAILED(rv)) return rv;
nsMessenger::DeleteMessages(nsIRDFCompositeDataSource *database,                            nsIRDFResource *srcFolderResource,                            nsISupportsArray *resourceArray,							PRBool reallyDelete){	nsresult rv;	if(!database || !srcFolderResource || !resourceArray)		return NS_ERROR_NULL_POINTER;	nsCOMPtr<nsISupportsArray> folderArray;	rv = NS_NewISupportsArray(getter_AddRefs(folderArray));	if(NS_FAILED(rv))	{		return NS_ERROR_OUT_OF_MEMORY;	}	folderArray->AppendElement(srcFolderResource);		if(reallyDelete)		rv = DoCommand(database, NC_RDF_REALLY_DELETE, folderArray, resourceArray);	else		rv = DoCommand(database, NC_RDF_DELETE, folderArray, resourceArray);	return rv;}