gRDFService->GetResource(kURINC_FilterSearchURLsRoot,            &kNC_FilterSearchURLsRoot); gRDFService->GetResource(kURINC_FilterSearchSitesRoot,           &kNC_FilterSearchSitesRoot); gRDFService->GetResource(kURINC_SearchCategoryRoot,              &kNC_SearchCategoryRoot); gRDFService->GetResource(NC_NAMESPACE_URI "SearchMode",          &kNC_LastSearchMode);  gRDFService->GetResource(NC_NAMESPACE_URI "searchtype",          &kNC_SearchType); gRDFService->GetResource(NC_NAMESPACE_URI "SearchResult",        &kNC_SearchResult);
gRDFService->GetResource(NC_NAMESPACE_URI "SearchCategoryRoot",  &kNC_SearchCategoryRoot);
InternetSearchDataSource::InternetSearchDataSource(void){	NS_INIT_REFCNT();	if (gRefCnt++ == 0)	{		nsresult rv = nsServiceManager::GetService(kRDFServiceCID,			NS_GET_IID(nsIRDFService), (nsISupports**) &gRDFService);		PR_ASSERT(NS_SUCCEEDED(rv));		rv = nsServiceManager::GetService(kRDFContainerUtilsCID,						  NS_GET_IID(nsIRDFContainerUtils),						  (nsISupports**) &gRDFC);		NS_ASSERTION(NS_SUCCEEDED(rv), "unable to get RDF container utils");		gRDFService->GetResource(kURINC_SearchEngineRoot,                &kNC_SearchEngineRoot);		gRDFService->GetResource(kURINC_LastSearchRoot,                  &kNC_LastSearchRoot);		gRDFService->GetResource(kURINC_SearchResultsSitesRoot,          &kNC_SearchResultsSitesRoot);		gRDFService->GetResource(kURINC_FilterSearchURLsRoot,            &kNC_FilterSearchURLsRoot);		gRDFService->GetResource(kURINC_FilterSearchSitesRoot,           &kNC_FilterSearchSitesRoot);		gRDFService->GetResource(kURINC_SearchCategoryRoot,              &kNC_SearchCategoryRoot);		gRDFService->GetResource(NC_NAMESPACE_URI "SearchMode",          &kNC_LastSearchMode);		gRDFService->GetResource(NC_NAMESPACE_URI "searchtype",          &kNC_SearchType);		gRDFService->GetResource(NC_NAMESPACE_URI "SearchResult",        &kNC_SearchResult);		gRDFService->GetResource(NC_NAMESPACE_URI "ref",                 &kNC_Ref);		gRDFService->GetResource(NC_NAMESPACE_URI "child",               &kNC_Child);		gRDFService->GetResource(NC_NAMESPACE_URI "title",               &kNC_Title);		gRDFService->GetResource(NC_NAMESPACE_URI "data",                &kNC_Data);		gRDFService->GetResource(NC_NAMESPACE_URI "Name",                &kNC_Name);		gRDFService->GetResource(NC_NAMESPACE_URI "Description",         &kNC_Description);		gRDFService->GetResource(NC_NAMESPACE_URI "Version",             &kNC_Version);		gRDFService->GetResource(NC_NAMESPACE_URI "actionButton",        &kNC_actionButton);		gRDFService->GetResource(NC_NAMESPACE_URI "actionBar",           &kNC_actionBar);		gRDFService->GetResource(NC_NAMESPACE_URI "LastText",            &kNC_LastText);		gRDFService->GetResource(NC_NAMESPACE_URI "URL",                 &kNC_URL);		gRDFService->GetResource(RDF_NAMESPACE_URI "instanceOf",         &kRDF_InstanceOf);		gRDFService->GetResource(RDF_NAMESPACE_URI "type",               &kRDF_type);		gRDFService->GetResource(NC_NAMESPACE_URI "loading",             &kNC_loading);		gRDFService->GetResource(NC_NAMESPACE_URI "HTML",                &kNC_HTML);		gRDFService->GetResource(NC_NAMESPACE_URI "Icon",                &kNC_Icon);		gRDFService->GetResource(NC_NAMESPACE_URI "StatusIcon",          &kNC_StatusIcon);		gRDFService->GetResource(NC_NAMESPACE_URI "Banner",              &kNC_Banner);		gRDFService->GetResource(NC_NAMESPACE_URI "Site",                &kNC_Site);		gRDFService->GetResource(NC_NAMESPACE_URI "Relevance",           &kNC_Relevance);		gRDFService->GetResource(NC_NAMESPACE_URI "Relevance?sort=true", &kNC_RelevanceSort);		gRDFService->GetResource(NC_NAMESPACE_URI "Date",                &kNC_Date);		gRDFService->GetResource(NC_NAMESPACE_URI "PageRank",            &kNC_PageRank);		gRDFService->GetResource(NC_NAMESPACE_URI "Engine",              &kNC_Engine);		gRDFService->GetResource(NC_NAMESPACE_URI "Price",               &kNC_Price);		gRDFService->GetResource(NC_NAMESPACE_URI "Price?sort=true",     &kNC_PriceSort);		gRDFService->GetResource(NC_NAMESPACE_URI "Availability",        &kNC_Availability);		gRDFService->GetResource(NC_NAMESPACE_URI "BookmarkSeparator",   &kNC_BookmarkSeparator);		gRDFService->GetResource(NC_NAMESPACE_URI "Update",              &kNC_Update);		gRDFService->GetResource(NC_NAMESPACE_URI "UpdateIcon",          &kNC_UpdateIcon);		gRDFService->GetResource(NC_NAMESPACE_URI "UpdateCheckDays",     &kNC_UpdateCheckDays);		gRDFService->GetResource(WEB_NAMESPACE_URI "LastPingDate",       &kWEB_LastPingDate);		gRDFService->GetResource(WEB_NAMESPACE_URI "LastPingModDate",    &kWEB_LastPingModDate);		gRDFService->GetResource(WEB_NAMESPACE_URI "LastPingContentLen", &kWEB_LastPingContentLen);		gRDFService->GetResource(NC_NAMESPACE_URI "command?cmd=addtobookmarks", &kNC_SearchCommand_AddToBookmarks);		gRDFService->GetResource(NC_NAMESPACE_URI "command?cmd=filterresult",   &kNC_SearchCommand_FilterResult);		gRDFService->GetResource(NC_NAMESPACE_URI "command?cmd=filtersite",     &kNC_SearchCommand_FilterSite);		gRDFService->GetResource(NC_NAMESPACE_URI "command?cmd=clearfilters",   &kNC_SearchCommand_ClearFilters);		gRDFService->GetLiteral(NS_LITERAL_STRING("true").get(), &kTrueLiteral);		rv = nsServiceManager::GetService(kPrefCID, NS_GET_IID(nsIPref), getter_AddRefs(prefs));		if (NS_SUCCEEDED(rv) && (prefs))		{			prefs->RegisterCallback("browser.search.mode", searchModePrefCallback, this);		}	}}