Hooking up xpinstall to the viewer. This will cause a new instance of the

xpinstall to be created when the viewer launches.  This will be removed
(along with the startup of silentdl) once we have a way of starting up
components less intrusive.

nsViewer.cpp - Added CreateInstance and related code to start component
makefile.win - Added new include path
This commit is contained in:
dougt%netscape.com 1999-05-06 03:59:47 +00:00
Родитель 9030c63eb2
Коммит 529b22c8b3
2 изменённых файлов: 29 добавлений и 15 удалений

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

@ -69,6 +69,7 @@ LINCS= \
-I$(PUBLIC)\intl \
-I$(PUBLIC)\rdf \
-I$(PUBLIC)\silentdl \
-I$(PUBLIC)\xpinstall \
-I$(PUBLIC)\wallet \
-I$(PUBLIC)\profile \
!if defined(NGPREFS)

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

@ -82,6 +82,18 @@ static NS_DEFINE_IID(kISilentDownloadIID, NS_IDOMSILENTDOWNLOAD_IID);
static NS_DEFINE_IID(kSilentDownloadCID, NS_SilentDownload_CID);
/*********************************************/
/*********************************************
SoftwareUpdate
*********************************************/
#include "nsISoftwareUpdate.h"
#include "nsSoftwareUpdateIIDs.h"
static nsISoftwareUpdate *softwareUpdate= NULL;
static NS_DEFINE_IID(kISoftwareUpdateIID, NS_ISOFTWAREUPDATE_IID);
static NS_DEFINE_IID(kSoftwareUpdateCID, NS_SoftwareUpdate_CID);
/*********************************************/
extern nsresult NS_NewBrowserWindowFactory(nsIFactory** aFactory);
extern nsresult NS_NewXPBaseWindowFactory(nsIFactory** aFactory);
extern "C" void NS_SetupRegistry();
@ -284,17 +296,17 @@ nsViewerApp::Initialize(int argc, char** argv)
return rv;
}
// XXX silent download
rv = nsComponentManager::CreateInstance(kSoftwareUpdateCID,
nsnull,
kISoftwareUpdateIID,
(void**) &softwareUpdate);
rv = nsComponentManager::CreateInstance(kSilentDownloadCID,
nsnull,
kISilentDownloadIID,
(void**) &silentDownload);
if (rv == NS_OK) {
if (silentDownload->Startup() != NS_OK) {
silentDownload->Shutdown();
NS_RELEASE(silentDownload);
}
}
nsnull,
kISilentDownloadIID,
(void**) &silentDownload);
// Finally process our arguments
rv = ProcessArguments(argc, argv);
@ -306,11 +318,12 @@ nsViewerApp::Initialize(int argc, char** argv)
nsresult
nsViewerApp::Exit()
{
if (silentDownload != NULL)
{
silentDownload->Shutdown();
NS_RELEASE(silentDownload);
}
if (silentDownload != nsnull)
NS_RELEASE(silentDownload);
if (softwareUpdate!= nsnull)
NS_RELEASE(softwareUpdate);
Destroy();
mAppShell->Exit();