module.cpp revision c97989161fbe75bc14cea477a5443bbf474dd3ad
/** @file
*
* XPCOM module implementation functions
*/
/*
* Copyright (C) 2006-2007 innotek GmbH
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License as published by the Free Software Foundation,
* in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
* distribution. VirtualBox OSE is distributed in the hope that it will
* be useful, but WITHOUT ANY WARRANTY of any kind.
*
* If you received this file as part of a commercial VirtualBox
* distribution, then only the terms of your commercial VirtualBox
* license agreement apply instead of the previous paragraph.
*/
#include <nsIGenericFactory.h>
// generated file
#include "VirtualBox_XPCOM.h"
#include "GuestImpl.h"
#include "KeyboardImpl.h"
#include "MouseImpl.h"
#include "DisplayImpl.h"
#include "MachineDebuggerImpl.h"
#include "USBDeviceImpl.h"
#include "RemoteUSBDeviceImpl.h"
#include "SharedFolderImpl.h"
#include "FramebufferImpl.h"
#include "ProgressImpl.h"
#include "NetworkAdapterImpl.h"
#include "SessionImpl.h"
#include "ConsoleImpl.h"
#include "ConsoleVRDPServer.h"
#include "Logging.h"
// XPCOM glue code unfolding
COM_IMPL_READONLY_ENUM_AND_COLLECTION_EX(ComObjPtr <RemoteUSBDevice>, IHostUSBDevice, RemoteUSBDevice)
/**
* Singleton class factory that holds a reference to the created instance
* (preventing it from being destroyed) until the module is explicitly
* unloaded by the XPCOM shutdown code.
*
* Suitable for IN-PROC components.
*/
class SessionClassFactory : public Session
{
public:
virtual ~SessionClassFactory() {
FinalRelease();
instance = 0;
}
if (instance == 0) {
instance = new SessionClassFactory();
if (instance) {
else
} else {
}
} else {
}
return rv;
}
static nsresult releaseInstance () {
if (instance)
return NS_OK;
}
private:
};
/** @note this is for singleton; disabled for now */
//
//Session *SessionClassFactory::instance = 0;
//
//NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR_WITH_RC (
// Session, SessionClassFactory::getInstance
//)
/**
* Component definition table.
* Lists all components defined in this module.
*/
static const nsModuleComponentInfo components[] =
{
{
"Session component", // description
SessionConstructor, // constructor function
NULL, // registration function
NULL, // deregistration function
/** @note this is for singleton; disabled for now */
// SessionClassFactory::releaseInstance,
NULL, // destructor function
NULL, // language helper
}
};