summaryrefslogtreecommitdiff
path: root/src/VBox/Main/src-server/xpcom/server.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2014-03-26 19:21:20 +0000
committer <>2014-05-08 15:03:54 +0000
commitfb123f93f9f5ce42c8e5785d2f8e0edaf951740e (patch)
treec2103d76aec5f1f10892cd1d3a38e24f665ae5db /src/VBox/Main/src-server/xpcom/server.cpp
parent58ed4748338f9466599adfc8a9171280ed99e23f (diff)
downloadVirtualBox-master.tar.gz
Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.3.10.tar.bz2.HEADVirtualBox-4.3.10master
Diffstat (limited to 'src/VBox/Main/src-server/xpcom/server.cpp')
-rw-r--r--src/VBox/Main/src-server/xpcom/server.cpp45
1 files changed, 23 insertions, 22 deletions
diff --git a/src/VBox/Main/src-server/xpcom/server.cpp b/src/VBox/Main/src-server/xpcom/server.cpp
index 6c48fcba..24ff15a8 100644
--- a/src/VBox/Main/src-server/xpcom/server.cpp
+++ b/src/VBox/Main/src-server/xpcom/server.cpp
@@ -4,7 +4,7 @@
*/
/*
- * Copyright (C) 2004-2012 Oracle Corporation
+ * Copyright (C) 2004-2013 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
@@ -20,10 +20,6 @@
#include <nsIComponentRegistrar.h>
-#ifdef XPCOM_GLUE
-# include <nsXPCOMGlue.h>
-#endif
-
#include <nsEventQueueUtils.h>
#include <nsGenericFactory.h>
@@ -66,7 +62,7 @@
#include "AudioAdapterImpl.h"
#include "BandwidthControlImpl.h"
#include "BandwidthGroupImpl.h"
-#include "DHCPServerRunner.h"
+#include "NetworkServiceRunner.h"
#include "DHCPServerImpl.h"
#include "GuestOSTypeImpl.h"
#include "HostImpl.h"
@@ -77,7 +73,6 @@
#include "NATEngineImpl.h"
#include "NetworkAdapterImpl.h"
#include "ParallelPortImpl.h"
-#include "ProgressCombinedImpl.h"
#include "ProgressProxyImpl.h"
#include "SerialPortImpl.h"
#include "SharedFolderImpl.h"
@@ -85,6 +80,7 @@
#include "StorageControllerImpl.h"
#include "SystemPropertiesImpl.h"
#include "USBControllerImpl.h"
+#include "USBDeviceFiltersImpl.h"
#include "VFSExplorerImpl.h"
#include "VirtualBoxImpl.h"
#include "VRDEServerImpl.h"
@@ -96,6 +92,8 @@
#ifdef VBOX_WITH_EXTPACK
# include "ExtPackManagerImpl.h"
#endif
+# include "NATNetworkImpl.h"
+
/* implement nsISupports parts of our objects with support for nsIClassInfo */
@@ -126,18 +124,12 @@ NS_IMPL_THREADSAFE_ISUPPORTS1_CI(Snapshot, ISnapshot)
NS_DECL_CLASSINFO(Medium)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(Medium, IMedium)
-NS_DECL_CLASSINFO(MediumFormat)
-NS_IMPL_THREADSAFE_ISUPPORTS1_CI(MediumFormat, IMediumFormat)
-
NS_DECL_CLASSINFO(MediumAttachment)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(MediumAttachment, IMediumAttachment)
NS_DECL_CLASSINFO(Progress)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(Progress, IProgress)
-NS_DECL_CLASSINFO(CombinedProgress)
-NS_IMPL_THREADSAFE_ISUPPORTS1_CI(CombinedProgress, IProgress)
-
NS_DECL_CLASSINFO(ProgressProxy)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(ProgressProxy, IProgress)
@@ -156,6 +148,9 @@ NS_IMPL_THREADSAFE_ISUPPORTS1_CI(HostNetworkInterface, IHostNetworkInterface)
NS_DECL_CLASSINFO(DHCPServer)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(DHCPServer, IDHCPServer)
+NS_DECL_CLASSINFO(NATNetwork)
+NS_IMPL_THREADSAFE_ISUPPORTS1_CI(NATNetwork, INATNetwork)
+
NS_DECL_CLASSINFO(GuestOSType)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(GuestOSType, IGuestOSType)
@@ -175,6 +170,9 @@ NS_IMPL_THREADSAFE_ISUPPORTS1_CI(ParallelPort, IParallelPort)
NS_DECL_CLASSINFO(USBController)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(USBController, IUSBController)
+NS_DECL_CLASSINFO(USBDeviceFilters)
+NS_IMPL_THREADSAFE_ISUPPORTS1_CI(USBDeviceFilters, IUSBDeviceFilters)
+
NS_DECL_CLASSINFO(StorageController)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(StorageController, IStorageController)
@@ -881,23 +879,26 @@ int main(int argc, char **argv)
nsresult rc;
+ /** @todo Merge this code with svcmain.cpp (use Logging.cpp?). */
+ char szLogFile[RTPATH_MAX];
if (!pszLogFile)
{
- char szLogFile[RTPATH_MAX] = "";
vrc = com::GetVBoxUserHomeDirectory(szLogFile, sizeof(szLogFile));
- if (vrc == VERR_ACCESS_DENIED)
- return RTMsgErrorExit(RTEXITCODE_FAILURE, "failed to open global settings directory '%s'", szLogFile);
if (RT_SUCCESS(vrc))
vrc = RTPathAppend(szLogFile, sizeof(szLogFile), "VBoxSVC.log");
- if (RT_SUCCESS(vrc))
- pszLogFile = RTStrDup(szLogFile);
- if (RT_FAILURE(vrc))
- return RTMsgErrorExit(RTEXITCODE_FAILURE, "failed to determine release log file (%Rrc)", vrc);
}
+ else
+ {
+ if (!RTStrPrintf(szLogFile, sizeof(szLogFile), "%s", pszLogFile))
+ vrc = VERR_NO_MEMORY;
+ }
+ if (RT_FAILURE(vrc))
+ return RTMsgErrorExit(RTEXITCODE_FAILURE, "failed to create logging file name, rc=%Rrc", vrc);
+
char szError[RTPATH_MAX + 128];
- vrc = com::VBoxLogRelCreate("XPCOM Server", pszLogFile,
+ vrc = com::VBoxLogRelCreate("XPCOM Server", szLogFile,
RTLOGFLAGS_PREFIX_THREAD | RTLOGFLAGS_PREFIX_TIME_PROG,
- "all", "VBOXSVC_RELEASE_LOG",
+ VBOXSVC_LOG_DEFAULT, "VBOXSVC_RELEASE_LOG",
RTLOGDEST_FILE, UINT32_MAX /* cMaxEntriesPerGroup */,
cHistory, uHistoryFileTime, uHistoryFileSize,
szError, sizeof(szError));