Corrected error in the use of CIIDs and IIDs

This commit is contained in:
amusil%netscape.com 1999-02-04 00:03:18 +00:00
Родитель fc27a718a6
Коммит 40822ed808
3 изменённых файлов: 19 добавлений и 10 удалений

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

@ -43,7 +43,8 @@
#include "prprf.h" #include "prprf.h"
#include "nsIPluginHost.h" #include "nsIPluginHost.h"
#include "nsplugin.h" #include "nsplugin.h"
#include "nsPluginsCID.h" //#include "nsPluginsCID.h"
#include "nsIPluginManager.h"
#include "nsIPref.h" #include "nsIPref.h"
#include "nsIRefreshUrl.h" #include "nsIRefreshUrl.h"
#include "nsITimer.h" #include "nsITimer.h"
@ -372,7 +373,8 @@ static NS_DEFINE_IID(kIWebShellIID, NS_IWEB_SHELL_IID);
static NS_DEFINE_IID(kIWidgetIID, NS_IWIDGET_IID); static NS_DEFINE_IID(kIWidgetIID, NS_IWIDGET_IID);
static NS_DEFINE_IID(kIPluginManagerIID, NS_IPLUGINMANAGER_IID); static NS_DEFINE_IID(kIPluginManagerIID, NS_IPLUGINMANAGER_IID);
static NS_DEFINE_IID(kIPluginHostIID, NS_IPLUGINHOST_IID); static NS_DEFINE_IID(kIPluginHostIID, NS_IPLUGINHOST_IID);
static NS_DEFINE_IID(kCPluginHostCID, NS_PLUGIN_HOST_CID); //static NS_DEFINE_IID(kCPluginHostCID, NS_PLUGIN_HOST_CID);
static NS_DEFINE_IID(kCPluginManagerCID, NS_PLUGINMANAGER_CID);
static NS_DEFINE_IID(kIDocumentViewerIID, NS_IDOCUMENT_VIEWER_IID); static NS_DEFINE_IID(kIDocumentViewerIID, NS_IDOCUMENT_VIEWER_IID);
static NS_DEFINE_IID(kRefreshURLIID, NS_IREFRESHURL_IID); static NS_DEFINE_IID(kRefreshURLIID, NS_IREFRESHURL_IID);
static NS_DEFINE_IID(kITimerCallbackIID, NS_ITIMERCALLBACK_IID); static NS_DEFINE_IID(kITimerCallbackIID, NS_ITIMERCALLBACK_IID);
@ -396,7 +398,7 @@ nsresult nsWebShell::CreatePluginHost(PRBool aAllowPlugins)
{ {
if (nsnull == mPluginManager) if (nsnull == mPluginManager)
{ {
rv = nsRepository::CreateInstance(kCPluginHostCID, nsnull, rv = nsRepository::CreateInstance(kCPluginManagerCID, nsnull,
kIPluginManagerIID, kIPluginManagerIID,
(void**)&mPluginManager); (void**)&mPluginManager);
if (NS_OK == rv) if (NS_OK == rv)

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

@ -54,7 +54,9 @@ extern "C" int XP_JAVA_STARTUP_FAILED;
extern "C" int XP_JAVA_DEBUGGER_FAILED; extern "C" int XP_JAVA_DEBUGGER_FAILED;
extern nsIServiceManager *g_pNSIServiceManager; extern nsIServiceManager *g_pNSIServiceManager;
static NS_DEFINE_CID(kPluginManagerCID, NS_PLUGINMANAGER_CID); static NS_DEFINE_CID(kPluginManagerCID, NS_PLUGINMANAGER_CID);
static NS_DEFINE_CID(kPluginHostIID, NS_IPLUGINHOST_IID); //static NS_DEFINE_CID(kPluginHostIID, NS_IPLUGINHOST_IID);
static NS_DEFINE_IID(kPluginHostIID, NS_IPLUGINHOST_IID);
static NS_DEFINE_IID(kPluginManagerIID, NS_IPLUGINMANAGER_IID);
// FIXME -- need prototypes for these functions!!! XXX // FIXME -- need prototypes for these functions!!! XXX
#ifdef XP_MAC #ifdef XP_MAC
@ -432,9 +434,12 @@ nsJVMManager::StartupJVM(void)
** do JNI calls via liveconnect. ** do JNI calls via liveconnect.
** nsIPlugin* plugin = NPL_LoadPluginByType(NS_JVM_MIME_TYPE); ** nsIPlugin* plugin = NPL_LoadPluginByType(NS_JVM_MIME_TYPE);
*/ */
nsIPluginHost* pNSIPluginHost = NULL;
nsresult err = g_pNSIServiceManager->GetService(kPluginManagerCID, kPluginHostIID, (nsISupports**)&pNSIPluginHost); /*nsIPluginHost* pNSIPluginHost = NULL;
if (err != NS_OK) { nsresult err = g_pNSIServiceManager->GetService(kPluginManagerCID, kPluginHostIID, (nsISupports**)&pNSIPluginHost);*/
nsresult err = g_pNSIServiceManager->GetService(kPluginManagerCID, kPluginManagerIID, (nsISupports**)&plugin);
if (err != NS_OK) {
fStatus = nsJVMStatus_Failed; fStatus = nsJVMStatus_Failed;
return fStatus; return fStatus;
} }

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

@ -43,7 +43,8 @@
#include "prprf.h" #include "prprf.h"
#include "nsIPluginHost.h" #include "nsIPluginHost.h"
#include "nsplugin.h" #include "nsplugin.h"
#include "nsPluginsCID.h" //#include "nsPluginsCID.h"
#include "nsIPluginManager.h"
#include "nsIPref.h" #include "nsIPref.h"
#include "nsIRefreshUrl.h" #include "nsIRefreshUrl.h"
#include "nsITimer.h" #include "nsITimer.h"
@ -372,7 +373,8 @@ static NS_DEFINE_IID(kIWebShellIID, NS_IWEB_SHELL_IID);
static NS_DEFINE_IID(kIWidgetIID, NS_IWIDGET_IID); static NS_DEFINE_IID(kIWidgetIID, NS_IWIDGET_IID);
static NS_DEFINE_IID(kIPluginManagerIID, NS_IPLUGINMANAGER_IID); static NS_DEFINE_IID(kIPluginManagerIID, NS_IPLUGINMANAGER_IID);
static NS_DEFINE_IID(kIPluginHostIID, NS_IPLUGINHOST_IID); static NS_DEFINE_IID(kIPluginHostIID, NS_IPLUGINHOST_IID);
static NS_DEFINE_IID(kCPluginHostCID, NS_PLUGIN_HOST_CID); //static NS_DEFINE_IID(kCPluginHostCID, NS_PLUGIN_HOST_CID);
static NS_DEFINE_IID(kCPluginManagerCID, NS_PLUGINMANAGER_CID);
static NS_DEFINE_IID(kIDocumentViewerIID, NS_IDOCUMENT_VIEWER_IID); static NS_DEFINE_IID(kIDocumentViewerIID, NS_IDOCUMENT_VIEWER_IID);
static NS_DEFINE_IID(kRefreshURLIID, NS_IREFRESHURL_IID); static NS_DEFINE_IID(kRefreshURLIID, NS_IREFRESHURL_IID);
static NS_DEFINE_IID(kITimerCallbackIID, NS_ITIMERCALLBACK_IID); static NS_DEFINE_IID(kITimerCallbackIID, NS_ITIMERCALLBACK_IID);
@ -396,7 +398,7 @@ nsresult nsWebShell::CreatePluginHost(PRBool aAllowPlugins)
{ {
if (nsnull == mPluginManager) if (nsnull == mPluginManager)
{ {
rv = nsRepository::CreateInstance(kCPluginHostCID, nsnull, rv = nsRepository::CreateInstance(kCPluginManagerCID, nsnull,
kIPluginManagerIID, kIPluginManagerIID,
(void**)&mPluginManager); (void**)&mPluginManager);
if (NS_OK == rv) if (NS_OK == rv)