Removed XP_PC for ObserverService api

This commit is contained in:
neeti%netscape.com 1999-04-12 19:08:25 +00:00
Родитель ab3860d150
Коммит 443c648289
1 изменённых файлов: 7 добавлений и 11 удалений

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

@ -23,20 +23,17 @@
#include "nsIComponentManager.h" #include "nsIComponentManager.h"
#include "nsIServiceManager.h" #include "nsIServiceManager.h"
#include "nsCOMPtr.h" #include "nsCOMPtr.h"
#ifdef XP_PC
#include "nsIObserverService.h" #include "nsIObserverService.h"
#include "nsObserverService.h" #include "nsObserverService.h"
#include "nsIObserver.h" #include "nsIObserver.h"
#include "nsObserver.h" #include "nsObserver.h"
#endif
static NS_DEFINE_CID(kComponentManagerCID, NS_COMPONENTMANAGER_CID); static NS_DEFINE_CID(kComponentManagerCID, NS_COMPONENTMANAGER_CID);
#ifdef XP_PC
static NS_DEFINE_IID(kObserverServiceCID, NS_OBSERVERSERVICE_CID); static NS_DEFINE_IID(kObserverServiceCID, NS_OBSERVERSERVICE_CID);
static NS_DEFINE_IID(kObserverCID, NS_OBSERVER_CID); static NS_DEFINE_IID(kObserverCID, NS_OBSERVER_CID);
#endif
PRInt32 gLockCount = 0; PRInt32 gLockCount = 0;
@ -58,7 +55,7 @@ NSRegisterSelf(nsISupports* aServMgr, const char* path)
rv = compMgr->RegisterComponent(kPropertiesCID, NULL, NULL, rv = compMgr->RegisterComponent(kPropertiesCID, NULL, NULL,
path, PR_TRUE, PR_TRUE); path, PR_TRUE, PR_TRUE);
#ifdef XP_PC
rv = compMgr->RegisterComponent(kObserverServiceCID, rv = compMgr->RegisterComponent(kObserverServiceCID,
"ObserverService", "ObserverService",
NS_OBSERVERSERVICE_PROGID, NS_OBSERVERSERVICE_PROGID,
@ -67,7 +64,7 @@ NSRegisterSelf(nsISupports* aServMgr, const char* path)
"Observer", "Observer",
NS_OBSERVER_PROGID, NS_OBSERVER_PROGID,
path,PR_TRUE, PR_TRUE); path,PR_TRUE, PR_TRUE);
#endif
(void)servMgr->ReleaseService(kComponentManagerCID, compMgr); (void)servMgr->ReleaseService(kComponentManagerCID, compMgr);
return rv; return rv;
@ -89,10 +86,10 @@ NSUnregisterSelf(nsISupports* aServMgr, const char* path)
rv = compMgr->UnregisterFactory(kPropertiesCID, path); rv = compMgr->UnregisterFactory(kPropertiesCID, path);
#ifdef XP_PC
rv = compMgr->UnregisterFactory(kObserverServiceCID, path); rv = compMgr->UnregisterFactory(kObserverServiceCID, path);
rv = compMgr->UnregisterFactory(kObserverCID, path); rv = compMgr->UnregisterFactory(kObserverCID, path);
#endif
(void)servMgr->ReleaseService(kComponentManagerCID, compMgr); (void)servMgr->ReleaseService(kComponentManagerCID, compMgr);
return rv; return rv;
@ -124,7 +121,6 @@ NSGetFactory(nsISupports* aServMgr,
return res; return res;
} }
#ifdef XP_PC
else if (aClass.Equals(kObserverServiceCID)) { else if (aClass.Equals(kObserverServiceCID)) {
nsObserverServiceFactory *observerServiceFactory = new nsObserverServiceFactory(); nsObserverServiceFactory *observerServiceFactory = new nsObserverServiceFactory();
@ -152,7 +148,7 @@ NSGetFactory(nsISupports* aServMgr,
return res; return res;
} }
#endif
return NS_NOINTERFACE; return NS_NOINTERFACE;
} }