res = nsComponentManager::CreateInstance(kRDFInMemoryDataSourceCID, nsnull, kIRDFDataSourceIID, (void**) &mInner); if (NS_FAILED(res)) return res;
mRDFService->GetResource(kURINC_BrowserAutodetMenuRoot, &kNC_BrowserAutodetMenuRoot); mRDFService->GetResource(kURINC_BrowserMoreCharsetMenuRoot, &kNC_BrowserMoreCharsetMenuRoot); mRDFService->GetResource(kURINC_BrowserMore1CharsetMenuRoot, &kNC_BrowserMore1CharsetMenuRoot); mRDFService->GetResource(kURINC_BrowserMore2CharsetMenuRoot, &kNC_BrowserMore2CharsetMenuRoot); mRDFService->GetResource(kURINC_BrowserMore3CharsetMenuRoot, &kNC_BrowserMore3CharsetMenuRoot); mRDFService->GetResource(kURINC_BrowserMore4CharsetMenuRoot, &kNC_BrowserMore4CharsetMenuRoot); mRDFService->GetResource(kURINC_BrowserMore5CharsetMenuRoot, &kNC_BrowserMore5CharsetMenuRoot); mRDFService->GetResource(kURINC_MaileditCharsetMenuRoot, &kNC_MaileditCharsetMenuRoot); mRDFService->GetResource(kURINC_MailviewCharsetMenuRoot, &kNC_MailviewCharsetMenuRoot); mRDFService->GetResource(kURINC_ComposerCharsetMenuRoot, &kNC_ComposerCharsetMenuRoot); mRDFService->GetResource(kURINC_DecodersRoot, &kNC_DecodersRoot); mRDFService->GetResource(kURINC_Name, &kNC_Name); mRDFService->GetResource(kURINC_Checked, &kNC_Checked); mRDFService->GetResource(kURINC_CharsetDetector, &kNC_CharsetDetector); mRDFService->GetResource(kURINC_BookmarkSeparator, &kNC_BookmarkSeparator); mRDFService->GetResource(kURINC_type, &kRDF_type);
nsresult nsCharsetMenu::Init() {  nsresult res;  res = nsServiceManager::GetService(kRDFServiceCID, kIRDFServiceIID,     (nsISupports**) &gRDFService );  if (NS_FAILED(res)) return res;  gRDFService->GetResource(kURINC_CharsetMenuRoot, &kNC_CharsetMenuRoot);  gRDFService->GetResource(kURINC_Name, &kNC_Name);  res = nsComponentManager::CreateInstance(kRDFInMemoryDataSourceCID, nsnull,     kIRDFDataSourceIID, (void**) &mInner);  if (NS_FAILED(res)) return res;  NS_WITH_SERVICE(nsIRDFContainerUtils, rdfc, kRDFContainerUtilsCID, &res);  if (NS_FAILED(res)) return res;  res = rdfc->MakeSeq(mInner, kNC_CharsetMenuRoot, NULL);  if (NS_FAILED(res)) return res;  res = gRDFService->RegisterDataSource(this, PR_FALSE);  return res;}