if (data.Length() < 1)	return(NS_ERROR_UNEXPECTED);  rv = updateDataHintsInGraph(engine, data.GetUnicode());  nsCOMPtr<nsIRDFLiteral>	aLiteral; if (NS_SUCCEEDED(rv = gRDFService->GetLiteral(data.GetUnicode(), getter_AddRefs(aLiteral)))) { *dataLit = aLiteral; NS_IF_ADDREF(*dataLit); }
InternetSearchDataSource::FindData(nsIRDFResource *engine, nsIRDFLiteral **dataLit){	if (!engine)	return(NS_ERROR_NULL_POINTER);	if (!dataLit)	return(NS_ERROR_NULL_POINTER);	*dataLit = nsnull;	if (!mInner)	return(NS_RDF_NO_VALUE);	nsresult		rv;	nsCOMPtr<nsIRDFNode>	dataTarget = nsnull;	if (NS_SUCCEEDED((rv = mInner->GetTarget(engine, kNC_Data, PR_TRUE,		getter_AddRefs(dataTarget)))) && (dataTarget))	{		nsCOMPtr<nsIRDFLiteral>	aLiteral = do_QueryInterface(dataTarget);		if (!aLiteral)			return(NS_ERROR_UNEXPECTED);		*dataLit = aLiteral;		NS_IF_ADDREF(*dataLit);		return(NS_OK);	}	// don't have the data, so try and read it in	const char	*engineURI = nsnull;	if (NS_FAILED(rv = engine->GetValueConst(&engineURI)))		return(rv);	nsAutoString	engineStr;	engineStr.AssignWithConversion(engineURI);	if (engineStr.Find(kEngineProtocol) != 0)		return(rv);	engineStr.Cut(0, sizeof(kEngineProtocol) - 1);	char	*baseFilename = engineStr.ToNewCString();	if (!baseFilename)		return(rv);	baseFilename = nsUnescape(baseFilename);	if (!baseFilename)		return(rv);#ifdef	DEBUG_SEARCH_OUTPUT	printf("InternetSearchDataSource::FindData - reading in '%s'\n", baseFilename);#endif	nsFileSpec	engineSpec(baseFilename);	nsString	data;	rv = ReadFileContents(engineSpec, data);	nsCRT::free(baseFilename);	baseFilename = nsnull;	if (NS_FAILED(rv))	{		return(rv);	}	// save file contents	if (data.Length() < 1)	return(NS_ERROR_UNEXPECTED);	rv = updateDataHintsInGraph(engine, data.GetUnicode());	nsCOMPtr<nsIRDFLiteral>	aLiteral;	if (NS_SUCCEEDED(rv = gRDFService->GetLiteral(data.GetUnicode(), getter_AddRefs(aLiteral))))	{		*dataLit = aLiteral;		NS_IF_ADDREF(*dataLit);	}		return(rv);}