Changing RegisterFactory to use the new API.

This commit is contained in:
ebina%netscape.com 1999-02-26 17:19:00 +00:00
Родитель 62efebcdcf
Коммит 66e1467fa8
9 изменённых файлов: 29 добавлений и 29 удалений

Просмотреть файл

@ -1118,7 +1118,7 @@ static HWND CreateTopLevel(const char* clazz, const char* title,int aWidth, int
}
// something for input
nsRepository::RegisterFactory(kCTextFieldCID, "raptorwidget.dll", PR_FALSE, PR_FALSE);
nsRepository::RegisterComponent(kCTextFieldCID, NULL, NULL, "raptorwidget.dll", PR_FALSE, PR_FALSE);
rect.SetRect(25, 370, 40, 25);
nsRepository::CreateInstance(kCTextFieldCID, nsnull, kITextWidgetIID, (void**)&gBlendMessage);
@ -1155,9 +1155,9 @@ WinMain(HINSTANCE instance, HINSTANCE prevInstance, LPSTR cmdParam, int nCmdShow
{
gInstance = instance;
nsRepository::RegisterFactory(kCWindowIID, WIDGET_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterFactory(kCChildWindowIID, WIDGET_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterFactory(kCScrollbarIID, WIDGET_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterComponent(kCWindowIID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterComponent(kCChildWindowIID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterComponent(kCScrollbarIID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
static NS_DEFINE_IID(kCRenderingContextIID, NS_RENDERING_CONTEXT_CID);
static NS_DEFINE_IID(kCDeviceContextIID, NS_DEVICE_CONTEXT_CID);
@ -1165,11 +1165,11 @@ WinMain(HINSTANCE instance, HINSTANCE prevInstance, LPSTR cmdParam, int nCmdShow
static NS_DEFINE_IID(kCImageIID, NS_IMAGE_CID);
static NS_DEFINE_IID(kCBlenderIID, NS_BLENDER_CID);
nsRepository::RegisterFactory(kCRenderingContextIID, GFXWIN_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterFactory(kCDeviceContextIID, GFXWIN_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterFactory(kCFontMetricsIID, GFXWIN_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterFactory(kCImageIID, GFXWIN_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterFactory(kCBlenderIID, GFXWIN_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterComponent(kCRenderingContextIID, NULL, NULL, GFXWIN_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterComponent(kCDeviceContextIID, NULL, NULL, GFXWIN_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterComponent(kCFontMetricsIID, NULL, NULL, GFXWIN_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterComponent(kCImageIID, NULL, NULL, GFXWIN_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterComponent(kCBlenderIID, NULL, NULL, GFXWIN_DLL, PR_FALSE, PR_FALSE);
if (!prevInstance) {
WNDCLASS wndClass;

Просмотреть файл

@ -132,7 +132,7 @@ nsAllocatorFactory::LockFactory(PRBool aLock)
static void RegAllocator()
{
static NS_DEFINE_IID(kAllocatorCID, NS_ALLOCATOR_CID);
nsRepository::RegisterFactory(kAllocatorCID,
nsRepository::RegisterFactory(kAllocatorCID, NULL, NULL,
(nsIFactory*)new nsAllocatorFactory(),
PR_FALSE);
}

Просмотреть файл

@ -231,8 +231,8 @@ int main(int argc, char **argv)
return 0;
}
nsRepository::RegisterFactory(kEventQueueServiceCID, XPCOM_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterFactory(kNetServiceCID, NETLIB_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterComponent(kEventQueueServiceCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterComponent(kNetServiceCID, NULL, NULL, NETLIB_DLL, PR_FALSE, PR_FALSE);
// Create the Event Queue for this thread...
pEventQService = nsnull;

Просмотреть файл

@ -312,8 +312,8 @@ int main()
int i;
PL_InitializeEventsLib("");
nsRepository::RegisterFactory(kNetServiceCID, NETLIB_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterFactory(kEventQueueServiceCID, XPCOM_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterComponent(kNetServiceCID, NULL, NULL, NETLIB_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterComponent(kEventQueueServiceCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE);
// Create the Event Queue for this thread...
nsIEventQueueService *pEventQService = nsnull;

Просмотреть файл

@ -126,20 +126,20 @@ static nsresult
SetupRegistry(void)
{
// netlib
nsRepository::RegisterFactory(kNetServiceCID, NETLIB_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterComponent(kNetServiceCID, NULL, NULL, NETLIB_DLL, PR_FALSE, PR_FALSE);
// parser
nsRepository::RegisterFactory(kParserCID, PARSER_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterFactory(kWellFormedDTDCID, PARSER_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterComponent(kParserCID, NULL, NULL, PARSER_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterComponent(kWellFormedDTDCID, NULL, NULL, PARSER_DLL, PR_FALSE, PR_FALSE);
// layout
nsRepository::RegisterFactory(kNameSpaceManagerCID, LAYOUT_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterComponent(kNameSpaceManagerCID, NULL, NULL, LAYOUT_DLL, PR_FALSE, PR_FALSE);
// dom
nsRepository::RegisterFactory(kScriptNameSetRegistryCID, DOM_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterComponent(kScriptNameSetRegistryCID, NULL, NULL, DOM_DLL, PR_FALSE, PR_FALSE);
// xpcom
nsRepository::RegisterFactory(kEventQueueServiceCID, XPCOM_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterComponent(kEventQueueServiceCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE);
return NS_OK;
}

Просмотреть файл

@ -110,20 +110,20 @@ static nsresult
SetupRegistry(void)
{
// netlib
nsRepository::RegisterFactory(kNetServiceCID, NETLIB_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterComponent(kNetServiceCID, NULL, NULL, NETLIB_DLL, PR_FALSE, PR_FALSE);
// parser
nsRepository::RegisterFactory(kParserCID, PARSER_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterFactory(kWellFormedDTDCID, PARSER_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterComponent(kParserCID, NULL, NULL, PARSER_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterComponent(kWellFormedDTDCID, NULL, NULL, PARSER_DLL, PR_FALSE, PR_FALSE);
// layout
nsRepository::RegisterFactory(kNameSpaceManagerCID, LAYOUT_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterComponent(kNameSpaceManagerCID, NULL, NULL, LAYOUT_DLL, PR_FALSE, PR_FALSE);
// dom
nsRepository::RegisterFactory(kScriptNameSetRegistryCID, DOM_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterComponent(kScriptNameSetRegistryCID, NULL, NULL, DOM_DLL, PR_FALSE, PR_FALSE);
// xpcom
nsRepository::RegisterFactory(kEventQueueServiceCID, XPCOM_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterComponent(kEventQueueServiceCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE);
return NS_OK;
}

Просмотреть файл

@ -135,7 +135,7 @@ extern "C" void RegisterTestFactories() {
// Windows can use persistant registry
#ifndef USE_NSREG
nsRepository::RegisterFactory(kTestLoadedFactoryCID,
nsRepository::RegisterComponent(kTestLoadedFactoryCID, NULL, NULL,
"libtestdynamic.so",
PR_FALSE,
PR_TRUE);

Просмотреть файл

@ -182,7 +182,7 @@ SetupFactories(void)
{
nsresult err;
// seed the repository (hack)
err = nsRepository::RegisterFactory(kIMyServiceCID, "MyService.dll",
err = nsRepository::RegisterComponent(kIMyServiceCID, NULL, NULL, "MyService.dll",
PR_TRUE, PR_FALSE);
NS_ASSERTION(err == NS_OK, "failed to register my factory");
}

Просмотреть файл

@ -132,7 +132,7 @@ extern "C" NS_EXPORT PRBool NSCanUnload(nsISupports* serviceMgr) {
extern "C" NS_EXPORT nsresult NSRegisterSelf(nsISupports* serviceMgr, const char *path)
{
return nsRepository::RegisterFactory(kTestLoadedFactoryCID, path,
return nsRepository::RegisterComponent(kTestLoadedFactoryCID, NULL, NULL, path,
PR_TRUE, PR_TRUE);
}