if (isWellknownContainerURI(aSource) && (aProperty == kNC_Child)) { PRBool		doNetworkRequest = PR_TRUE; if (NS_SUCCEEDED(rv) && (_retval)) {    PRBool		hasResults = PR_FALSE; if (NS_SUCCEEDED((*_retval)->HasMoreElements(&hasResults)) && (hasResults == PR_TRUE)) { doNetworkRequest = PR_FALSE; } } if (doNetworkRequest == PR_TRUE) { const char	*uri = nsnull; aSource->GetValueConst(&uri);  nsCOMPtr<nsIURI>	url; if (NS_SUCCEEDED(rv = NS_NewURI(getter_AddRefs(url), uri))) { nsCOMPtr<nsIChannel>	channel; if (NS_SUCCEEDED(rv = NS_OpenURI(getter_AddRefs(channel), url, nsnull, nsnull))) { nsCOMPtr<nsIStreamListener>	listener; if (NS_SUCCEEDED(rv = CreateListener(getter_AddRefs(listener)))) { if (NS_SUCCEEDED(rv = channel->AsyncRead(listener, aSource))) { nsCOMPtr<nsIRDFLiteral>	trueLiteral; gRDF->GetLiteral(NS_ConvertASCIItoUCS2("true").GetUnicode(), getter_AddRefs(trueLiteral)); rv = mInner->Assert(aSource, kNC_loading, trueLiteral, PR_TRUE); } } } } } }
nsHTTPIndex::GetTargets(nsIRDFResource *aSource, nsIRDFResource *aProperty, PRBool aTruthValue,			nsISimpleEnumerator **_retval){	nsresult	rv = NS_ERROR_UNEXPECTED;	if (isWellknownContainerURI(aSource) && (aProperty == kNC_Child))	{		PRBool		doNetworkRequest = PR_TRUE;		if (NS_SUCCEEDED(rv) && (_retval))		{			// check and see if we already have data for the search in question;			// if we do, BeginSearchRequest() won't bother doing the search again,			// otherwise it will kickstart it			PRBool		hasResults = PR_FALSE;			if (NS_SUCCEEDED((*_retval)->HasMoreElements(&hasResults)) && (hasResults == PR_TRUE))			{				doNetworkRequest = PR_FALSE;			}		}		if (doNetworkRequest == PR_TRUE)		{			const char	*uri = nsnull;			aSource->GetValueConst(&uri);			nsCOMPtr<nsIURI>	url;			if (NS_SUCCEEDED(rv = NS_NewURI(getter_AddRefs(url), uri)))			{				nsCOMPtr<nsIChannel>	channel;				if (NS_SUCCEEDED(rv = NS_OpenURI(getter_AddRefs(channel), url, nsnull, nsnull)))				{					nsCOMPtr<nsIStreamListener>	listener;					if (NS_SUCCEEDED(rv = CreateListener(getter_AddRefs(listener))))					{						if (NS_SUCCEEDED(rv = channel->AsyncRead(listener, aSource)))						{							nsCOMPtr<nsIRDFLiteral>	trueLiteral;							gRDF->GetLiteral(NS_ConvertASCIItoUCS2("true").GetUnicode(),								getter_AddRefs(trueLiteral));							rv = mInner->Assert(aSource, kNC_loading, trueLiteral, PR_TRUE);						}					}				}			}		}	}	if (mInner)	{		rv = mInner->GetTargets(aSource, aProperty, aTruthValue, _retval);	}	else	{		rv = NS_NewEmptyEnumerator(_retval);	}	return(rv);}