if ((isSearchCategoryURI(source)) && (categoryDataSource)) { const char	*uri = nsnull; source->GetValueConst(&uri); if (!uri)	return(NS_ERROR_UNEXPECTED); nsAutoString	catURI; catURI.AssignWithConversion(uri);  nsCOMPtr<nsIRDFResource>	category; nsCAutoString			caturiC; caturiC.AssignWithConversion(catURI); if (NS_FAILED(rv = gRDFService->GetResource(caturiC, getter_AddRefs(category)))) return(rv);  rv = categoryDataSource->GetTarget(category, property, tv, target); return(rv); }  if (isSearchCategoryEngineURI(source)) { nsCOMPtr<nsIRDFResource>	trueEngine; rv = resolveSearchCategoryEngineURI(source, getter_AddRefs(trueEngine)); if (NS_FAILED(rv) || (rv == NS_RDF_NO_VALUE))	return(rv); if (!trueEngine)	return(NS_RDF_NO_VALUE);  source = trueEngine; }  if (isSearchURI(source) && (property == kNC_Child)) {   *target = source; NS_ADDREF(source); return(NS_OK); }  if (isSearchCommand(source) && (property == kNC_Name)) {  nsAutoString	name; if (source == kNC_SearchCommand_AddToBookmarks) name.AssignWithConversion("Add to bookmarks"); else if (source == kNC_SearchCommand_FilterResult) name.AssignWithConversion("Exclude this URL from future searches"); else if (source == kNC_SearchCommand_FilterSite) name.AssignWithConversion("Exclude this domain from future searches"); else if (source == kNC_SearchCommand_ClearFilters) name.AssignWithConversion("Clear all search filters");  if (name.Length() > 0) { *target = nsnull; nsCOMPtr<nsIRDFLiteral>	literal; if (NS_FAILED(rv = gRDFService->GetLiteral(name.GetUnicode(), getter_AddRefs(literal)))) return(rv); *target = literal; NS_IF_ADDREF(*target); return(rv); } }  if (isEngineURI(source)) {  nsCOMPtr<nsIRDFLiteral>	dataLit; FindData(source, getter_AddRefs(dataLit)); }
InternetSearchDataSource::GetTarget(nsIRDFResource *source,                                nsIRDFResource *property,                                PRBool tv,                                nsIRDFNode **target /* 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(target != nsnull, "null ptr");	if (! target)		return NS_ERROR_NULL_POINTER;	nsresult		rv = NS_RDF_NO_VALUE;	// we only have positive assertions in the internet search data source.	if (! tv)		return(rv);		if (mInner)	{		rv = mInner->GetTarget(source, property, tv, target);	}	return(rv);}