rv = compMgr->RegisterComponent(kNNTPProtocolCID, "NNTP Protocol", "component: path, PR_TRUE, PR_TRUE); if (NS_FAILED(rv)) goto done;  rv = compMgr->RegisterComponent(kNNTPNewsgroupCID, "NNTP Newsgroup", "component: path, PR_TRUE, PR_TRUE); if (NS_FAILED(rv)) goto done;  rv = compMgr->RegisterComponent(kNNTPNewsgroupPostCID, "NNTP Newsgroup Post", "component: path, PR_TRUE, PR_TRUE); if (NS_FAILED(rv)) goto done;  rv = compMgr->RegisterComponent(kNNTPNewsgroupListCID, "NNTP Newsgroup List", "component: path, PR_TRUE, PR_TRUE); if (NS_FAILED(rv)) goto done;  rv = compMgr->RegisterComponent(kNNTPArticleListCID, "NNTP Article List", "component: path, PR_TRUE, PR_TRUE); if (NS_FAILED(rv)) goto done;
NSRegisterSelf(nsISupports* aServMgr, const char* path){	nsresult rv;	nsCOMPtr<nsIServiceManager> servMgr(do_QueryInterface(aServMgr, &rv));	if (NS_FAILED(rv)) return rv;	nsIComponentManager* compMgr;	rv = servMgr->GetService(kComponentManagerCID,                            nsIComponentManager::GetIID(),                            (nsISupports**)&compMgr);	if (NS_FAILED(rv)) return rv;	rv = compMgr->RegisterComponent(kNntpUrlCID, nsnull, nsnull, path, PR_TRUE, PR_TRUE);	if (NS_FAILED(rv)) goto done;	rv = compMgr->RegisterComponent(kNntpServiceCID, "NNTP Service", 									"component://netscape/messenger/nntpservice", 									path, PR_TRUE, PR_TRUE);	if (NS_FAILED(rv)) goto done;	rv = compMgr->RegisterComponent(kNntpServiceCID, "NNTP News Service",                                   "component://netscape/messenger/messageservice;type=news",                                   path, PR_TRUE, PR_TRUE);	if (NS_FAILED(rv)) goto done;	rv = compMgr->RegisterComponent(kNntpServiceCID, "NNTP News Message Service",                                  "component://netscape/messenger/messageservice;type=news_message",                                   path, PR_TRUE, PR_TRUE);	if (NS_FAILED(rv)) goto done;  	rv = compMgr->RegisterComponent(kNewsFolderResourceCID,                                  "News Folder Resource Factory",                                  NS_RDF_RESOURCE_FACTORY_PROGID_PREFIX "news",                                  path, PR_TRUE, PR_TRUE);	if (NS_FAILED(rv)) goto done;	rv = compMgr->RegisterComponent(kNewsMessageResourceCID,									"News Resource Factory",									NS_RDF_RESOURCE_FACTORY_PROGID_PREFIX "news_message",									path, PR_TRUE, PR_TRUE);	if (NS_FAILED(rv)) goto done;#ifdef NS_DEBUG	printf("news registering from %s\n",path);#endif	rv = compMgr->RegisterComponent(kNntpIncomingServerCID,									"Nntp Incoming Server",									"component://netscape/messenger/server&type=nntp",									path, PR_TRUE, PR_TRUE);                                  	if (NS_FAILED(rv)) goto done;done:	(void)servMgr->ReleaseService(kComponentManagerCID, compMgr);	return rv;}