if (NS_SUCCEEDED(rv = GetData(data, "search", 0, "description", descValue)))
if (NS_SUCCEEDED(rv = GetData(dataUni, "search", 0, "description", descValue)))
InternetSearchDataSource::SaveEngineInfoIntoGraph(const nsString &searchURL, const PRUnichar *categoryHint,		const nsString &iconURL, const nsString &data, PRBool checkMacFileType){	nsresult			rv = NS_OK;	nsCOMPtr<nsIRDFResource>	searchRes;	if (NS_FAILED(rv = gRDFService->GetUnicodeResource(searchURL.GetUnicode(),		getter_AddRefs(searchRes))))	return(rv);	if (data.Length() > 0)	{		// save name of search engine (as specified in file)		nsAutoString	nameValue;		if (NS_SUCCEEDED(rv = GetData(data, "search", 0, "name", nameValue)))		{			nsCOMPtr<nsIRDFLiteral>	nameLiteral;			if (NS_SUCCEEDED(rv = gRDFService->GetLiteral(nameValue.GetUnicode(),					getter_AddRefs(nameLiteral))))			{				mInner->Assert(searchRes, kNC_Name, nameLiteral, PR_TRUE);			}		}		// save description of search engine (if specified)		nsAutoString	descValue;		if (NS_SUCCEEDED(rv = GetData(data, "search", 0, "description", descValue)))		{			nsCOMPtr<nsIRDFLiteral>	descLiteral;			if (NS_SUCCEEDED(rv = gRDFService->GetLiteral(descValue.GetUnicode(),					getter_AddRefs(descLiteral))))			{				mInner->Assert(searchRes, kNC_Description, descLiteral, PR_TRUE);			}		}		if (checkMacFileType == PR_FALSE)		{			// mark our private search files, so that we can distinguish			// between ours and any that are included with the OS			mInner->Assert(searchRes, kNC_SearchType, kNC_Engine, PR_TRUE);			// get update URL and # of days to check for updates			// Note: only check for updates on our private search files			nsAutoString	updateStr, updateCheckDaysStr;			GetData(data, "search", 0, "update", updateStr);			GetData(data, "search", 0, "updateCheckDays", updateCheckDaysStr);			if ((updateStr.Length() > 0) && (updateCheckDaysStr.Length() > 0))			{				nsCOMPtr<nsIRDFLiteral>	updateLiteral;				if (NS_SUCCEEDED(rv = gRDFService->GetLiteral(updateStr.GetUnicode(),						getter_AddRefs(updateLiteral))))				{					mInner->Assert(searchRes, kNC_Update, updateLiteral, PR_TRUE);				}				PRInt32	err;				PRInt32	updateDays = updateCheckDaysStr.ToInteger(&err);				if (err)				{					updateDays = 3;				}				nsCOMPtr<nsIRDFInt>	updateCheckDaysLiteral;				if (NS_SUCCEEDED(rv = gRDFService->GetIntLiteral(updateDays,						getter_AddRefs(updateCheckDaysLiteral))))				{					mInner->Assert(searchRes, kNC_UpdateCheckDays,						updateCheckDaysLiteral, PR_TRUE);				}			}		}		// if we have a category hint, add this new engine into the category (if it exists)		if (categoryHint && categoryDataSource)		{			nsCOMPtr<nsIRDFLiteral>	catLiteral;			rv = gRDFService->GetLiteral(categoryHint, getter_AddRefs(catLiteral));			nsCOMPtr<nsIRDFResource>	catSrc;			if (catLiteral)			{				rv = categoryDataSource->GetSource(kNC_Title, catLiteral,					PR_TRUE, getter_AddRefs(catSrc));			}			const char		*catURI = nsnull;			if (catSrc)								{				rv = catSrc->GetValueConst(&catURI);			}			nsCOMPtr<nsIRDFResource>	catRes;			if (catURI)			{				nsAutoString	catList; catList.AssignWithConversion(kURINC_SearchCategoryPrefix);				catList.AppendWithConversion(catURI);				gRDFService->GetUnicodeResource(catList.GetUnicode(), getter_AddRefs(catRes));			}			nsCOMPtr<nsIRDFContainer> container;			if (catRes)			{				rv = nsComponentManager::CreateInstance(kRDFContainerCID,									nsnull,									NS_GET_IID(nsIRDFContainer),									getter_AddRefs(container));			}			if (container)			{				rv = container->Init(categoryDataSource, catRes);				if (NS_SUCCEEDED(rv))				{					rv = gRDFC->MakeSeq(categoryDataSource, catRes, nsnull);				}				if (NS_SUCCEEDED(rv))				{					PRInt32		searchIndex = -1;					if (NS_SUCCEEDED(rv = container->IndexOf(searchRes, &searchIndex))						&& (searchIndex < 0))					{						rv = container->AppendElement(searchRes);					}				}				if (NS_SUCCEEDED(rv))				{					// flush categoryDataSource					nsCOMPtr<nsIRDFRemoteDataSource>	remoteCategoryStore;					remoteCategoryStore = do_QueryInterface(categoryDataSource);					if (remoteCategoryStore)					{						remoteCategoryStore->Flush();					}				}			}		}		// save the basename reference		const char	*searchURI = nsnull;		searchRes->GetValueConst(&searchURI);		if (searchURI)		{			nsAutoString		searchStr; searchStr.AssignWithConversion(searchURI);			nsCOMPtr<nsIRDFLiteral>	searchLiteral;			if (NS_SUCCEEDED(rv = gRDFService->GetLiteral(searchStr.GetUnicode(),					getter_AddRefs(searchLiteral))))			{				mInner->Assert(searchRes, kNC_URL, searchLiteral, PR_TRUE);			}		}		// Note: add the child relationship last		mInner->Assert(kNC_SearchEngineRoot, kNC_Child, searchRes, PR_TRUE);	}	// save icon url (if we have one)	if (iconURL.Length() > 0)	{		nsCOMPtr<nsIRDFLiteral>	iconLiteral;		if (NS_SUCCEEDED(rv = gRDFService->GetLiteral(iconURL.GetUnicode(),				getter_AddRefs(iconLiteral))))		{			mInner->Assert(searchRes, kNC_Icon, iconLiteral, PR_TRUE);		}	}	return(NS_OK);}