NS_RELEASE(literal);
FileSystemDataSource::GetTargets(nsIRDFResource *source,				nsIRDFResource *property,				PRBool tv,				nsISimpleEnumerator **targets /* out */){	NS_PRECONDITION(source != nsnull, "null ptr");	if (! source)		return NS_ERROR_NULL_POINTER;	NS_PRECONDITION(property != nsnull, "null ptr");	if (! property)		return NS_ERROR_NULL_POINTER;	NS_PRECONDITION(targets != nsnull, "null ptr");	if (! targets)		return NS_ERROR_NULL_POINTER;	// we only have positive assertions in the file system data source.	if (! tv)		return NS_RDF_NO_VALUE;	nsresult rv;	if (source == kNC_FileSystemRoot)	{		if (property == kNC_Child)		{			return GetVolumeList(targets);		}		else if (property == kNC_pulse)		{			nsIRDFLiteral	*pulseLiteral;			gRDFService->GetLiteral(NS_ConvertASCIItoUCS2("12").GetUnicode(), &pulseLiteral);			nsISimpleEnumerator* result = new nsSingletonEnumerator(pulseLiteral);			NS_RELEASE(pulseLiteral);			if (! result)				return NS_ERROR_OUT_OF_MEMORY;			NS_ADDREF(result);			*targets = result;			return NS_OK;		}	}	else if (isFileURI(source))	{		if (property == kNC_Child)		{			return GetFolderList(source, PR_FALSE, targets);		}		else if (property == kNC_Name)		{			nsCOMPtr<nsIRDFLiteral> name;			rv = GetName(source, getter_AddRefs(name));			if (NS_FAILED(rv)) return rv;			nsISimpleEnumerator* result = new nsSingletonEnumerator(name);			if (! result)				return NS_ERROR_OUT_OF_MEMORY;			NS_ADDREF(result);			*targets = result;			return NS_OK;		}		else if (property == kNC_URL)		{			nsCOMPtr<nsIRDFLiteral> url;			rv = GetURL(source, getter_AddRefs(url));			if (NS_FAILED(rv)) return rv;			nsISimpleEnumerator* result = new nsSingletonEnumerator(url);			if (! result)				return NS_ERROR_OUT_OF_MEMORY;			NS_ADDREF(result);			*targets = result;			return NS_OK;		}		else if (property == kRDF_type)		{			nsXPIDLCString uri;			rv = kNC_FileSystemObject->GetValue( getter_Copies(uri) );			if (NS_FAILED(rv)) return rv;			nsAutoString	url; url.AssignWithConversion(uri);			nsIRDFLiteral	*literal;			rv = gRDFService->GetLiteral(url.GetUnicode(), &literal);			if (NS_FAILED(rv)) return rv;			nsISimpleEnumerator* result = new nsSingletonEnumerator(literal);			NS_RELEASE(literal);			if (! result)				return NS_ERROR_OUT_OF_MEMORY;			NS_ADDREF(result);			*targets = result;			return NS_OK;		}		else if (property == kNC_pulse)		{			nsIRDFLiteral	*pulseLiteral;			rv = gRDFService->GetLiteral(NS_ConvertASCIItoUCS2("12").GetUnicode(), &pulseLiteral);			if (NS_FAILED(rv)) return rv;			nsISimpleEnumerator* result = new nsSingletonEnumerator(pulseLiteral);			NS_RELEASE(pulseLiteral);			if (! result)				return NS_ERROR_OUT_OF_MEMORY;			NS_ADDREF(result);			*targets = result;			return NS_OK;		}	}	return NS_NewEmptyEnumerator(targets);}