nsresult		rv = NS_OK; PRInt32			loop; PRUint32		numSources; if (NS_FAILED(rv = aSources->Count(&numSources)))	return(rv); if (numSources < 1) { return(NS_ERROR_ILLEGAL_VALUE); }  for (loop=((PRInt32)numSources)-1; loop>=0; loop--) { nsCOMPtr<nsISupports>	aSource = aSources->ElementAt(loop); if (!aSource)	return(NS_ERROR_NULL_POINTER); nsCOMPtr<nsIRDFResource> src (do_QueryInterface(aSource)); if (!src)	return(NS_ERROR_NO_INTERFACE);  if (aCommand == kNC_SearchCommand_AddToBookmarks) { if (NS_FAILED(rv = addToBookmarks(src))) return(rv); } else if (aCommand == kNC_SearchCommand_FilterResult) { if (NS_FAILED(rv = filterResult(src))) return(rv); } else if (aCommand == kNC_SearchCommand_FilterSite) { if (NS_FAILED(rv = filterSite(src))) return(rv); } else if (aCommand == kNC_SearchCommand_ClearFilters) { if (NS_FAILED(rv = clearFilters())) return(rv); } } return(NS_OK);
return(NS_ERROR_NOT_IMPLEMENTED);
InternetSearchDataSource::DoCommand(nsISupportsArray/*<nsIRDFResource>*/* aSources,                                nsIRDFResource*   aCommand,                                nsISupportsArray/*<nsIRDFResource>*/* aArguments){	nsresult		rv = NS_OK;	PRInt32			loop;	PRUint32		numSources;	if (NS_FAILED(rv = aSources->Count(&numSources)))	return(rv);	if (numSources < 1)	{		return(NS_ERROR_ILLEGAL_VALUE);	}	for (loop=((PRInt32)numSources)-1; loop>=0; loop--)	{		nsCOMPtr<nsISupports>	aSource = aSources->ElementAt(loop);		if (!aSource)	return(NS_ERROR_NULL_POINTER);		nsCOMPtr<nsIRDFResource> src (do_QueryInterface(aSource));		if (!src)	return(NS_ERROR_NO_INTERFACE);		if (aCommand == kNC_SearchCommand_AddToBookmarks)		{			if (NS_FAILED(rv = addToBookmarks(src)))				return(rv);		}		else if (aCommand == kNC_SearchCommand_FilterResult)		{			if (NS_FAILED(rv = filterResult(src)))				return(rv);		}		else if (aCommand == kNC_SearchCommand_FilterSite)		{			if (NS_FAILED(rv = filterSite(src)))				return(rv);		}		else if (aCommand == kNC_SearchCommand_ClearFilters)		{			if (NS_FAILED(rv = clearFilters()))				return(rv);		}	}	return(NS_OK);}