add temporary hack to instantiate Messenger in the JS namespace

This commit is contained in:
alecf%netscape.com 1999-02-26 17:47:35 +00:00
Родитель 44650f60d8
Коммит b7140ce60a
1 изменённых файлов: 26 добавлений и 0 удалений

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

@ -213,7 +213,33 @@ int main(int argc, char* argv[])
goto done;
}
/* ********************************************************************* */
/* This is a temporary hack to get mail working with autoregistration
* This won't succeed unless messenger was found
* through autoregistration, and will go away when the service manager
* is accessable from JavaScript
*/
/* Comments/questions to alecf@netscape.com */
{
nsIAppShellService *messenger;
nsCID cid;
nsresult result =
nsRepository::ProgIDToCLSID("component://netscape/messenger", &cid);
if (NS_SUCCEEDED(result)) {
result = nsRepository::CreateInstance(cid,
NULL,
nsIAppShellService::IID,
(void **)&messenger);
}
if (NS_SUCCEEDED(result)) {
result = messenger->Initialize();
}
}
/* End of mailhack */
/* ********************************************************************* */
/* Kick off appcores */
nsIDOMAppCoresManager *appCoresManager;
rv = nsServiceManager::GetService(kAppCoresManagerCID,
kIDOMAppCoresManagerIID,