vbox: use interface declarations from 'VirtualBox_XPCOM.h'

Fixes #1499
This commit is contained in:
Christian Prochaska 2015-05-04 11:36:45 +02:00 committed by Christian Helmuth
parent 1001a04883
commit a4868f8d1d
64 changed files with 2005 additions and 1994 deletions

View File

@ -11,6 +11,8 @@ REQUIRES += installation_of_iasl
endif
VIRTUALBOX_DIR = $(call select_from_ports,virtualbox)/src/app/virtualbox
VIRTUALBOX_SDK_DIR = $(call select_from_ports,virtualbox)/src/app/virtualbox_sdk
VBOX_DIR = $(VIRTUALBOX_DIR)/src/VBox
VBOX_CC_OPT += -DIN_RING3 -DVBOX -DVBOX_OSE \
@ -67,10 +69,16 @@ CC_WARN += -Wno-trigraphs
CC_OPT += $(VBOX_CC_OPT)
# VirtualBox expects wchar_t to be a 16-bit type. yasm does not understand this
# flag, therefore it gets added to CC_OPT instead of VBOX_CC_OPT.
CC_OPT += -fshort-wchar
LIBS += libc libm
INC_DIR += $(REP_DIR)/src/virtualbox/include
INC_DIR += $(REP_DIR)/src/virtualbox/include/xpcom
INC_DIR += $(VIRTUALBOX_DIR)/include
INC_DIR += $(VIRTUALBOX_SDK_DIR)/sdk/bindings/xpcom/include
INC_DIR += $(VBOX_DIR)/Devices/build
vpath %.cpp $(VBOX_DIR)

View File

@ -1,6 +1,6 @@
include $(REP_DIR)/lib/mk/virtualbox-common.inc
VBOX_CC_OPT += -DVBOX_COM_INPROC_API_CLIENT
VBOX_CC_OPT += -DVBOX_WITH_GENERIC_SESSION_WATCHER
LIBS += stdcxx
@ -35,10 +35,12 @@ SRC_CC += Main/src-server/AudioAdapterImpl.cpp
SRC_CC += Main/src-server/BandwidthControlImpl.cpp
SRC_CC += Main/src-server/BandwidthGroupImpl.cpp
SRC_CC += Main/src-server/BIOSSettingsImpl.cpp
SRC_CC += Main/src-server/ClientToken.cpp
SRC_CC += Main/src-server/DHCPServerImpl.cpp
SRC_CC += Main/src-server/GuestOSTypeImpl.cpp
SRC_CC += Main/src-server/MachineImpl.cpp
SRC_CC += Main/src-server/MachineImplCloneVM.cpp
SRC_CC += Main/src-server/Matching.cpp
SRC_CC += Main/src-server/MediumAttachmentImpl.cpp
SRC_CC += Main/src-server/MediumImpl.cpp
SRC_CC += Main/src-server/MediumFormatImpl.cpp
@ -66,3 +68,7 @@ SRC_CC += Main/glue/xpcom/helpers.cpp
INC_DIR += $(VBOX_DIR)/Main/xml
INC_DIR += $(VBOX_DIR)/Main/include
INC_DIR += $(REP_DIR)/src/virtualbox/frontend
INC_DIR += $(REP_DIR)/src/virtualbox/frontend/VBoxAPIWrap
# search path to 'scan_code_set_2.h'
INC_DIR += $(call select_from_repositories,src/drivers/input/ps2)

View File

@ -1 +1 @@
1e49158411c029263f5b29b890ec3f212b2caf29
43d2aa6fa21dcf782a5c2539d6056575602bc545

View File

@ -1,20 +1,21 @@
LICENSE := GPLv2
VERSION := 4.3.16
DOWNLOADS := virtualbox.archive
DOWNLOADS := virtualbox.archive virtualbox_sdk.archive
VIRTUALBOX_TBZ2 := VirtualBox-$(VERSION).tar.bz2
VIRTUALBOX_TBZ2 := VirtualBox-$(VERSION).tar.bz2
VIRTUALBOX_SDK_ZIP := VirtualBoxSDK-$(VERSION)-95972.zip
URL(virtualbox) := http://download.virtualbox.org/virtualbox/$(VERSION)/$(VIRTUALBOX_TBZ2)
DIR(virtualbox) := src/app/virtualbox
SHA(virtualbox) := e4c23b713e8715b8e0172fa066f2197756e901fe
PATCHES_LIST := acpi_drv dev_e1000 eminternal iconv mouse
PATCHES_LIST += pdm_driver poke sharedfolder_pagelist
PATCHES_LIST += time-log-deadlock tm_retries vbox_inc vbox_main network
PATCHES_LIST += vga_fb vga_vbva vmdk vmmdev avoid_yield serial rem_irq usb
URL(virtualbox_sdk) := http://download.virtualbox.org/virtualbox/$(VERSION)/$(VIRTUALBOX_SDK_ZIP)
DIR(virtualbox_sdk) := src/app/virtualbox_sdk
SHA(virtualbox_sdk) := 8f95a891a6cb5f712fcb0ed34f2b8bf6b1e59f4c
PATCHES := $(addsuffix .patch, $(PATCHES_LIST))
PATCHES := $(addprefix src/virtualbox/patches/, $(PATCHES))
PATCHES_DIR := src/virtualbox/patches
PATCHES := $(addprefix $(PATCHES_DIR)/, $(shell cat $(REP_DIR)/$(PATCHES_DIR)/series))
PATCH_OPT := -p1
$(call check_tool,xsltproc)
@ -29,7 +30,7 @@ VBOX_MAIN_CLI += HGCMObjects
VBOX_MAIN_CLI += KeyboardImpl SessionImpl VMMDevInterface BusAssignmentManager
VBOX_MAIN_CLI += ConsoleImpl GuestImpl MouseImpl VBoxDriversRegister
VBOX_MAIN_SRV := AudioAdapterImpl DHCPServerImpl MediumAttachmentImpl
VBOX_MAIN_SRV := AudioAdapterImpl ClientToken DHCPServerImpl Matching MediumAttachmentImpl
VBOX_MAIN_SRV += NATEngineImpl SerialPortImpl
VBOX_MAIN_SRV += BandwidthControlImpl GuestOSTypeImpl MediumFormatImpl
VBOX_MAIN_SRV += NetworkAdapterImpl SnapshotImpl
@ -42,7 +43,7 @@ VBOX_MAIN_SRV += USBControllerImpl USBDeviceFilterImpl USBDeviceFiltersImpl
VBOX_MAIN_INC := AdditionsFacilityImpl AudioAdapterImpl AudioSnifferInterface
VBOX_MAIN_INC += AutoCaller AutostartDb AutoStateDep BandwidthControlImpl
VBOX_MAIN_INC += BandwidthGroupImpl BIOSSettingsImpl BusAssignmentManager Nvram
VBOX_MAIN_INC += ConsoleEvents ConsoleImpl DHCPServerImpl DisplayImpl HostImpl
VBOX_MAIN_INC += ClientToken ConsoleEvents ConsoleImpl DHCPServerImpl DisplayImpl HostImpl
VBOX_MAIN_INC += DisplayUtils EventImpl FramebufferImpl Global
VBOX_MAIN_INC += GuestCtrlImplPrivate GuestDirectoryImpl GuestDnDImpl Logging
VBOX_MAIN_INC += GuestFileImpl GuestFsObjInfoImpl GuestImpl GuestOSTypeImpl
@ -56,7 +57,7 @@ VBOX_MAIN_INC += ProgressProxyImpl SerialPortImpl SessionImpl SharedFolderImpl
VBOX_MAIN_INC += StorageControllerImpl SystemPropertiesImpl TokenImpl VMMDev
VBOX_MAIN_INC += USBControllerImpl USBDeviceFilterImpl USBDeviceFiltersImpl
VBOX_MAIN_INC += USBProxyService VirtualBoxImpl VRDEServerImpl GuestProcessImpl
VBOX_MAIN_INC += USBDeviceImpl HostUSBDeviceImpl Matching
VBOX_MAIN_INC += USBDeviceImpl HostUSBDeviceImpl Matching Wrapper
VBOX_SRC_VBOX := VMM Devices Runtime GuestHost/HGSMI Storage Disassembler
VBOX_SRC_VBOX += HostServices/SharedFolders Main/xml/Settings.cpp
@ -90,6 +91,8 @@ TAR_OPT(virtualbox) := \
--strip-components 1 \
$(addprefix $(VIRTUALBOX_TBZ2:.tar.bz2=)/,$(VBOX_CONTENT))
UNZIP_OPT(virtualbox_sdk) := $(VIRTUALBOX_SDK_ZIP) sdk/bindings/xpcom/include/VirtualBox_XPCOM.h \#
default : additional_steps
additional_steps : $(DOWNLOADS)

View File

@ -1,19 +0,0 @@
#ifndef ____H_CLIENTTOKEN
#define ____H_CLIENTTOKEN
#include <VBox/com/ptr.h>
#include <VBox/com/AutoLock.h>
#include "MachineImpl.h"
class Machine::ClientToken
{
public:
ClientToken(const ComObjPtr<Machine> &pMachine, SessionMachine *pSessionMachine);
bool isReady();
bool release();
void getId(Utf8Str &strId);
};
#endif /* !____H_CLIENTTOKEN */

View File

@ -1,287 +1,10 @@
#ifndef ____H_GENODEIMPL
#define ____H_GENODEIMPL
#include <VBox/vmm/vmapi.h>
#include <VBox/com/com.h>
#include <VBox/com/string.h>
#include <VBox/com/Guid.h>
#include <VBox/com/defs.h>
#include <VBox/com/AutoLock.h>
#include <VBox/com/EventQueue.h>
/* GuestControlSvc.h */
class Progress;
typedef Progress IProgress;
class VirtualBoxErrorInfo;
typedef VirtualBoxErrorInfo IVirtualBoxErrorInfo;
class IUnknown;
#include <VBox/com/ErrorInfo.h>
#include <VBox/vmm/pdmifs.h>
#include <VBox/settings.h>
#include <iprt/uuid.h>
#include <iprt/fs.h>
#include <iprt/file.h>
#include <iprt/semaphore.h>
class Console;
#include "AutoCaller.h"
#include "VMMDev.h"
#include <map>
#include <list>
#include <vector>
#define TRUNKTYPE_WHATEVER "whatever"
#define TRUNKTYPE_NETFLT "netflt"
#define INTNET_MAX_NETWORK_NAME 128
#define VBOX_SHARED_CLIPBOARD_HOST_FN_SET_HEADLESS 2
enum INTNETTRUNKTYPE
{
kIntNetTrunkType_WhateverNone,
kIntNetTrunkType_NetFlt,
};
class IHostNetworkInterface;
class IFramebufferOverlay;
class IInternalSessionControl;
class IHostUSBDevice;
class IHostUSBDeviceFilter;
class IHostVideoInputDevice;
class IVetoEvent;
class AdditionsFacility;
class AudioAdapter;
class BandwidthControl;
class BandwidthGroup;
class BIOSSettings;
class ConsoleMouseInterface;
class Display;
class DHCPServer;
class EmulatedUSB;
class EventSource;
class Framebuffer;
class Guest;
class GuestDirectory;
class GuestFile;
class GuestFsObjInfo;
class GuestOSType;
class GuestProcess;
class GuestSession;
class Host;
class Keyboard;
class Machine;
class MachineDebugger;
class Medium;
class MediumAttachment;
class MediumFormat;
class MediumLockList;
class Mouse;
class NATEngine;
class NATNetwork;
class NetworkAdapter;
class OUSBDevice;
class ParallelPort;
class PCIDeviceAttachment;
class SerialPort;
class Session;
class SessionMachine;
class SharedFolder;
class Snapshot;
class StorageController;
class SystemProperties;
class Token;
class USBController;
class USBDeviceFilter;
class USBDeviceFilters;
class VBoxEvent;
class VBoxEventDesc;
class VBoxVetoEvent;
class VirtualBox;
class VRDEServer;
class VRDEServerInfo;
class VirtualBoxErrorInfo {
public:
HRESULT init(HRESULT aResultCode, const GUID &aIID,
const char *pcszComponent, const com::Utf8Str &strText,
IVirtualBoxErrorInfo *aNext = NULL);
HRESULT FinalConstruct() { return S_OK; }
};
class IStateChangedEvent
{
public:
void get_State(MachineState_T*);
};
typedef AdditionsFacility IAdditionsFacility;
class IAppliance;
typedef AudioAdapter IAudioAdapter;
typedef Console IConsole;
typedef BandwidthControl IBandwidthControl;
typedef BandwidthGroup IBandwidthGroup;
typedef BIOSSettings IBIOSSettings;
typedef Display IDisplay;
typedef DHCPServer IDHCPServer;
typedef EmulatedUSB IEmulatedUSB;
typedef VBoxEvent IEvent;
typedef VBoxVetoEvent IExtraDataCanChangeEvent;
typedef EventSource IEventSource;
typedef Framebuffer IFramebuffer;
class IExtPackManager;
typedef Guest IGuest;
typedef GuestDirectory IGuestDirectory;
typedef GuestFile IGuestFile;
typedef GuestFsObjInfo IGuestFsObjInfo;
typedef GuestProcess IGuestProcess;
typedef GuestSession IGuestSession;
typedef GuestOSType IGuestOSType;
typedef Host IHost;
typedef Keyboard IKeyboard;
typedef Machine IMachine;
typedef MachineDebugger IMachineDebugger;
typedef Medium IMedium;
typedef MediumAttachment IMediumAttachment;
typedef Mouse IMouse;
typedef NetworkAdapter INetworkAdapter;
typedef NATEngine INATEngine;
typedef NATNetwork INATNetwork;
typedef ParallelPort IParallelPort;
class IPerformanceCollector;
typedef SerialPort ISerialPort;
typedef Session ISession;
typedef SharedFolder ISharedFolder;
typedef Snapshot ISnapshot;
typedef StorageController IStorageController;
typedef SystemProperties ISystemProperties;
typedef Token IToken;
typedef USBController IUSBController;
typedef OUSBDevice IUSBDevice;
typedef USBDeviceFilter IUSBDeviceFilter;
typedef USBDeviceFilters IUSBDeviceFilters;
typedef VirtualBox IVirtualBox;
typedef VRDEServer IVRDEServer;
typedef VRDEServerInfo IVRDEServerInfo;
typedef PCIDeviceAttachment IPCIDeviceAttachment;
typedef SessionMachine IInternalMachineControl;
class IVirtualSystemDescription;
class IEventListener {
public:
HRESULT HandleEvent(IEvent * aEvent);
/*
{
VBoxEventType_T aType = VBoxEventType_Invalid;
aEvent->COMGETTER(Type)(&aType);
return mListener->HandleEvent(aType, aEvent);
}
*/
};
template <typename X>
class DummyClass {
public:
void AddRef() { }
void Release() { }
void fireNATRedirectEvent(const ComObjPtr<EventSource>&, BSTR, ULONG&, bool&, short unsigned int*&, NATProtocol_T&, short unsigned int*&, uint16_t&, short unsigned int*&, uint16_t&);
void fireNATNetworkChangedEvent(const ComObjPtr<EventSource>&, short unsigned int*&);
void fireNATNetworkStartStopEvent(const ComObjPtr<EventSource>&, short unsigned int*&, BOOL&);
void fireNATNetworkSettingEvent(const ComObjPtr<EventSource>&, short unsigned int*&, BOOL&, short unsigned int*&, short unsigned int*&, BOOL&, BOOL&);
void fireNATNetworkPortForwardEvent(const ComObjPtr<EventSource>&, short unsigned int*&, BOOL&, BOOL&, short unsigned int*&, NATProtocol_T&, short unsigned int*&, LONG&, short unsigned int*&, LONG&);
void fireHostNameResolutionConfigurationChangeEvent(const ComObjPtr<EventSource>&);
void fireHostPCIDevicePlugEvent(ComPtr<EventSource>&, BSTR, bool, bool, ComObjPtr<PCIDeviceAttachment>&, void *);
void fireStateChangedEvent(const ComObjPtr<EventSource>&, MachineState_T);
void fireRuntimeErrorEvent(const ComObjPtr<EventSource>&, BOOL, IN_BSTR, IN_BSTR);
};
#define ATL_NO_VTABLE
#define DECLARE_CLASSFACTORY()
#define VBOX_SCRIPTABLE_IMPL(X) public DummyClass<X>
#define DECLARE_NOT_AGGREGATABLE(X)
#define DECLARE_REGISTRY_RESOURCEID(X)
#define DECLARE_PROTECT_FINAL_CONSTRUCT(Y)
#define DECLARE_CLASSFACTORY_SINGLETON(X)
#define BEGIN_COM_MAP(X)
#define VBOX_DEFAULT_INTERFACE_ENTRIES(X)
#define COM_INTERFACE_ENTRY(X)
#define COM_INTERFACE_ENTRY2(X,Y)
#define END_COM_MAP()
#define DECLARE_EMPTY_CTOR_DTOR(X) public: X(); ~X();
#define DEFINE_EMPTY_CTOR_DTOR(X) X::X() {} X::~X() {}
#define STDMETHODIMP HRESULT
#define STDMETHOD(X) virtual HRESULT X
#define Q_OBJECT
#include "BusAssignmentManager.h"
#include "MediumFormatImpl.h"
typedef MediumFormat IMediumFormat;
typedef struct sdfkkd { } VRDEUSBDEVICEDESC;
typedef struct sdfsdf3 { } VBOXGUESTCTRLHOSTCBCTX, *PVBOXGUESTCTRLHOSTCBCTX;
typedef struct sdffsd2 { } VBOXGUESTCTRLHOSTCALLBACK, *PVBOXGUESTCTRLHOSTCALLBACK;
typedef struct IFsObjInfo { } IFsObjInfo;
#include "AdditionsFacilityImpl.h"
#include "BIOSSettingsImpl.h"
#include "EventImpl.h"
#include "FramebufferImpl.h"
#include "PCIDeviceAttachmentImpl.h"
#include "GuestImpl.h"
#include "GuestDirectoryImpl.h"
#include "GuestFsObjInfoImpl.h"
#include "GuestProcessImpl.h"
#include "GuestSessionImpl.h"
#include "NetworkServiceRunner.h"
#include "SnapshotImpl.h"
#include "ParallelPortImpl.h"
#include "MediumAttachmentImpl.h"
#include "StorageControllerImpl.h"
#include "USBControllerImpl.h"
#include "SerialPortImpl.h"
#include "NATEngineImpl.h"
#include "NetworkAdapterImpl.h"
#include "ProgressImpl.h"
#include "VRDEServerImpl.h"
#include "GuestOSTypeImpl.h"
#include "DHCPServerImpl.h"
#include "SystemPropertiesImpl.h"
#include "KeyboardImpl.h"
#include "DisplayImpl.h"
#include "NATNetworkImpl.h"
#include "VRDEServerImpl.h"
#include "MediumImpl.h"
#include "SessionImpl.h"
#include "HostImpl.h"
#include "USBDeviceImpl.h"
class VRDEServerInfo { };
class EmulatedUSB { };
class ConsoleVRDPServer
{
public:
void SendResize (void) {}
void SendUpdate (unsigned uScreenId, void *pvUpdate, uint32_t cbUpdate) const;
void SendUpdateBitmap (unsigned uScreenId, uint32_t x, uint32_t y, uint32_t w, uint32_t h) const;
void Stop();
};
typedef struct { } VBOXGUESTCTRLHOSTCBCTX, *PVBOXGUESTCTRLHOSTCBCTX;
typedef struct { } VBOXGUESTCTRLHOSTCALLBACK, *PVBOXGUESTCTRLHOSTCALLBACK;
enum GUEST_FILE_SEEKTYPE { };
#endif // !____H_GENODEIMPL

View File

@ -1,10 +0,0 @@
#include "VirtualBoxBase.h"
class MediumFormatWrap : public VirtualBoxBase, public DummyClass<MediumFormatWrap> {
public:
virtual const char* getComponentName() const
{
return "MediumFormatWrap";
}
};

View File

@ -1,22 +0,0 @@
#include "VirtualBoxBase.h"
class Token : public VirtualBoxBase
{
public:
virtual HRESULT abandon(AutoCaller &aAutoCaller) = 0;
HRESULT Abandon() {
AutoCaller autoCaller(this);
abandon(autoCaller);
return S_OK;
}
virtual const char* getComponentName() const
{
return "Token";
}
};
class TokenWrap : public Token
{
};

View File

@ -0,0 +1,210 @@
/** @file
*
* VirtualBox API class wrapper code for IMediumFormat.
*
* DO NOT EDIT! This is a generated file.
* Generated from: src/VBox/Main/idl/VirtualBox.xidl
* Generator: src/VBox/Main/idl/apiwrap-server.xsl
*/
/**
* Copyright (C) 2010-2014 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* you can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) 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.
*/
#define LOG_GROUP_MAIN_OVERRIDE LOG_GROUP_MAIN_MEDIUMFORMAT
#include "MediumFormatWrap.h"
#include "Logging.h"
DEFINE_EMPTY_CTOR_DTOR(MediumFormatWrap)
//
// IMediumFormat properties
//
STDMETHODIMP MediumFormatWrap::COMGETTER(Id)(BSTR *aId)
{
LogRelFlow(("{%p} %s: enter aId=%p\n", this, "MediumFormat::getId", aId));
VirtualBoxBase::clearError();
HRESULT hrc;
try
{
CheckComArgOutPointerValidThrow(aId);
AutoCaller autoCaller(this);
if (FAILED(autoCaller.rc()))
throw autoCaller.rc();
hrc = getId(BSTROutConverter(aId).str());
}
catch (HRESULT hrc2)
{
hrc = hrc2;
}
catch (...)
{
hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
}
LogRelFlow(("{%p} %s: leave *aId=%ls hrc=%Rhrc\n", this, "MediumFormat::getId", *aId, hrc));
return hrc;
}
STDMETHODIMP MediumFormatWrap::COMGETTER(Name)(BSTR *aName)
{
LogRelFlow(("{%p} %s: enter aName=%p\n", this, "MediumFormat::getName", aName));
VirtualBoxBase::clearError();
HRESULT hrc;
try
{
CheckComArgOutPointerValidThrow(aName);
AutoCaller autoCaller(this);
if (FAILED(autoCaller.rc()))
throw autoCaller.rc();
hrc = getName(BSTROutConverter(aName).str());
}
catch (HRESULT hrc2)
{
hrc = hrc2;
}
catch (...)
{
hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
}
LogRelFlow(("{%p} %s: leave *aName=%ls hrc=%Rhrc\n", this, "MediumFormat::getName", *aName, hrc));
return hrc;
}
STDMETHODIMP MediumFormatWrap::COMGETTER(Capabilities)(ComSafeArrayOut(MediumFormatCapabilities_T, aCapabilities))
{
LogRelFlow(("{%p} %s: enter aCapabilities=%p\n", this, "MediumFormat::getCapabilities", aCapabilities));
VirtualBoxBase::clearError();
HRESULT hrc;
try
{
CheckComArgOutPointerValidThrow(aCapabilities);
AutoCaller autoCaller(this);
if (FAILED(autoCaller.rc()))
throw autoCaller.rc();
hrc = getCapabilities(ArrayOutConverter<MediumFormatCapabilities_T>(ComSafeArrayOutArg(aCapabilities)).array());
}
catch (HRESULT hrc2)
{
hrc = hrc2;
}
catch (...)
{
hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
}
LogRelFlow(("{%p} %s: leave *aCapabilities=%zu hrc=%Rhrc\n", this, "MediumFormat::getCapabilities", ComSafeArraySize(*aCapabilities), hrc));
return hrc;
}
//
// IMediumFormat methods
//
STDMETHODIMP MediumFormatWrap::DescribeFileExtensions(ComSafeArrayOut(BSTR, aExtensions),
ComSafeArrayOut(DeviceType_T, aTypes))
{
LogRelFlow(("{%p} %s:enter aExtensions=%p aTypes=%p\n", this, "MediumFormat::describeFileExtensions", aExtensions, aTypes));
VirtualBoxBase::clearError();
HRESULT hrc;
try
{
CheckComArgOutPointerValidThrow(aExtensions);
CheckComArgOutPointerValidThrow(aTypes);
AutoCaller autoCaller(this);
if (FAILED(autoCaller.rc()))
throw autoCaller.rc();
hrc = describeFileExtensions(ArrayBSTROutConverter(ComSafeArrayOutArg(aExtensions)).array(),
ArrayOutConverter<DeviceType_T>(ComSafeArrayOutArg(aTypes)).array());
}
catch (HRESULT hrc2)
{
hrc = hrc2;
}
catch (...)
{
hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
}
LogRelFlow(("{%p} %s: leave *aExtensions=%zu *aTypes=%zu hrc=%Rhrc\n", this, "MediumFormat::describeFileExtensions", ComSafeArraySize(*aExtensions), ComSafeArraySize(*aTypes), hrc));
return hrc;
}
STDMETHODIMP MediumFormatWrap::DescribeProperties(ComSafeArrayOut(BSTR, aNames),
ComSafeArrayOut(BSTR, aDescriptions),
ComSafeArrayOut(DataType_T, aTypes),
ComSafeArrayOut(ULONG, aFlags),
ComSafeArrayOut(BSTR, aDefaults))
{
LogRelFlow(("{%p} %s:enter aNames=%p aDescriptions=%p aTypes=%p aFlags=%p aDefaults=%p\n", this, "MediumFormat::describeProperties", aNames, aDescriptions, aTypes, aFlags, aDefaults));
VirtualBoxBase::clearError();
HRESULT hrc;
try
{
CheckComArgOutPointerValidThrow(aNames);
CheckComArgOutPointerValidThrow(aDescriptions);
CheckComArgOutPointerValidThrow(aTypes);
CheckComArgOutPointerValidThrow(aFlags);
CheckComArgOutPointerValidThrow(aDefaults);
AutoCaller autoCaller(this);
if (FAILED(autoCaller.rc()))
throw autoCaller.rc();
hrc = describeProperties(ArrayBSTROutConverter(ComSafeArrayOutArg(aNames)).array(),
ArrayBSTROutConverter(ComSafeArrayOutArg(aDescriptions)).array(),
ArrayOutConverter<DataType_T>(ComSafeArrayOutArg(aTypes)).array(),
ArrayOutConverter<ULONG>(ComSafeArrayOutArg(aFlags)).array(),
ArrayBSTROutConverter(ComSafeArrayOutArg(aDefaults)).array());
}
catch (HRESULT hrc2)
{
hrc = hrc2;
}
catch (...)
{
hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
}
LogRelFlow(("{%p} %s: leave *aNames=%zu *aDescriptions=%zu *aTypes=%zu *aFlags=%zu *aDefaults=%zu hrc=%Rhrc\n", this, "MediumFormat::describeProperties", ComSafeArraySize(*aNames), ComSafeArraySize(*aDescriptions), ComSafeArraySize(*aTypes), ComSafeArraySize(*aFlags), ComSafeArraySize(*aDefaults), hrc));
return hrc;
}
#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(MediumFormatWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(MediumFormatWrap, IMediumFormat)
#endif // VBOX_WITH_XPCOM

View File

@ -0,0 +1,77 @@
/** @file
*
* VirtualBox API class wrapper header for IMediumFormat.
*
* DO NOT EDIT! This is a generated file.
* Generated from: src/VBox/Main/idl/VirtualBox.xidl
* Generator: src/VBox/Main/idl/apiwrap-server.xsl
*/
/**
* Copyright (C) 2010-2014 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* you can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) 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.
*/
#ifndef MediumFormatWrap_H_
#define MediumFormatWrap_H_
#include "VirtualBoxBase.h"
#include "Wrapper.h"
class ATL_NO_VTABLE MediumFormatWrap:
public VirtualBoxBase,
VBOX_SCRIPTABLE_IMPL(IMediumFormat)
{
Q_OBJECT
public:
VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(MediumFormatWrap, IMediumFormat)
DECLARE_NOT_AGGREGATABLE(MediumFormatWrap)
DECLARE_PROTECT_FINAL_CONSTRUCT()
BEGIN_COM_MAP(MediumFormatWrap)
COM_INTERFACE_ENTRY(ISupportErrorInfo)
COM_INTERFACE_ENTRY(IMediumFormat)
COM_INTERFACE_ENTRY2(IDispatch, IMediumFormat)
END_COM_MAP()
DECLARE_EMPTY_CTOR_DTOR(MediumFormatWrap)
// public IMediumFormat properties
STDMETHOD(COMGETTER(Id))(BSTR *aId);
STDMETHOD(COMGETTER(Name))(BSTR *aName);
STDMETHOD(COMGETTER(Capabilities))(ComSafeArrayOut(MediumFormatCapabilities_T, aCapabilities));
// public IMediumFormat methods
STDMETHOD(DescribeFileExtensions)(ComSafeArrayOut(BSTR, aExtensions),
ComSafeArrayOut(DeviceType_T, aTypes));
STDMETHOD(DescribeProperties)(ComSafeArrayOut(BSTR, aNames),
ComSafeArrayOut(BSTR, aDescriptions),
ComSafeArrayOut(DataType_T, aTypes),
ComSafeArrayOut(ULONG, aFlags),
ComSafeArrayOut(BSTR, aDefaults));
private:
// wrapped IMediumFormat properties
virtual HRESULT getId(com::Utf8Str &aId) = 0;
virtual HRESULT getName(com::Utf8Str &aName) = 0;
virtual HRESULT getCapabilities(std::vector<MediumFormatCapabilities_T> &aCapabilities) = 0;
// wrapped IMediumFormat methods
virtual HRESULT describeFileExtensions(std::vector<com::Utf8Str> &aExtensions,
std::vector<DeviceType_T> &aTypes) = 0;
virtual HRESULT describeProperties(std::vector<com::Utf8Str> &aNames,
std::vector<com::Utf8Str> &aDescriptions,
std::vector<DataType_T> &aTypes,
std::vector<ULONG> &aFlags,
std::vector<com::Utf8Str> &aDefaults) = 0;
};
#endif // !MediumFormatWrap_H_

View File

@ -0,0 +1,100 @@
/** @file
*
* VirtualBox API class wrapper code for IToken.
*
* DO NOT EDIT! This is a generated file.
* Generated from: src/VBox/Main/idl/VirtualBox.xidl
* Generator: src/VBox/Main/idl/apiwrap-server.xsl
*/
/**
* Copyright (C) 2010-2014 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* you can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) 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.
*/
#define LOG_GROUP_MAIN_OVERRIDE LOG_GROUP_MAIN_TOKEN
#include "TokenWrap.h"
#include "Logging.h"
DEFINE_EMPTY_CTOR_DTOR(TokenWrap)
//
// IToken properties
//
//
// IToken methods
//
STDMETHODIMP TokenWrap::Abandon()
{
LogRelFlow(("{%p} %s:enter\n", this, "Token::abandon"));
VirtualBoxBase::clearError();
HRESULT hrc;
try
{
AutoCaller autoCaller(this);
if (FAILED(autoCaller.rc()))
throw autoCaller.rc();
hrc = abandon(autoCaller);
}
catch (HRESULT hrc2)
{
hrc = hrc2;
}
catch (...)
{
hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
}
LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Token::abandon", hrc));
return hrc;
}
STDMETHODIMP TokenWrap::Dummy()
{
LogRelFlow(("{%p} %s:enter\n", this, "Token::dummy"));
VirtualBoxBase::clearError();
HRESULT hrc;
try
{
AutoCaller autoCaller(this);
if (FAILED(autoCaller.rc()))
throw autoCaller.rc();
hrc = dummy();
}
catch (HRESULT hrc2)
{
hrc = hrc2;
}
catch (...)
{
hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
}
LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Token::dummy", hrc));
return hrc;
}
#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(TokenWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(TokenWrap, IToken)
#endif // VBOX_WITH_XPCOM

View File

@ -0,0 +1,61 @@
/** @file
*
* VirtualBox API class wrapper header for IToken.
*
* DO NOT EDIT! This is a generated file.
* Generated from: src/VBox/Main/idl/VirtualBox.xidl
* Generator: src/VBox/Main/idl/apiwrap-server.xsl
*/
/**
* Copyright (C) 2010-2014 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* you can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) 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.
*/
#ifndef TokenWrap_H_
#define TokenWrap_H_
#include "VirtualBoxBase.h"
#include "Wrapper.h"
class ATL_NO_VTABLE TokenWrap:
public VirtualBoxBase,
VBOX_SCRIPTABLE_IMPL(IToken)
{
Q_OBJECT
public:
VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(TokenWrap, IToken)
DECLARE_NOT_AGGREGATABLE(TokenWrap)
DECLARE_PROTECT_FINAL_CONSTRUCT()
BEGIN_COM_MAP(TokenWrap)
COM_INTERFACE_ENTRY(ISupportErrorInfo)
COM_INTERFACE_ENTRY(IToken)
COM_INTERFACE_ENTRY2(IDispatch, IToken)
END_COM_MAP()
DECLARE_EMPTY_CTOR_DTOR(TokenWrap)
// public IToken properties
// public IToken methods
STDMETHOD(Abandon)();
STDMETHOD(Dummy)();
private:
// wrapped IToken properties
// wrapped IToken methods
virtual HRESULT abandon(AutoCaller &aAutoCaller) = 0;
virtual HRESULT dummy() = 0;
};
#endif // !TokenWrap_H_

View File

@ -0,0 +1,41 @@
#include "EventImpl.h"
void fireStateChangedEvent(IEventSource* aSource, MachineState_T a_state);
void fireRuntimeErrorEvent(IEventSource* aSource, BOOL a_fatal, CBSTR a_id,
CBSTR a_message);
void fireGuestMonitorChangedEvent(IEventSource* aSource,
GuestMonitorChangedEventType_T a_changeType,
ULONG a_screenId, ULONG a_originX,
ULONG a_originY, ULONG a_width,
ULONG a_height);
void fireHostPCIDevicePlugEvent(IEventSource* aSource, CBSTR a_machineId,
BOOL a_plugged, BOOL a_success,
IPCIDeviceAttachment* a_attachment,
CBSTR a_message);
void fireNATRedirectEvent(IEventSource* aSource, CBSTR a_machineId,
ULONG a_slot, BOOL a_remove, CBSTR a_name,
NATProtocol_T a_proto, CBSTR a_hostIP,
LONG a_hostPort, CBSTR a_guestIP, LONG a_guestPort);
void fireNATNetworkChangedEvent(IEventSource* aSource, CBSTR a_networkName);
void fireNATNetworkStartStopEvent(IEventSource* aSource, CBSTR a_networkName,
BOOL a_startEvent);
void fireNATNetworkSettingEvent(IEventSource* aSource, CBSTR a_networkName,
BOOL a_enabled, CBSTR a_network,
CBSTR a_gateway,
BOOL a_advertiseDefaultIPv6RouteEnabled,
BOOL a_needDhcpServer);
void fireNATNetworkPortForwardEvent(IEventSource* aSource, CBSTR a_networkName,
BOOL a_create, BOOL a_ipv6, CBSTR a_name,
NATProtocol_T a_proto, CBSTR a_hostIp,
LONG a_hostPort, CBSTR a_guestIp,
LONG a_guestPort);
void fireHostNameResolutionConfigurationChangeEvent(IEventSource* aSource);

View File

@ -3,18 +3,17 @@
#include <base/printf.h>
#include <iprt/asm.h>
#include <iprt/cdefs.h>
#include <iprt/thread.h>
#include <list>
#include <map>
#include "VBox/com/defs.h"
#include "VBox/com/ptr.h"
#include "VBox/com/string.h"
#include "VBox/com/AutoLock.h"
#include "VBox/com/string.h"
#include "VBox/com/Guid.h"
#include "VBox/com/VirtualBox.h"
namespace com
{
@ -24,12 +23,30 @@ namespace com
using namespace com;
using namespace util;
class AutoInitSpan;
class AutoUninitSpan;
class VirtualBox;
class Machine;
class Medium;
typedef std::list<ComObjPtr<Medium> > MediaList;
typedef std::list<Utf8Str> StringsList;
class VirtualBoxBase : public util::Lockable {
class VirtualBoxTranslatable : public util::Lockable
{
public:
/* should be used for translations */
inline static const char *tr(const char *pcszSourceText,
const char *aComment = NULL)
{
return pcszSourceText;
}
};
class VirtualBoxBase : public VirtualBoxTranslatable
{
public:
@ -88,15 +105,9 @@ class VirtualBoxBase : public util::Lockable {
virtual const char* getComponentName() const = 0;
/* should be used for translations */
inline static const char *tr(const char *pcszSourceText,
const char *aComment = NULL)
{
return pcszSourceText;
}
static HRESULT handleUnexpectedExceptions(VirtualBoxBase *const aThis, RT_SRC_POS_DECL);
static HRESULT initializeComForThread(void);
static void uninitializeComForThread(void);
static void clearError(void);
HRESULT setError(HRESULT aResultCode);
@ -118,10 +129,19 @@ class VirtualBoxBase : public util::Lockable {
RWLockHandle * lockHandle() const;
};
class VirtualBoxTranslatable : public util::Lockable { };
/**
* Dummy macro that is used to shut down Qt's lupdate tool warnings in some
* situations. This macro needs to be present inside (better at the very
* beginning) of the declaration of the class that inherits from
* VirtualBoxTranslatable, to make lupdate happy.
*/
#define Q_OBJECT
template <typename T>
class Shareable {
class Shareable
{
private:
@ -153,7 +173,8 @@ class Shareable {
};
template <typename T>
class Backupable : public Shareable<T> {
class Backupable : public Shareable<T>
{
public:
@ -410,8 +431,9 @@ class Backupable : public Shareable<T> {
} while (0)
#define DECLARE_EMPTY_CTOR_DTOR(X) public: X(); ~X();
#define DEFINE_EMPTY_CTOR_DTOR(X) X::X() {} X::~X() {}
#define VIRTUALBOXBASE_ADD_VIRTUAL_COMPONENT_METHODS(cls, iface) \

View File

@ -0,0 +1,6 @@
#include "dummy/macros.h"
#include "VirtualBoxErrorInfoImpl.h"
HRESULT VirtualBoxErrorInfo::init(HRESULT, const GUID &, const char *,
const Utf8Str &, IVirtualBoxErrorInfo *) DUMMY(E_FAIL)

View File

@ -0,0 +1,49 @@
#ifndef ____H_VIRTUALBOXERRORINFO
#define ____H_VIRTUALBOXERRORINFO
#include <VirtualBoxBase.h>
class VirtualBoxErrorInfo :
public VirtualBoxBase,
VBOX_SCRIPTABLE_IMPL(IVirtualBoxErrorInfo)
{
public:
VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(VirtualBoxErrorInfo, IVirtualBoxErrorInfo)
DECLARE_NOT_AGGREGATABLE(VirtualBoxErrorInfo)
DECLARE_PROTECT_FINAL_CONSTRUCT()
BEGIN_COM_MAP(VirtualBoxErrorInfo)
COM_INTERFACE_ENTRY(IErrorInfo)
COM_INTERFACE_ENTRY(IVirtualBoxErrorInfo)
COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()
HRESULT init(HRESULT aResultCode, const GUID &aIID,
const char *pcszComponent, const com::Utf8Str &strText,
IVirtualBoxErrorInfo *aNext = NULL);
HRESULT FinalConstruct() { return S_OK; }
/* readonly attribute long resultCode; */
HRESULT GetResultCode(PRInt32 *aResultCode) { return S_OK; }
/* readonly attribute long resultDetail; */
HRESULT GetResultDetail(PRInt32 *aResultDetail) { return S_OK; }
/* readonly attribute wstring interfaceID; */
HRESULT GetInterfaceID(PRUnichar * *aInterfaceID) { return S_OK; }
/* readonly attribute wstring component; */
HRESULT GetComponent(PRUnichar * *aComponent) { return S_OK; }
/* readonly attribute wstring text; */
HRESULT GetText(PRUnichar * *aText) { return S_OK; }
/* readonly attribute IVirtualBoxErrorInfo next; */
HRESULT GetNext(IVirtualBoxErrorInfo * *aNext) { return S_OK; }
};
#endif /* ____H_VIRTUALBOXERRORINFO */

View File

@ -4,27 +4,14 @@
#include "ConsoleImpl.h"
#include "MachineImpl.h"
#include "MouseImpl.h"
#include "dummy/macros.h"
#include "console.h"
static const bool debug = false;
#define DUMMY(X) \
{ \
PERR("%s called (%s), not implemented, eip=%p", __func__, __FILE__, \
__builtin_return_address(0)); \
while (1) \
asm volatile ("ud2a"); \
\
return X; \
}
#define TRACE(X) \
{ \
if (debug) \
PDBG(" called (%s) - eip=%p", __FILE__, \
__builtin_return_address(0)); \
return X; \
}
void Console::uninit() DUMMY()
HRESULT Console::resume(Reason_T aReason) DUMMY(E_FAIL)
HRESULT Console::pause(Reason_T aReason) DUMMY(E_FAIL)
@ -45,19 +32,21 @@ HRESULT Console::attachToTapInterface(INetworkAdapter *networkAdapter)
TRACE(S_OK)
}
HRESULT Console::teleporterTrg(UVM*, Machine*, com::Utf8Str*, bool, Progress*,
HRESULT Console::teleporterTrg(PUVM, IMachine*, com::Utf8Str*, bool, Progress*,
bool*) DUMMY(E_FAIL)
HRESULT Console::detachFromTapInterface(INetworkAdapter *networkAdapter) DUMMY(E_FAIL)
HRESULT Console::saveState(Reason_T aReason, IProgress **aProgress) DUMMY(E_FAIL)
HRESULT Console::get_Debugger(MachineDebugger**) DUMMY(E_FAIL)
HRESULT Console::get_USBDevices(unsigned int*, IUSBDevice***) DUMMY(E_FAIL)
HRESULT Console::get_RemoteUSBDevices(unsigned int*, IHostUSBDevice***) DUMMY(E_FAIL)
HRESULT Console::get_VRDEServerInfo(VRDEServerInfo**) DUMMY(E_FAIL)
HRESULT Console::get_SharedFolders(unsigned int*, SharedFolder***) DUMMY(E_FAIL)
HRESULT Console::get_AttachedPCIDevices(unsigned int*, PCIDeviceAttachment***) DUMMY(E_FAIL)
HRESULT Console::get_UseHostClipboard(bool*) DUMMY(E_FAIL)
HRESULT Console::set_UseHostClipboard(bool) DUMMY(E_FAIL)
HRESULT Console::get_EmulatedUSB(EmulatedUSB**) DUMMY(E_FAIL)
STDMETHODIMP Console::COMGETTER(Debugger)(IMachineDebugger **aDebugger) DUMMY(E_FAIL)
STDMETHODIMP Console::COMGETTER(USBDevices)(ComSafeArrayOut(IUSBDevice *, aUSBDevices)) DUMMY(E_FAIL)
STDMETHODIMP Console::COMGETTER(RemoteUSBDevices)(ComSafeArrayOut(IHostUSBDevice *, aRemoteUSBDevices)) DUMMY(E_FAIL)
STDMETHODIMP Console::COMGETTER(VRDEServerInfo)(IVRDEServerInfo **aVRDEServerInfo) DUMMY(E_FAIL)
STDMETHODIMP Console::COMGETTER(EmulatedUSB)(IEmulatedUSB **aEmulatedUSB) DUMMY(E_FAIL)
STDMETHODIMP Console::COMGETTER(SharedFolders)(ComSafeArrayOut(ISharedFolder *, aSharedFolders)) DUMMY(E_FAIL)
STDMETHODIMP Console::COMGETTER(AttachedPCIDevices)(ComSafeArrayOut(IPCIDeviceAttachment *, aAttachments)) DUMMY(E_FAIL)
STDMETHODIMP Console::COMGETTER(UseHostClipboard)(BOOL *aUseHostClipboard) DUMMY(E_FAIL)
STDMETHODIMP Console::COMSETTER(UseHostClipboard)(BOOL aUseHostClipboard) DUMMY(E_FAIL)
HRESULT Console::Reset() DUMMY(E_FAIL)
HRESULT Console::Pause() DUMMY(E_FAIL)
HRESULT Console::Resume() DUMMY(E_FAIL)
@ -65,25 +54,22 @@ HRESULT Console::PowerButton()
HRESULT Console::SleepButton() DUMMY(E_FAIL)
HRESULT Console::GetPowerButtonHandled(bool*) DUMMY(E_FAIL)
HRESULT Console::GetGuestEnteredACPIMode(bool*) DUMMY(E_FAIL)
HRESULT Console::SaveState(Progress**) DUMMY(E_FAIL)
HRESULT Console::AdoptSavedState(unsigned short*) DUMMY(E_FAIL)
HRESULT Console::SaveState(IProgress**) DUMMY(E_FAIL)
HRESULT Console::AdoptSavedState(IN_BSTR) DUMMY(E_FAIL)
HRESULT Console::DiscardSavedState(bool) DUMMY(E_FAIL)
HRESULT Console::GetDeviceActivity(DeviceType_T, DeviceActivity_T*) DUMMY(E_FAIL)
HRESULT Console::AttachUSBDevice(unsigned short*) DUMMY(E_FAIL)
HRESULT Console::DetachUSBDevice(unsigned short*, IUSBDevice**) DUMMY(E_FAIL)
HRESULT Console::FindUSBDeviceByAddress(unsigned short*, IUSBDevice**) DUMMY(E_FAIL)
HRESULT Console::FindUSBDeviceById(unsigned short*, IUSBDevice**) DUMMY(E_FAIL)
HRESULT Console::CreateSharedFolder(unsigned short*, unsigned short*, bool,
bool) DUMMY(E_FAIL)
HRESULT Console::RemoveSharedFolder(unsigned short*) DUMMY(E_FAIL)
HRESULT Console::TakeSnapshot(unsigned short*, unsigned short*, Progress**) DUMMY(E_FAIL)
HRESULT Console::DeleteSnapshot(unsigned short*, Progress**) DUMMY(E_FAIL)
HRESULT Console::DeleteSnapshotAndAllChildren(unsigned short*, Progress**) DUMMY(E_FAIL)
HRESULT Console::DeleteSnapshotRange(unsigned short*, unsigned short*,
Progress**) DUMMY(E_FAIL)
HRESULT Console::RestoreSnapshot(Snapshot*, Progress**) DUMMY(E_FAIL)
HRESULT Console::Teleport(unsigned short*, unsigned int, unsigned short*,
unsigned int, Progress**) DUMMY(E_FAIL)
HRESULT Console::AttachUSBDevice(IN_BSTR) DUMMY(E_FAIL)
HRESULT Console::DetachUSBDevice(IN_BSTR, IUSBDevice**) DUMMY(E_FAIL)
HRESULT Console::FindUSBDeviceByAddress(IN_BSTR, IUSBDevice**) DUMMY(E_FAIL)
HRESULT Console::FindUSBDeviceById(IN_BSTR, IUSBDevice**) DUMMY(E_FAIL)
HRESULT Console::CreateSharedFolder(IN_BSTR, IN_BSTR, BOOL, BOOL) DUMMY(E_FAIL)
HRESULT Console::RemoveSharedFolder(IN_BSTR) DUMMY(E_FAIL)
HRESULT Console::TakeSnapshot(IN_BSTR, IN_BSTR, IProgress**) DUMMY(E_FAIL)
HRESULT Console::DeleteSnapshot(IN_BSTR, IProgress**) DUMMY(E_FAIL)
HRESULT Console::DeleteSnapshotAndAllChildren(IN_BSTR, IProgress**) DUMMY(E_FAIL)
HRESULT Console::DeleteSnapshotRange(IN_BSTR, IN_BSTR, IProgress**) DUMMY(E_FAIL)
HRESULT Console::RestoreSnapshot(ISnapshot*, IProgress**) DUMMY(E_FAIL)
HRESULT Console::Teleport(IN_BSTR, ULONG, IN_BSTR, ULONG, IProgress **) DUMMY(E_FAIL)
HRESULT Console::setDiskEncryptionKeys(const Utf8Str &strCfg) DUMMY(E_FAIL)
void Console::onAdditionsStateChange() TRACE()
@ -111,3 +97,175 @@ HRESULT Console::onParallelPortChange(IParallelPort *aParallelPort)
HRESULT Console::onlineMergeMedium(IMediumAttachment *aMediumAttachment,
ULONG aSourceIdx, ULONG aTargetIdx,
IProgress *aProgress) DUMMY(E_FAIL)
void fireStateChangedEvent(IEventSource* aSource,
MachineState_T a_state) TRACE()
void fireRuntimeErrorEvent(IEventSource* aSource, BOOL a_fatal,
CBSTR a_id, CBSTR a_message)
{
PERR("%s : %u %s %s", __func__, a_fatal,
Utf8Str(a_id).c_str(), Utf8Str(a_message).c_str());
TRACE();
}
void GenodeConsole::eventWait(IKeyboard * gKeyboard, IMouse * gMouse)
{
static LONG64 mt_events [64];
unsigned mt_number = 0;
_receiver.wait_for_signal();
/* read out input capabilities of guest */
bool guest_abs = false, guest_rel = false, guest_multi = false;
gMouse->COMGETTER(AbsoluteSupported)(&guest_abs);
gMouse->COMGETTER(RelativeSupported)(&guest_rel);
gMouse->COMGETTER(MultiTouchSupported)(&guest_multi);
for (int i = 0, num_ev = _input.flush(); i < num_ev; ++i) {
Input::Event &ev = _ev_buf[i];
bool const is_press = ev.type() == Input::Event::PRESS;
bool const is_release = ev.type() == Input::Event::RELEASE;
bool const is_key = is_press || is_release;
bool const is_motion = ev.type() == Input::Event::MOTION;
bool const is_wheel = ev.type() == Input::Event::WHEEL;
bool const is_touch = ev.type() == Input::Event::TOUCH;
if (is_key) {
Scan_code scan_code(ev.keycode());
unsigned char const release_bit =
(ev.type() == Input::Event::RELEASE) ? 0x80 : 0;
if (scan_code.is_normal())
gKeyboard->PutScancode(scan_code.code() | release_bit);
if (scan_code.is_ext()) {
gKeyboard->PutScancode(0xe0);
gKeyboard->PutScancode(scan_code.ext() | release_bit);
}
}
/*
* Track press/release status of keys and buttons. Currently,
* only the mouse-button states are actually used.
*/
if (is_press)
_key_status[ev.keycode()] = true;
if (is_release)
_key_status[ev.keycode()] = false;
bool const is_mouse_button_event =
is_key && _is_mouse_button(ev.keycode());
bool const is_mouse_event = is_mouse_button_event || is_motion;
if (is_mouse_event) {
unsigned const buttons = (_key_status[Input::BTN_LEFT] ? MouseButtonState_LeftButton : 0)
| (_key_status[Input::BTN_RIGHT] ? MouseButtonState_RightButton : 0)
| (_key_status[Input::BTN_MIDDLE] ? MouseButtonState_MiddleButton : 0);
if (ev.is_absolute_motion()) {
_last_received_motion_event_was_absolute = true;
/* transform absolute to relative if guest is so odd */
if (!guest_abs && guest_rel) {
int const boundary = 20;
int rx = ev.ax() - _ax;
int ry = ev.ay() - _ay;
rx = Genode::min(boundary, Genode::max(-boundary, rx));
ry = Genode::min(boundary, Genode::max(-boundary, ry));
gMouse->PutMouseEvent(rx, ry, 0, 0, buttons);
} else
gMouse->PutMouseEventAbsolute(ev.ax(), ev.ay(), 0,
0, buttons);
_ax = ev.ax();
_ay = ev.ay();
} else if (ev.is_relative_motion()) {
_last_received_motion_event_was_absolute = false;
/* prefer relative motion event */
if (guest_rel)
gMouse->PutMouseEvent(ev.rx(), ev.ry(), 0, 0, buttons);
else if (guest_abs) {
_ax += ev.rx();
_ay += ev.ry();
gMouse->PutMouseEventAbsolute(_ax, _ay, 0, 0, buttons);
}
}
/* only the buttons changed */
else {
if (_last_received_motion_event_was_absolute) {
/* prefer absolute button event */
if (guest_abs)
gMouse->PutMouseEventAbsolute(_ax, _ay, 0, 0, buttons);
else if (guest_rel)
gMouse->PutMouseEvent(0, 0, 0, 0, buttons);
} else {
/* prefer relative button event */
if (guest_rel)
gMouse->PutMouseEvent(0, 0, 0, 0, buttons);
else if (guest_abs)
gMouse->PutMouseEventAbsolute(_ax, _ay, 0, 0, buttons);
}
}
}
if (is_wheel)
gMouse->PutMouseEvent(0, 0, ev.rx(), ev.ry(), 0);
if (is_touch) {
/* if multitouch queue is full - send it */
if (mt_number >= sizeof(mt_events) / sizeof(mt_events[0])) {
gMouse->PutEventMultiTouch(mt_number, mt_number,
mt_events, RTTimeMilliTS());
mt_number = 0;
}
int x = ev.ax();
int y = ev.ay();
int slot = ev.code();
/* Mouse::putEventMultiTouch drops values of 0 */
if (x <= 0) x = 1;
if (y <= 0) y = 1;
enum MultiTouch {
None = 0x0,
InContact = 0x01,
InRange = 0x02
};
int status = MultiTouch::InContact | MultiTouch::InRange;
if (ev.is_touch_release())
status = MultiTouch::None;
uint16_t const s = RT_MAKE_U16(slot, status);
mt_events[mt_number++] = RT_MAKE_U64_FROM_U16(x, y, s, 0);
}
}
/* if there are elements - send it */
if (mt_number)
gMouse->PutEventMultiTouch(mt_number, mt_number, mt_events,
RTTimeMilliTS());
}
void GenodeConsole::onMouseCapabilityChange(BOOL supportsAbsolute, BOOL supportsRelative,
BOOL supportsMT, BOOL needsHostCursor)
{
if (supportsAbsolute) {
/* let the guest hide the software cursor */
Mouse *gMouse = getMouse();
gMouse->PutMouseEventAbsolute(-1, -1, 0, 0, 0);
}
}

View File

@ -144,165 +144,10 @@ class GenodeConsole : public Console {
_input.sigh(_receiver.manage(&_context));
}
void eventWait(IKeyboard * gKeyboard, IMouse * gMouse)
{
static LONG64 mt_events [64];
unsigned mt_number = 0;
_receiver.wait_for_signal();
/* read out input capabilities of guest */
bool guest_abs = false, guest_rel = false, guest_multi = false;
gMouse->COMGETTER(AbsoluteSupported)(&guest_abs);
gMouse->COMGETTER(RelativeSupported)(&guest_rel);
gMouse->COMGETTER(MultiTouchSupported)(&guest_multi);
for (int i = 0, num_ev = _input.flush(); i < num_ev; ++i) {
Input::Event &ev = _ev_buf[i];
bool const is_press = ev.type() == Input::Event::PRESS;
bool const is_release = ev.type() == Input::Event::RELEASE;
bool const is_key = is_press || is_release;
bool const is_motion = ev.type() == Input::Event::MOTION;
bool const is_wheel = ev.type() == Input::Event::WHEEL;
bool const is_touch = ev.type() == Input::Event::TOUCH;
if (is_key) {
Scan_code scan_code(ev.keycode());
unsigned char const release_bit =
(ev.type() == Input::Event::RELEASE) ? 0x80 : 0;
if (scan_code.is_normal())
gKeyboard->PutScancode(scan_code.code() | release_bit);
if (scan_code.is_ext()) {
gKeyboard->PutScancode(0xe0);
gKeyboard->PutScancode(scan_code.ext() | release_bit);
}
}
/*
* Track press/release status of keys and buttons. Currently,
* only the mouse-button states are actually used.
*/
if (is_press)
_key_status[ev.keycode()] = true;
if (is_release)
_key_status[ev.keycode()] = false;
bool const is_mouse_button_event =
is_key && _is_mouse_button(ev.keycode());
bool const is_mouse_event = is_mouse_button_event || is_motion;
if (is_mouse_event) {
unsigned const buttons = (_key_status[Input::BTN_LEFT] ? MouseButtonState_LeftButton : 0)
| (_key_status[Input::BTN_RIGHT] ? MouseButtonState_RightButton : 0)
| (_key_status[Input::BTN_MIDDLE] ? MouseButtonState_MiddleButton : 0);
if (ev.is_absolute_motion()) {
_last_received_motion_event_was_absolute = true;
/* transform absolute to relative if guest is so odd */
if (!guest_abs && guest_rel) {
int const boundary = 20;
int rx = ev.ax() - _ax;
int ry = ev.ay() - _ay;
rx = Genode::min(boundary, Genode::max(-boundary, rx));
ry = Genode::min(boundary, Genode::max(-boundary, ry));
gMouse->PutMouseEvent(rx, ry, 0, 0, buttons);
} else
gMouse->PutMouseEventAbsolute(ev.ax(), ev.ay(), 0,
0, buttons);
_ax = ev.ax();
_ay = ev.ay();
} else if (ev.is_relative_motion()) {
_last_received_motion_event_was_absolute = false;
/* prefer relative motion event */
if (guest_rel)
gMouse->PutMouseEvent(ev.rx(), ev.ry(), 0, 0, buttons);
else if (guest_abs) {
_ax += ev.rx();
_ay += ev.ry();
gMouse->PutMouseEventAbsolute(_ax, _ay, 0, 0, buttons);
}
}
/* only the buttons changed */
else {
if (_last_received_motion_event_was_absolute) {
/* prefer absolute button event */
if (guest_abs)
gMouse->PutMouseEventAbsolute(_ax, _ay, 0, 0, buttons);
else if (guest_rel)
gMouse->PutMouseEvent(0, 0, 0, 0, buttons);
} else {
/* prefer relative button event */
if (guest_rel)
gMouse->PutMouseEvent(0, 0, 0, 0, buttons);
else if (guest_abs)
gMouse->PutMouseEventAbsolute(_ax, _ay, 0, 0, buttons);
}
}
}
if (is_wheel)
gMouse->PutMouseEvent(0, 0, ev.rx(), ev.ry(), 0);
if (is_touch) {
/* if multitouch queue is full - send it */
if (mt_number >= sizeof(mt_events) / sizeof(mt_events[0])) {
gMouse->PutEventMultiTouch(mt_number, mt_number,
mt_events, RTTimeMilliTS());
mt_number = 0;
}
int x = ev.ax();
int y = ev.ay();
int slot = ev.code();
/* Mouse::putEventMultiTouch drops values of 0 */
if (x <= 0) x = 1;
if (y <= 0) y = 1;
enum MultiTouch {
None = 0x0,
InContact = 0x01,
InRange = 0x02
};
int status = MultiTouch::InContact | MultiTouch::InRange;
if (ev.is_touch_release())
status = MultiTouch::None;
uint16_t const s = RT_MAKE_U16(slot, status);
mt_events[mt_number++] = RT_MAKE_U64_FROM_U16(x, y, s, 0);
}
}
/* if there are elements - send it */
if (mt_number)
gMouse->PutEventMultiTouch(mt_number, mt_number, mt_events,
RTTimeMilliTS());
}
void eventWait(IKeyboard * gKeyboard, IMouse * gMouse);
void onMouseCapabilityChange(BOOL supportsAbsolute, BOOL supportsRelative,
BOOL supportsMT, BOOL needsHostCursor)
{
if (supportsAbsolute) {
/* let the guest hide the software cursor */
Mouse *gMouse = getMouse();
gMouse->PutMouseEventAbsolute(-1, -1, 0, 0, 0);
}
}
BOOL supportsMT, BOOL needsHostCursor);
void onMousePointerShapeChange(bool fVisible, bool fAlpha,
uint32_t xHot, uint32_t yHot,

View File

@ -1,27 +1,13 @@
#include <base/printf.h>
#include "VirtualBoxBase.h"
#include "dummy/macros.h"
#include "AutostartDb.h"
static bool debug = false;
#define TRACE(X) \
{ \
if (debug) \
PDBG(" called (%s) - eip=%p", __FILE__, \
__builtin_return_address(0)); \
return X; \
}
#define DUMMY(X) \
{ \
PERR("%s called (%s), not implemented, eip=%p", __func__, __FILE__, \
__builtin_return_address(0)); \
while (1) \
asm volatile ("ud2a"); \
\
return X; \
}
int AutostartDb::addAutostartVM(const char *pszVMId) DUMMY(-1)
int AutostartDb::addAutostopVM(char const*) DUMMY(-1)

View File

@ -1,31 +1,16 @@
#include <base/printf.h>
#include "VirtualBoxBase.h"
#include "dummy/macros.h"
#include <VBox/com/ErrorInfo.h>
static bool debug = false;
#define TRACE(X) \
{ \
if (debug) \
PDBG(" called (%s) - eip=%p", __FILE__, \
__builtin_return_address(0)); \
return X; \
}
#define DUMMY(X) \
{ \
PERR("%s called (%s), not implemented, eip=%p", __func__, __FILE__, \
__builtin_return_address(0)); \
while (1) \
asm volatile ("ud2a"); \
\
return X; \
}
void ErrorInfo::init(bool aKeepObj) TRACE()
void ErrorInfo::cleanup() TRACE()
HRESULT ErrorInfoKeeper::restore() TRACE(S_OK)
void ErrorInfo::copyFrom(const ErrorInfo &x) DUMMY()

View File

@ -4,26 +4,12 @@
#include <VBox/usbfilter.h>
#include "dummy/macros.h"
#include "HostImpl.h"
static bool debug = false;
#define TRACE(X) \
{ \
if (debug) \
PDBG(" called (%s) - eip=%p", __FILE__, \
__builtin_return_address(0)); \
return X; \
}
#define DUMMY(X) \
{ \
PERR("%s called (%s:%u), not implemented, eip=%p", __func__, \
__FILE__, __LINE__, \
__builtin_return_address(0)); \
while (1) \
asm volatile ("ud2a"); \
\
return X; \
}
STDMETHODIMP Host::COMGETTER(DVDDrives)(ComSafeArrayOut(IMedium *, drives)) DUMMY(E_FAIL)
STDMETHODIMP Host::COMGETTER(FloppyDrives)(ComSafeArrayOut(IMedium *, drives)) DUMMY(E_FAIL)

View File

@ -0,0 +1,35 @@
#ifndef ____H_MACROS
#define ____H_MACROS
#include <base/printf.h>
#define TRACE(X) \
{ \
if (debug) \
PDBG(" called (%s) - eip=%p", __FILE__, \
__builtin_return_address(0)); \
return X; \
}
#define DUMMY(X) \
{ \
PERR("%s called (%s:%u), not implemented, eip=%p", __func__, __FILE__, __LINE__, \
__builtin_return_address(0)); \
while (1) \
asm volatile ("ud2a"); \
\
return X; \
}
#define DUMMY_STATIC(X) \
{ \
static X dummy; \
PERR("%s called (%s), not implemented, eip=%p", __func__, __FILE__, \
__builtin_return_address(0)); \
while (1) \
asm volatile ("ud2a"); \
\
return dummy; \
}
#endif /* ____H_MACROS */

View File

@ -1,70 +1,144 @@
#include <base/printf.h>
#include "VirtualBoxBase.h"
#include "ClientToken.h"
#include "TokenImpl.h"
#include "ProgressProxyImpl.h"
#include "SharedFolderImpl.h"
#include <VBox/usbfilter.h>
#include "USBProxyService.h"
#include "dummy/macros.h"
static bool debug = false;
#define TRACE(X) \
{ \
if (debug) \
PDBG(" called (%s) - eip=%p", __FILE__, \
__builtin_return_address(0)); \
return X; \
}
#define DUMMY(X) \
{ \
PERR("%s called (%s:%u), not implemented, eip=%p", __func__, \
__FILE__, __LINE__, \
__builtin_return_address(0)); \
while (1) \
asm volatile ("ud2a"); \
\
return X; \
}
/* ApplianceImplExport.cpp */
#define DUMMY_STATIC(X) \
{ \
static X dummy; \
PERR("%s called (%s), not implemented, eip=%p", __func__, __FILE__, \
__builtin_return_address(0)); \
while (1) \
asm volatile ("ud2a"); \
\
return dummy; \
}
/* static */
const Guid Guid::Empty;
HRESULT IMediumFormat::get_Capabilities(unsigned int*,
MediumFormatCapabilities_T**) DUMMY(E_FAIL)
#include "MachineImpl.h"
HRESULT Machine::ExportTo(IAppliance *aAppliance, IN_BSTR location,
IVirtualSystemDescription **aDescription) DUMMY(E_FAIL)
/* com.cpp */
#include "VBox/com/Guid.h"
const com::Guid com::Guid::Empty;
/* DisplayImpl.cpp */
#include "DisplayImpl.h"
void fireGuestMonitorChangedEvent(IEventSource* aSource,
GuestMonitorChangedEventType_T a_changeType,
ULONG a_screenId,
ULONG a_originX,
ULONG a_originY,
ULONG a_width,
ULONG a_height) TRACE()
/* DisplayPNGUtil.cpp */
#include "DisplayImpl.h"
int DisplayMakePNG(uint8_t *, uint32_t, uint32_t, uint8_t **, uint32_t *,
uint32_t *, uint32_t *, uint8_t) DUMMY(-1)
ProgressErrorInfo::ProgressErrorInfo(Progress*) DUMMY()
HRESULT ProgressProxy::init(VirtualBox*, IUnknown*, unsigned short const*,
bool) DUMMY(E_FAIL)
HRESULT ProgressProxy::init(VirtualBox*, void*, unsigned short const*, bool,
unsigned int, unsigned short const*, unsigned int,
unsigned int) DUMMY(E_FAIL)
HRESULT ProgressProxy::notifyComplete(HRESULT) DUMMY(E_FAIL)
HRESULT ProgressProxy::notifyComplete(HRESULT, GUID const&, char const*,
char const*, ...) DUMMY(E_FAIL)
bool ProgressProxy::setOtherProgressObject(Progress*) DUMMY(false)
HRESULT ProgressProxy::FinalConstruct() DUMMY(E_FAIL)
/* ErrorInfo.cpp */
#include "VBox/com/ErrorInfo.h"
com::ProgressErrorInfo::ProgressErrorInfo(IProgress*) DUMMY()
/* EventImpl.cpp */
#include "EventImpl.h"
HRESULT VBoxEventDesc::init(IEventSource* aSource, VBoxEventType_T aType, ...) TRACE(S_OK)
HRESULT VBoxEventDesc::reinit(VBoxEventType_T aType, ...) TRACE(S_OK)
/* GuestCtrlImpl.cpp */
#include "GuestImpl.h"
STDMETHODIMP Guest::CreateSession(IN_BSTR, IN_BSTR, IN_BSTR, IN_BSTR,
IGuestSession **) DUMMY(E_FAIL)
STDMETHODIMP Guest::FindSession(IN_BSTR,
ComSafeArrayOut(IGuestSession *, aSessions)) DUMMY(E_FAIL)
STDMETHODIMP Guest::UpdateGuestAdditions(IN_BSTR,
ComSafeArrayIn(IN_BSTR, aArguments),
ComSafeArrayIn(AdditionsUpdateFlag_T, aFlags),
IProgress **aProgress) DUMMY(E_FAIL)
/* initterm.cpp */
#include "VBox/com/com.h"
HRESULT com::Initialize(bool fGui) TRACE(S_OK)
HRESULT com::Shutdown() DUMMY(E_FAIL)
/* MachineImpl.cpp */
#include "MachineImpl.h"
void fireHostPCIDevicePlugEvent(IEventSource* aSource,
CBSTR a_machineId,
BOOL a_plugged,
BOOL a_success,
IPCIDeviceAttachment* a_attachment,
CBSTR a_message) TRACE()
/* NATNetworkImpl.cpp */
#include "NetworkServiceRunner.h"
#include "NATNetworkImpl.h"
NATNetwork::NATNetwork() : mVirtualBox(nullptr) DUMMY()
NATNetwork::~NATNetwork() DUMMY()
STDMETHODIMP NATNetwork::COMGETTER(EventSource)(IEventSource **IEventSource) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMGETTER(Enabled)(BOOL *aEnabled) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMSETTER(Enabled)(BOOL aEnabled) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMGETTER(NetworkName)(BSTR *aName) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMSETTER(NetworkName)(IN_BSTR aName) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMGETTER(Gateway)(BSTR *aIPGateway) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMGETTER(Network)(BSTR *aIPNetwork) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMSETTER(Network)(IN_BSTR aIPNetwork) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMGETTER(IPv6Enabled)(BOOL *aEnabled) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMSETTER(IPv6Enabled)(BOOL aEnabled) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMGETTER(IPv6Prefix)(BSTR *aName) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMSETTER(IPv6Prefix)(IN_BSTR aName) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMGETTER(AdvertiseDefaultIPv6RouteEnabled)(BOOL *aEnabled) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMSETTER(AdvertiseDefaultIPv6RouteEnabled)(BOOL aEnabled) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMGETTER(NeedDhcpServer)(BOOL *aEnabled) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMSETTER(NeedDhcpServer)(BOOL aEnabled) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMGETTER(LocalMappings)(ComSafeArrayOut(BSTR, aLocalMappings)) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::AddLocalMapping(IN_BSTR aHostId, LONG aOffset) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMGETTER(LoopbackIp6)(LONG *aLoopbackIp6) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMSETTER(LoopbackIp6)(LONG aLoopbackIp6) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMGETTER(PortForwardRules4)(ComSafeArrayOut(BSTR, aPortForwardRules4)) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMGETTER(PortForwardRules6)(ComSafeArrayOut(BSTR, aPortForwardRules6)) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::AddPortForwardRule(BOOL aIsIpv6,
IN_BSTR aPortForwardRuleName,
NATProtocol_T aProto,
IN_BSTR aHostIp,
USHORT aHostPort,
IN_BSTR aGuestIp,
USHORT aGuestPort) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::RemovePortForwardRule(BOOL aIsIpv6, IN_BSTR aPortForwardRuleName) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::Start(IN_BSTR aTrunkType) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::Stop() DUMMY(E_FAIL)
HRESULT NATNetwork::init(VirtualBox *aVirtualBox, const settings::NATNetwork &) DUMMY(E_FAIL)
HRESULT NATNetwork::FinalConstruct() DUMMY(E_FAIL)
void NATNetwork::uninit() DUMMY()
/* ProgressProxyImpl.cpp */
#include "ProgressProxyImpl.h"
STDMETHODIMP ProgressProxy::Cancel() DUMMY(E_FAIL)
void ProgressProxy::clearOtherProgressObjectInternal(bool fEarly) DUMMY()
STDMETHODIMP ProgressProxy::COMGETTER(Cancelable)(BOOL *) DUMMY(E_FAIL)
STDMETHODIMP ProgressProxy::COMGETTER(Percent)(ULONG *) DUMMY(E_FAIL)
STDMETHODIMP ProgressProxy::COMGETTER(TimeRemaining)(LONG *) DUMMY(E_FAIL)
@ -77,160 +151,102 @@ STDMETHODIMP ProgressProxy::COMGETTER(OperationDescription)(BSTR *)
STDMETHODIMP ProgressProxy::COMGETTER(OperationPercent)(ULONG *) DUMMY(E_FAIL)
STDMETHODIMP ProgressProxy::COMSETTER(Timeout)(ULONG) DUMMY(E_FAIL)
STDMETHODIMP ProgressProxy::COMGETTER(Timeout)(ULONG *) DUMMY(E_FAIL)
STDMETHODIMP ProgressProxy::WaitForCompletion(LONG aTimeout) DUMMY(E_FAIL)
STDMETHODIMP ProgressProxy::WaitForOperationCompletion(ULONG, LONG) DUMMY(E_FAIL)
STDMETHODIMP ProgressProxy::Cancel() DUMMY(E_FAIL)
void ProgressProxy::copyProgressInfo(IProgress *pOtherProgress, bool fEarly) DUMMY()
HRESULT ProgressProxy::FinalConstruct() DUMMY(E_FAIL)
void ProgressProxy::FinalRelease() DUMMY()
HRESULT ProgressProxy::init(VirtualBox*, IUnknown*, unsigned short const*,
bool) DUMMY(E_FAIL)
HRESULT ProgressProxy::init(VirtualBox*, void*, unsigned short const*, bool,
unsigned int, unsigned short const*, unsigned int,
unsigned int) DUMMY(E_FAIL)
HRESULT ProgressProxy::notifyComplete(HRESULT) DUMMY(E_FAIL)
HRESULT ProgressProxy::notifyComplete(HRESULT, GUID const&, char const*,
char const*, ...) DUMMY(E_FAIL)
STDMETHODIMP ProgressProxy::SetCurrentOperationProgress(ULONG aPercent) DUMMY(E_FAIL)
STDMETHODIMP ProgressProxy::SetNextOperation(IN_BSTR, ULONG) DUMMY(E_FAIL)
void ProgressProxy::clearOtherProgressObjectInternal(bool fEarly) DUMMY()
void ProgressProxy::copyProgressInfo(IProgress *pOtherProgress, bool fEarly) DUMMY()
bool ProgressProxy::setOtherProgressObject(IProgress*) DUMMY(false)
void ProgressProxy::uninit() DUMMY()
void ProgressProxy::FinalRelease() DUMMY()
template<>
void DummyClass<VirtualBox>::fireNATRedirectEvent(ComObjPtr<EventSource> const&,
unsigned short*,
unsigned int&, bool&,
unsigned short*&,
NATProtocol_T&,
unsigned short*&,
unsigned short&,
unsigned short*&,
unsigned short&) DUMMY()
template<>
void DummyClass<Console>::fireStateChangedEvent(ComObjPtr<EventSource> const&,
MachineState_T) TRACE()
template<>
void DummyClass<Console>::fireRuntimeErrorEvent(ComObjPtr<EventSource> const&,
bool aFatal, IN_BSTR aErrorID,
IN_BSTR aMessage)
{
PERR("%s : %u %s %s", __func__, aFatal,
Utf8Str(aErrorID).c_str(), Utf8Str(aMessage).c_str());
TRACE();
}
template<>
void DummyClass<Machine>::fireHostPCIDevicePlugEvent(ComPtr<EventSource>&,
unsigned short*, bool,
bool, ComObjPtr<PCIDeviceAttachment>&,
void*) DUMMY()
NATNetwork::NATNetwork() : mVirtualBox(nullptr) DUMMY()
void NATNetwork::uninit() DUMMY()
HRESULT NATNetwork::init(VirtualBox *aVirtualBox, IN_BSTR aName) DUMMY(E_FAIL)
HRESULT NATNetwork::init(VirtualBox *aVirtualBox, const settings::NATNetwork &) DUMMY(E_FAIL)
HRESULT NATNetwork::FinalConstruct() DUMMY(E_FAIL)
HRESULT NATNetwork::saveSettings(settings::NATNetwork &data) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMGETTER(EventSource)(IEventSource **IEventSource) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMGETTER(Enabled)(BOOL *aEnabled) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMSETTER(Enabled)(BOOL aEnabled) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMGETTER(NetworkName)(BSTR *aName) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMSETTER(NetworkName)(IN_BSTR aName) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMGETTER(Gateway)(BSTR *aIPGateway) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMGETTER(Network)(BSTR *aIPNetwork) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMSETTER(Network)(IN_BSTR aIPNetwork) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMGETTER(IPv6Enabled)(BOOL *aEnabled) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMSETTER(IPv6Enabled)(BOOL aEnabled) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMGETTER(IPv6Prefix)(BSTR *aName) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMSETTER(IPv6Prefix)(IN_BSTR aName) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMGETTER(AdvertiseDefaultIPv6RouteEnabled)(BOOL *aEnabled) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMSETTER(AdvertiseDefaultIPv6RouteEnabled)(BOOL aEnabled) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMGETTER(NeedDhcpServer)(BOOL *aEnabled) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMSETTER(NeedDhcpServer)(BOOL aEnabled) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMGETTER(LocalMappings)(ComSafeArrayOut(BSTR, aLocalMappings)) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::AddLocalMapping(IN_BSTR aHostId, LONG aOffset) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMGETTER(LoopbackIp6)(LONG *aLoopbackIp6) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMSETTER(LoopbackIp6)(LONG aLoopbackIp6) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMGETTER(PortForwardRules4)(ComSafeArrayOut(BSTR, aPortForwardRules4)) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::COMGETTER(PortForwardRules6)(ComSafeArrayOut(BSTR, aPortForwardRules6)) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::AddPortForwardRule(BOOL aIsIpv6,
IN_BSTR aPortForwardRuleName,
NATProtocol_T aProto,
IN_BSTR aHostIp,
USHORT aHostPort,
IN_BSTR aGuestIp,
USHORT aGuestPort) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::RemovePortForwardRule(BOOL aIsIpv6, IN_BSTR aPortForwardRuleName) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::Start(IN_BSTR aTrunkType) DUMMY(E_FAIL)
STDMETHODIMP NATNetwork::Stop() DUMMY(E_FAIL)
STDMETHODIMP ProgressProxy::WaitForCompletion(LONG aTimeout) DUMMY(E_FAIL)
STDMETHODIMP ProgressProxy::WaitForOperationCompletion(ULONG, LONG) DUMMY(E_FAIL)
HRESULT com::Shutdown() DUMMY(E_FAIL)
/* SharedFolderImpl.cpp */
void Display::fireGuestMonitorChangedEvent(EventSource*, GuestMonitorChangedEventType, int, int, int, int, int) DUMMY()
#include "SharedFolderImpl.h"
STDMETHODIMP Guest::UpdateGuestAdditions(IN_BSTR,
ComSafeArrayIn(IN_BSTR, aArguments),
ComSafeArrayIn(AdditionsUpdateFlag_T, aFlags),
IProgress **aProgress) DUMMY(E_FAIL)
STDMETHODIMP Guest::FindSession(IN_BSTR,
ComSafeArrayOut(IGuestSession *, aSessions)) DUMMY(E_FAIL)
STDMETHODIMP Guest::CreateSession(IN_BSTR, IN_BSTR, IN_BSTR, IN_BSTR,
IGuestSession **) DUMMY(E_FAIL)
void ConsoleVRDPServer::SendUpdate(unsigned int, void*, unsigned int) const DUMMY()
void ConsoleVRDPServer::SendUpdateBitmap(unsigned int, unsigned int,
unsigned int, unsigned int,
unsigned int) const DUMMY()
void ConsoleVRDPServer::Stop() DUMMY()
void IStateChangedEvent::get_State(MachineState_T*) DUMMY()
HRESULT IEventListener::HandleEvent(IEvent*) DUMMY(E_FAIL)
HRESULT SharedFolder::init(Console*, com::Utf8Str const&, com::Utf8Str const&,
bool, bool, bool) DUMMY(E_FAIL)
Machine::ClientToken::ClientToken(const ComObjPtr<Machine> &, SessionMachine *) TRACE()
bool Machine::ClientToken::isReady() TRACE(true)
void Machine::ClientToken::getId(Utf8Str &strId)
{
strId = "ClientTokenID DUMMY";
TRACE()
}
HRESULT com::Initialize(bool fGui) TRACE(S_OK)
/* USBFilter.cpp */
HRESULT USBProxyService::captureDeviceForVM(SessionMachine *, IN_GUID) DUMMY(E_FAIL)
HRESULT USBProxyService::detachAllDevicesFromVM(SessionMachine*, bool, bool) DUMMY(E_FAIL)
HRESULT USBProxyService::autoCaptureDevicesForVM(SessionMachine *) DUMMY(E_FAIL)
HRESULT USBProxyService::detachDeviceFromVM(SessionMachine*, GUID, bool) DUMMY(E_FAIL)
void matching::ParsedBoolFilter::parse(com::Bstr const&) DUMMY()
#include "VBox/usbfilter.h"
USBFILTERMATCH USBFilterGetMatchingMethod(PCUSBFILTER, USBFILTERIDX) DUMMY(USBFILTERMATCH_INVALID)
const char * USBFilterGetString(PCUSBFILTER pFilter, USBFILTERIDX enmFieldIdx) DUMMY(nullptr)
bool USBFilterIsMethodNumeric(USBFILTERMATCH enmMatchingMethod) DUMMY(false)
bool USBFilterMatch(PCUSBFILTER pFilter, PCUSBFILTER pDevice) DUMMY(false)
void USBFilterInit(PUSBFILTER pFilter, USBFILTERTYPE enmType) DUMMY()
int USBFilterSetStringExact(PUSBFILTER, USBFILTERIDX, const char *, bool) DUMMY(-1)
int USBFilterSetNumExact(PUSBFILTER, USBFILTERIDX, uint16_t, bool) DUMMY(-1)
int USBFilterGetNum(PCUSBFILTER pFilter, USBFILTERIDX enmFieldIdx) DUMMY(-1)
bool USBFilterIsNumericField(USBFILTERIDX enmFieldIdx) DUMMY(false)
const char * USBFilterGetString(PCUSBFILTER pFilter, USBFILTERIDX enmFieldIdx) DUMMY(nullptr)
void USBFilterInit(PUSBFILTER pFilter, USBFILTERTYPE enmType) DUMMY()
bool USBFilterIsMethodNumeric(USBFILTERMATCH enmMatchingMethod) DUMMY(false)
bool USBFilterIsMethodString(USBFILTERMATCH enmMatchingMethod) DUMMY(false)
bool USBFilterIsNumericField(USBFILTERIDX enmFieldIdx) DUMMY(false)
bool USBFilterIsStringField(USBFILTERIDX enmFieldIdx) DUMMY(false)
int USBFilterSetStringPattern(PUSBFILTER, USBFILTERIDX, const char *, bool) DUMMY(-1)
int USBFilterSetNumExpression(PUSBFILTER, USBFILTERIDX, const char *, bool) DUMMY(-1)
bool USBFilterMatch(PCUSBFILTER pFilter, PCUSBFILTER pDevice) DUMMY(false)
int USBFilterSetIgnore(PUSBFILTER pFilter, USBFILTERIDX enmFieldIdx) DUMMY(-1)
int USBFilterSetNumExact(PUSBFILTER, USBFILTERIDX, uint16_t, bool) DUMMY(-1)
int USBFilterSetNumExpression(PUSBFILTER, USBFILTERIDX, const char *, bool) DUMMY(-1)
int USBFilterSetStringExact(PUSBFILTER, USBFILTERIDX, const char *, bool) DUMMY(-1)
int USBFilterSetStringPattern(PUSBFILTER, USBFILTERIDX, const char *, bool) DUMMY(-1)
/* USBProxyService.cpp */
#include "USBProxyService.h"
HRESULT USBProxyService::autoCaptureDevicesForVM(SessionMachine *) DUMMY(E_FAIL)
HRESULT USBProxyService::captureDeviceForVM(SessionMachine *, IN_GUID) DUMMY(E_FAIL)
HRESULT USBProxyService::detachAllDevicesFromVM(SessionMachine*, bool, bool) DUMMY(E_FAIL)
HRESULT USBProxyService::detachDeviceFromVM(SessionMachine*, IN_GUID, bool) DUMMY(E_FAIL)
/* VirtualBoxImpl.cpp */
#include "VirtualBoxImpl.h"
void fireNATRedirectEvent(IEventSource* aSource,
CBSTR a_machineId,
ULONG a_slot,
BOOL a_remove,
CBSTR a_name,
NATProtocol_T a_proto,
CBSTR a_hostIP,
LONG a_hostPort,
CBSTR a_guestIP,
LONG a_guestPort) TRACE()
void fireNATNetworkChangedEvent(IEventSource* aSource,
CBSTR a_networkName) TRACE()
void fireNATNetworkStartStopEvent(IEventSource* aSource,
CBSTR a_networkName,
BOOL a_startEvent) TRACE()
void fireNATNetworkSettingEvent(IEventSource* aSource,
CBSTR a_networkName,
BOOL a_enabled,
CBSTR a_network,
CBSTR a_gateway,
BOOL a_advertiseDefaultIPv6RouteEnabled,
BOOL a_needDhcpServer) TRACE()
void fireNATNetworkPortForwardEvent(IEventSource* aSource,
CBSTR a_networkName,
BOOL a_create,
BOOL a_ipv6,
CBSTR a_name,
NATProtocol_T a_proto,
CBSTR a_hostIp,
LONG a_hostPort,
CBSTR a_guestIp,
LONG a_guestPort) TRACE()
void fireHostNameResolutionConfigurationChangeEvent(IEventSource* aSource) TRACE()

View File

@ -3,26 +3,10 @@
#include "VirtualBoxImpl.h"
#include "VBox/com/MultiResult.h"
#include "dummy/macros.h"
static bool debug = false;
#define TRACE(X) \
{ \
if (debug) \
PDBG(" called (%s) - eip=%p", __FILE__, \
__builtin_return_address(0)); \
return X; \
}
#define DUMMY(X) \
{ \
PERR("%s called (%s:%u), not implemented, eip=%p", __func__, __FILE__, __LINE__, \
__builtin_return_address(0)); \
while (1) \
asm volatile ("ud2a"); \
\
return X; \
}
HRESULT VirtualBoxBase::setError(HRESULT aResultCode, const char *pcsz, ...)
{
Genode::printf(ESC_ERR);
@ -50,9 +34,4 @@ HRESULT VirtualBoxBase::handleUnexpectedExceptions(VirtualBoxBase *const,
HRESULT VirtualBoxBase::setErrorInternal(HRESULT, GUID const&, char const*,
com::Utf8Str, bool, bool) DUMMY(E_FAIL)
HRESULT VirtualBoxBase::initializeComForThread(void) TRACE(S_OK)
HRESULT VirtualBoxErrorInfo::init(HRESULT, const GUID &, const char *,
const Utf8Str &, IVirtualBoxErrorInfo *) DUMMY(E_FAIL)
HRESULT VBoxEventDesc::init(IEventSource* aSource, VBoxEventType_T aType, ...) TRACE(S_OK)
HRESULT VBoxEventDesc::reinit(VBoxEventType_T aType, ...) TRACE(S_OK)
void VirtualBoxBase::uninitializeComForThread(void) TRACE()

View File

@ -18,7 +18,11 @@
/* VirtualBox includes */
class Genodefb : public Framebuffer
#include "Global.h"
#include "VirtualBoxBase.h"
class Genodefb :
VBOX_SCRIPTABLE_IMPL(IFramebuffer)
{
private:
@ -158,7 +162,7 @@ class Genodefb : public Framebuffer
return S_OK;
}
STDMETHODIMP COMGETTER(WinId) (ULONG64 *winId)
STDMETHODIMP COMGETTER(WinId) (PRInt64 *winId)
{
Assert(!"FixMe");
return S_OK;
@ -193,4 +197,9 @@ class Genodefb : public Framebuffer
{
return E_NOTIMPL;
}
STDMETHODIMP Notify3DEvent(PRUint32, PRUint8*)
{
return E_NOTIMPL;
}
};

View File

@ -21,12 +21,15 @@
#include <iprt/initterm.h>
#include <iprt/assert.h>
#include <iprt/err.h>
#include <VBox/com/com.h>
#include <VBox/vmm/vmapi.h>
/* Virtualbox includes of generic Main frontend */
#include "ConsoleImpl.h"
#include "MachineImpl.h"
#include "MouseImpl.h"
#include "SessionImpl.h"
#include "VirtualBoxImpl.h"
/* Genode port specific includes */
#include "console.h"
@ -62,8 +65,6 @@ void * nsMemory::Clone(const void*, size_t)
/**
* Other stuff
*/
Framebuffer::Framebuffer() { }
Framebuffer::~Framebuffer() { }
int com::GetVBoxUserHomeDirectory(char *aDir, size_t aDirLen, bool fCreateDir)
{
@ -111,7 +112,7 @@ HRESULT setupmachine()
return rc;
// open a session
ComObjPtr<ISession> session;
ComObjPtr<Session> session;
rc = session.createObject();
if (FAILED(rc))
return rc;
@ -120,18 +121,6 @@ HRESULT setupmachine()
if (FAILED(rc))
return rc;
/* Console object */
GenodeConsole * gConsole = new GenodeConsole();
/* Derived from Session::AssignMachine method in Main/src-client/SessionImpl.cpp */
static IInternalMachineControl control;
rc = control.init(machine);
if (FAILED(rc))
return rc;
rc = gConsole->init(machine, &control, LockType_VM);
if (FAILED(rc))
return rc;
/* Validate configured memory of vbox file and Genode config */
ULONG memory_vbox;
rc = machine->COMGETTER(MemorySize)(&memory_vbox);
@ -153,8 +142,12 @@ HRESULT setupmachine()
return E_FAIL;
}
/* Console object */
ComPtr<IConsole> gConsole;
rc = session->COMGETTER(Console)(gConsole.asOutParam());
/* Display object */
ComPtr<Display> display;
ComPtr<IDisplay> display;
rc = gConsole->COMGETTER(Display)(display.asOutParam());
if (FAILED(rc))
return rc;
@ -191,7 +184,7 @@ HRESULT setupmachine()
/* request mouse object */
static ComPtr<IMouse> gMouse;
rc = gConsole->COMGETTER(Mouse)(gMouse.asOutParam());
if (RT_FAILURE(rc))
if (FAILED(rc))
return rc;
Assert (&*gMouse);
@ -203,8 +196,10 @@ HRESULT setupmachine()
Assert (&*gKeyboard);
/* handle input of Genode and forward it to VMM layer */
ComPtr<GenodeConsole> genodeConsole = gConsole;
RTLogPrintf("genodeConsole = %p\n", genodeConsole);
while (true) {
gConsole->eventWait(gKeyboard, gMouse);
genodeConsole->eventWait(gKeyboard, gMouse);
}
Assert(!"return not expected");

View File

@ -0,0 +1,6 @@
#ifndef ___VBox_HostService_VBoxClipboardSvc_h
#define ___VBox_HostService_VBoxClipboardSvc_h
#define VBOX_SHARED_CLIPBOARD_HOST_FN_SET_HEADLESS 2
#endif

View File

@ -1,7 +1,12 @@
#ifndef ___VBox_com_VirtualBox_h
#define ___VBox_com_VirtualBox_h
// for convenience
#include <VBox/com/defs.h>
#include <VBox/com/ptr.h>
// generated VirtualBox COM library definition file
#include <VirtualBox_XPCOM.h>
#endif

View File

@ -1,9 +1,6 @@
#ifndef ___VBox_com_com_h
#define ___VBox_com_com_h
#define COMGETTER(n) get_##n
#define COMSETTER(n) set_##n
#include <VBox/com/defs.h>
namespace com {

View File

@ -3,70 +3,90 @@
#include <iprt/types.h>
typedef short unsigned int * BSTR;
typedef BSTR IN_BSTR;
typedef const short unsigned int * CBSTR;
typedef short unsigned int OLECHAR;
typedef unsigned int PRUint32;
typedef OLECHAR PRUnichar;
typedef bool BOOL;
typedef unsigned char BYTE;
#include <nsID.h>
#define ATL_NO_VTABLE
#define DECLARE_CLASSFACTORY()
#define DECLARE_CLASSFACTORY_SINGLETON(X)
#define DECLARE_REGISTRY_RESOURCEID(X)
#define DECLARE_NOT_AGGREGATABLE(X)
#define DECLARE_PROTECT_FINAL_CONSTRUCT(Y)
#define BEGIN_COM_MAP(X)
#define COM_INTERFACE_ENTRY(X)
#define COM_INTERFACE_ENTRY2(X,Y)
#define END_COM_MAP()
#define HRESULT nsresult
#define SUCCEEDED(X) ((X) == VINF_SUCCESS)
#define FAILED(X) ((X) != VINF_SUCCESS)
#define FAILED_DEAD_INTERFACE(rc) ( (rc) == NS_ERROR_ABORT \
|| (rc) == NS_ERROR_CALL_FAILED \
)
#define IUnknown nsISupports
typedef PRBool BOOL;
typedef PRUint8 BYTE;
typedef PRInt16 SHORT;
typedef PRUint16 USHORT;
typedef PRInt32 LONG;
typedef PRUint32 ULONG;
typedef PRInt64 LONG64;
typedef PRUint64 ULONG64;
#define FALSE false
#define TRUE true
#define SUCCEEDED(X) ((X) == VINF_SUCCESS)
#define FAILED(X) ((X) != VINF_SUCCESS)
typedef wchar_t OLECHAR;
typedef PRUnichar *BSTR;
typedef const PRUnichar *CBSTR;
typedef CBSTR IN_BSTR;
#define GUID nsID
#define IN_GUID const nsID &
#define OUT_GUID nsID **
#define COMGETTER(n) Get##n
#define COMSETTER(n) Set##n
#define ComSafeArrayInArg(aArg) aArg##Size, aArg
#define ComSafeArrayOutArg(aArg) aArg##Size, aArg
#define ComSafeArrayOut(aType, aArg) PRUint32 *aArg##Size, aType **aArg
#define ComSafeArrayIn(aType, aArg) unsigned aArg##Size, aType *aArg
#define ComSafeArrayInIsNull(aArg) ((aArg) == NULL)
#define ComSafeArrayInArg(aArg) aArg##Size, aArg
#define ComSafeArrayOut(aType, aArg) PRUint32 *aArg##Size, aType **aArg
#define ComSafeArrayOutIsNull(aArg) ((aArg) == NULL)
#define ComSafeArrayOutArg(aArg) aArg##Size, aArg
#define ComSafeGUIDArrayIn(aArg) PRUint32 aArg##Size, const nsID **aArg
#define ComSafeGUIDArrayInArg(aArg) ComSafeArrayInArg(aArg)
#define ComSafeArrayOutIsNull(aArg) ((aArg) == NULL)
#define ComSafeArrayInIsNull(aArg) ((aArg) == NULL)
#define COM_STRUCT_OR_CLASS(I) class I
#define ComSafeArraySize(aArg) ((aArg) == NULL ? 0 : (aArg##Size))
#define FAILED_DEAD_INTERFACE(rc) ( (rc) != VINF_SUCCESS )
/* OLE error codes */
#define S_OK ((nsresult)NS_OK)
#define E_UNEXPECTED NS_ERROR_UNEXPECTED
#define E_NOTIMPL NS_ERROR_NOT_IMPLEMENTED
#define E_OUTOFMEMORY NS_ERROR_OUT_OF_MEMORY
#define E_INVALIDARG NS_ERROR_INVALID_ARG
#define E_NOINTERFACE NS_ERROR_NO_INTERFACE
#define E_POINTER NS_ERROR_NULL_POINTER
#define E_ABORT NS_ERROR_ABORT
#define E_FAIL NS_ERROR_FAILURE
/* Note: a better analog for E_ACCESSDENIED would probably be
* NS_ERROR_NOT_AVAILABLE, but we want binary compatibility for now. */
#define E_ACCESSDENIED ((nsresult)0x80070005L)
enum HRESULT {
S_OK,
E_ACCESSDENIED,
E_OUTOFMEMORY,
E_INVALIDARG,
E_FAIL,
E_POINTER,
E_NOTIMPL,
E_UNEXPECTED,
E_NOINTERFACE,
E_ABORT,
VBOX_E_VM_ERROR,
VBOX_E_INVALID_VM_STATE,
VBOX_E_INVALID_OBJECT_STATE,
VBOX_E_INVALID_SESSION_STATE,
VBOX_E_OBJECT_NOT_FOUND,
VBOX_E_FILE_ERROR,
VBOX_E_OBJECT_IN_USE,
VBOX_E_NOT_SUPPORTED,
VBOX_E_IPRT_ERROR,
VBOX_E_PDM_ERROR,
VBOX_E_HOST_ERROR,
VBOX_E_XML_ERROR,
};
typedef struct { char x [sizeof(RTUUID)]; } GUID;
#define STDMETHOD(X) virtual HRESULT X
#define STDMETHODIMP HRESULT
inline GUID& stuffstuff() {
static GUID stuff;
return stuff;
}
#define COM_IIDOF(X) stuffstuff()
#define getStaticClassIID() stuffstuff()
#define IN_GUID GUID
#define OUT_GUID GUID *
#define COM_STRUCT_OR_CLASS(I) class I
extern "C"
{
@ -78,558 +98,13 @@ extern "C"
unsigned int SysStringLen(BSTR bstr);
}
typedef signed int LONG;
typedef unsigned int ULONG;
typedef unsigned short USHORT;
typedef short SHORT;
typedef signed long long LONG64;
typedef unsigned long long ULONG64;
namespace com {
/* capiidl.xsl */
typedef enum VARTYPE
{
VT_I2 = 2,
VT_I4 = 3,
VT_BSTR = 8,
VT_DISPATCH = 9,
VT_BOOL = 11,
VT_UNKNOWN = 13,
VT_I1 = 16,
VT_UI1 = 17,
VT_UI2 = 18,
VT_UI4 = 19,
VT_I8 = 20,
VT_UI8 = 21,
VT_HRESULT = 25
} VARTYPE;
#define VBOX_SCRIPTABLE_IMPL(iface) \
public iface
typedef struct SAFEARRAY
{
void *pv;
ULONG c;
} SAFEARRAY;
#define VBOX_DEFAULT_INTERFACE_ENTRIES(X)
enum AccessMode_T
{
AccessMode_ReadOnly,
AccessMode_ReadWrite,
};
enum AdditionsFacilityClass_T
{
AdditionsFacilityClass_None,
AdditionsFacilityClass_Driver,
AdditionsFacilityClass_Feature,
AdditionsFacilityClass_Program,
AdditionsFacilityClass_Service,
};
enum AdditionsFacilityStatus_T
{
AdditionsFacilityStatus_Unknown,
AdditionsFacilityStatus_Active,
};
enum AdditionsFacilityType_T
{
AdditionsFacilityType_None,
AdditionsFacilityType_AutoLogon,
AdditionsFacilityType_Graphics,
AdditionsFacilityType_Seamless,
AdditionsFacilityType_VBoxService,
AdditionsFacilityType_VBoxGuestDriver,
AdditionsFacilityType_VBoxTrayClient,
};
enum CopyFileFlag_T { };
enum DeviceActivity_T { };
enum FsObjType_T { };
enum FileStatus_T { };
enum FileSeekType_T { };
enum DragAndDropAction_T { };
enum GuestSessionStatus_T { };
enum GuestSessionWaitForFlag_T { };
enum GuestSessionWaitResult_T { };
enum DirectoryCreateFlag_T { };
enum DirectoryOpenFlag_T { };
enum DirectoryRemoveRecFlag_T { };
enum PathRenameFlag_T { };
enum SymlinkType_T { };
enum SymlinkReadFlag_T { };
enum AdditionsUpdateFlag_T { };
enum AdditionsRunLevelType_T
{
AdditionsRunLevelType_None,
AdditionsRunLevelType_System,
AdditionsRunLevelType_Desktop,
AdditionsRunLevelType_Userland,
};
enum GuestUserState_T {
};
enum MouseButtonState
{
MouseButtonState_LeftButton = 0x01,
MouseButtonState_RightButton = 0x02,
MouseButtonState_MiddleButton = 0x04,
MouseButtonState_WheelUp = 0x08,
MouseButtonState_WheelDown = 0x10,
MouseButtonState_XButton1 = 0x20,
MouseButtonState_XButton2 = 0x40,
MouseButtonState_MouseStateMask = 0x7F
};
enum GuestMouseEventMode_T
{
GuestMouseEventMode_Absolute,
GuestMouseEventMode_Relative,
};
enum GUEST_FILE_SEEKTYPE { };
enum ProcessPriority_T
{
ProcessPriority_Default,
};
enum FramebufferPixelFormat
{
FramebufferPixelFormat_Opaque = 0,
FramebufferPixelFormat_FOURCC_RGB = 0x32424752,
};
enum GuestMonitorChangedEventType
{
GuestMonitorChangedEventType_Enabled,
GuestMonitorChangedEventType_Disabled,
GuestMonitorChangedEventType_NewOrigin,
};
enum VBoxEventType_T
{
VBoxEventType_Invalid = 0,
VBoxEventType_Any = 1,
VBoxEventType_Vetoable = 2,
VBoxEventType_MachineEvent = 3,
VBoxEventType_SnapshotEvent = 4,
VBoxEventType_InputEvent = 5,
VBoxEventType_LastWildcard = 31,
VBoxEventType_OnMachineStateChanged = 32,
VBoxEventType_OnMachineDataChanged = 33,
VBoxEventType_OnExtraDataChanged = 34,
VBoxEventType_OnExtraDataCanChange = 35,
VBoxEventType_OnMediumRegistered = 36,
VBoxEventType_OnMachineRegistered = 37,
VBoxEventType_OnSessionStateChanged = 38,
VBoxEventType_OnSnapshotTaken = 39,
VBoxEventType_OnSnapshotDeleted = 40,
VBoxEventType_OnSnapshotChanged = 41,
VBoxEventType_OnGuestPropertyChanged = 42,
VBoxEventType_OnMousePointerShapeChanged = 43,
VBoxEventType_OnMouseCapabilityChanged = 44,
VBoxEventType_OnKeyboardLedsChanged = 45,
VBoxEventType_OnStateChanged = 46,
VBoxEventType_OnAdditionsStateChanged = 47,
VBoxEventType_OnNetworkAdapterChanged = 48,
VBoxEventType_OnSerialPortChanged = 49,
VBoxEventType_OnParallelPortChanged = 50,
VBoxEventType_OnStorageControllerChanged = 51,
VBoxEventType_OnMediumChanged = 52,
VBoxEventType_OnVRDEServerChanged = 53,
VBoxEventType_OnUSBControllerChanged = 54,
VBoxEventType_OnUSBDeviceStateChanged = 55,
VBoxEventType_OnSharedFolderChanged = 56,
VBoxEventType_OnRuntimeError = 57,
VBoxEventType_OnCanShowWindow = 58,
VBoxEventType_OnShowWindow = 59,
VBoxEventType_OnCPUChanged = 60,
VBoxEventType_OnVRDEServerInfoChanged = 61,
VBoxEventType_OnEventSourceChanged = 62,
VBoxEventType_OnCPUExecutionCapChanged = 63,
VBoxEventType_OnGuestKeyboard = 64,
VBoxEventType_OnGuestMouse = 65,
VBoxEventType_OnNATRedirect = 66,
VBoxEventType_OnHostPCIDevicePlug = 67,
VBoxEventType_OnVBoxSVCAvailabilityChanged = 68,
VBoxEventType_OnBandwidthGroupChanged = 69,
VBoxEventType_OnGuestMonitorChanged = 70,
VBoxEventType_OnStorageDeviceChanged = 71,
VBoxEventType_OnClipboardModeChanged = 72,
VBoxEventType_OnDragAndDropModeChanged = 73,
VBoxEventType_OnGuestMultiTouch = 74,
VBoxEventType_Last = 75
};
enum ProcessStatus_T { };
enum ProcessInputStatus_T { };
enum ProcessInputFlag_T { };
enum ProcessWaitResult_T { };
enum ProcessWaitForFlag_T { };
enum ProcessCreateFlag_T
{
ProcessCreateFlag_None,
};
enum SessionType_T
{
SessionType_Null,
SessionType_WriteLock,
SessionType_Remote,
SessionType_Shared,
};
enum MachineState_T {
MachineState_Null,
MachineState_Aborted,
MachineState_Running,
MachineState_Paused,
MachineState_Teleporting,
MachineState_LiveSnapshotting,
MachineState_Stuck,
MachineState_Starting,
MachineState_Stopping,
MachineState_Saving,
MachineState_Restoring,
MachineState_TeleportingPausedVM,
MachineState_TeleportingIn,
MachineState_RestoringSnapshot,
MachineState_DeletingSnapshot,
MachineState_SettingUp,
MachineState_FaultTolerantSyncing,
MachineState_PoweredOff,
MachineState_Teleported,
MachineState_Saved,
MachineState_DeletingSnapshotOnline,
MachineState_DeletingSnapshotPaused,
};
enum CleanupMode_T {
CleanupMode_UnregisterOnly,
CleanupMode_DetachAllReturnHardDisksOnly,
CleanupMode_Full,
};
enum CloneMode_T {
CloneMode_MachineState,
CloneMode_AllStates,
CloneMode_MachineAndChildStates,
};
enum CloneOptions_T {
CloneOptions_Link,
CloneOptions_KeepAllMACs,
CloneOptions_KeepNATMACs,
CloneOptions_KeepDiskNames,
};
enum LockType_T {
LockType_Shared,
LockType_Write,
LockType_VM,
};
enum SessionState_T {
SessionState_Null,
SessionState_Locked,
SessionState_Spawning,
SessionState_Unlocking,
SessionState_Unlocked,
};
enum Reason_T
{
Reason_Unspecified,
Reason_HostSuspend,
Reason_HostResume,
Reason_HostBatteryLow,
};
enum MediumFormatCapabilities_T
{
MediumFormatCapabilities_Uuid = 0x01,
MediumFormatCapabilities_CreateFixed = 0x02,
MediumFormatCapabilities_CreateDynamic = 0x04,
MediumFormatCapabilities_Differencing = 0x10,
MediumFormatCapabilities_File = 0x40
};
enum DataType_T {
DataType_Int32,
DataType_Int8,
DataType_String,
};
enum DataFlags_T {
DataFlags_Array,
};
enum MediumVariant_T {
MediumVariant_Standard,
MediumVariant_Fixed,
MediumVariant_Diff,
MediumVariant_VmdkStreamOptimized,
MediumVariant_NoCreateDir,
};
enum HostNetworkInterfaceType_T { };
enum NATAliasMode_T
{
NATAliasMode_AliasLog = 0x1,
NATAliasMode_AliasProxyOnly = 0x02,
NATAliasMode_AliasUseSamePorts = 0x04,
};
enum MediumState_T {
MediumState_NotCreated = 0,
MediumState_Created = 1,
MediumState_LockedRead = 2,
MediumState_LockedWrite = 3,
MediumState_Inaccessible = 4,
MediumState_Creating = 5,
MediumState_Deleting = 6
};
enum AuthType_T {
AuthType_Null,
AuthType_Guest,
AuthType_External,
};
enum BIOSBootMenuMode_T {
BIOSBootMenuMode_MessageAndMenu,
BIOSBootMenuMode_Disabled,
BIOSBootMenuMode_MenuOnly,
};
enum USBControllerType_T {
USBControllerType_Null,
USBControllerType_OHCI,
USBControllerType_EHCI,
USBControllerType_Last,
};
enum USBDeviceFilterAction_T {
USBDeviceFilterAction_Null,
USBDeviceFilterAction_Ignore,
USBDeviceFilterAction_Hold,
};
enum DeviceType_T {
DeviceType_Null,
DeviceType_HardDisk,
DeviceType_DVD,
DeviceType_Floppy,
DeviceType_Network,
DeviceType_USB,
DeviceType_SharedFolder,
};
enum MediumType_T {
MediumType_Normal,
MediumType_Immutable,
MediumType_Writethrough,
MediumType_Shareable,
MediumType_Readonly,
MediumType_MultiAttach,
};
enum NATProtocol_T {
NATProtocol_TCP,
NATProtocol_UDP,
};
enum NetworkAdapterType_T {
NetworkAdapterType_Am79C970A,
NetworkAdapterType_Am79C973,
NetworkAdapterType_I82540EM,
NetworkAdapterType_I82543GC,
NetworkAdapterType_I82545EM,
NetworkAdapterType_Virtio,
};
enum ProcessorFeature_T
{
ProcessorFeature_HWVirtEx,
ProcessorFeature_LongMode,
ProcessorFeature_NestedPaging,
ProcessorFeature_PAE,
};
enum CPUPropertyType_T
{
CPUPropertyType_Null,
CPUPropertyType_PAE,
CPUPropertyType_Synthetic,
CPUPropertyType_LongMode,
CPUPropertyType_TripleFaultReset,
};
/* End of enum CPUPropertyType Declaration */
enum AudioDriverType_T {
AudioDriverType_Null,
AudioDriverType_WinMM,
AudioDriverType_DirectSound,
AudioDriverType_SolAudio,
AudioDriverType_ALSA,
AudioDriverType_Pulse,
AudioDriverType_OSS,
AudioDriverType_CoreAudio,
AudioDriverType_MMPM,
};
enum PortMode_T {
PortMode_Disconnected,
PortMode_HostPipe,
PortMode_HostDevice,
PortMode_RawFile,
};
enum BandwidthGroupType_T {
BandwidthGroupType_Null,
BandwidthGroupType_Disk,
BandwidthGroupType_Network,
};
enum ClipboardMode_T {
ClipboardMode_Disabled,
ClipboardMode_HostToGuest,
ClipboardMode_GuestToHost,
ClipboardMode_Bidirectional,
};
enum FaultToleranceState_T {
FaultToleranceState_Inactive,
FaultToleranceState_Master,
FaultToleranceState_Standby,
};
enum AudioControllerType_T {
AudioControllerType_AC97,
AudioControllerType_HDA,
AudioControllerType_SB16,
};
enum NetworkAttachmentType_T {
NetworkAttachmentType_Null,
NetworkAttachmentType_NAT,
NetworkAttachmentType_Bridged,
NetworkAttachmentType_Internal,
NetworkAttachmentType_HostOnly,
NetworkAttachmentType_Generic,
NetworkAttachmentType_NATNetwork,
};
enum NetworkAdapterPromiscModePolicy_T {
NetworkAdapterPromiscModePolicy_Deny,
NetworkAdapterPromiscModePolicy_AllowNetwork,
NetworkAdapterPromiscModePolicy_AllowAll,
};
enum StorageBus_T {
StorageBus_Null,
StorageBus_IDE,
StorageBus_SATA,
StorageBus_SAS,
StorageBus_SCSI,
StorageBus_Floppy,
};
enum FirmwareType_T {
FirmwareType_BIOS,
FirmwareType_EFI,
FirmwareType_EFI32,
FirmwareType_EFI64,
FirmwareType_EFIDUAL,
};
enum GraphicsControllerType_T {
GraphicsControllerType_Null,
GraphicsControllerType_VBoxVGA,
GraphicsControllerType_VMSVGA,
};
enum AutostopType_T {
AutostopType_Disabled,
AutostopType_SaveState,
AutostopType_PowerOff,
AutostopType_AcpiShutdown,
};
enum DragAndDropMode_T {
DragAndDropMode_Disabled,
DragAndDropMode_HostToGuest,
DragAndDropMode_GuestToHost,
DragAndDropMode_Bidirectional,
};
enum StorageControllerType_T {
StorageControllerType_PIIX3,
StorageControllerType_IntelAhci,
StorageControllerType_LsiLogic,
StorageControllerType_BusLogic,
StorageControllerType_PIIX4,
StorageControllerType_ICH6,
StorageControllerType_I82078,
StorageControllerType_LsiLogicSas,
};
enum KeyboardHIDType_T {
KeyboardHIDType_None,
KeyboardHIDType_PS2Keyboard,
KeyboardHIDType_USBKeyboard,
KeyboardHIDType_ComboKeyboard,
};
enum PointingHIDType_T {
PointingHIDType_None,
PointingHIDType_PS2Mouse,
PointingHIDType_USBMouse,
PointingHIDType_USBTablet,
PointingHIDType_ComboMouse,
PointingHIDType_USBMultiTouch,
};
enum ChipsetType_T {
ChipsetType_Null,
ChipsetType_ICH9,
ChipsetType_PIIX3,
};
enum DhcpOpt_T {
DhcpOpt_SubnetMask,
DhcpOpt_Router,
};
enum SettingsVersion_T {
SettingsVersion_Null,
SettingsVersion_v1_3,
SettingsVersion_v1_4,
SettingsVersion_v1_5,
SettingsVersion_v1_6,
SettingsVersion_v1_7,
SettingsVersion_v1_8,
SettingsVersion_v1_9,
SettingsVersion_v1_10,
SettingsVersion_v1_11,
SettingsVersion_v1_12,
SettingsVersion_v1_13,
SettingsVersion_v1_14,
SettingsVersion_Future,
};
enum HWVirtExPropertyType_T
{
HWVirtExPropertyType_Enabled,
HWVirtExPropertyType_Force,
HWVirtExPropertyType_NestedPaging,
HWVirtExPropertyType_LargePages,
HWVirtExPropertyType_VPID,
HWVirtExPropertyType_UnrestrictedExecution,
};
enum USBDeviceState_T
{
};
} /* namespace com */
#endif /* !___VBox_com_defs_h */

View File

@ -3,6 +3,8 @@
#include <VBox/com/defs.h>
#include <base/printf.h>
template <typename T>
class ComPtr {
@ -16,15 +18,47 @@ class ComPtr {
/* copy constructor */
ComPtr<T> (T *obj) : _obj(obj) { }
template<typename X>
ComPtr<T> (X *obj) : _obj(nullptr) { }
ComPtr<T> (X *obj) : _obj(dynamic_cast<T*>(obj))
{
if (!_obj)
PDBG("dynamic cast failed");
}
template <class T2>
ComPtr(const ComPtr<T2> &that) : _obj(nullptr) { }
ComPtr<T>(const ComPtr<T2> &that) : ComPtr<T>((T2*)that) { }
/* operators */
T * operator->() const { return _obj; }
operator T*() const { return _obj; }
template <class T2>
ComPtr& operator=(const ComPtr<T2> &that)
{
return operator=((T2*)that);
}
ComPtr& operator=(const ComPtr &that)
{
return operator=((T*)that);
}
template <class T2>
ComPtr& operator=(T2 *p)
{
_obj = dynamic_cast<T*>(p);
if (!_obj)
PDBG("dynamic cast failed");
return *this;
}
ComPtr& operator=(T *p)
{
_obj = p;
return *this;
}
bool isNull () const { return _obj == nullptr; }
T ** asOutParam() { return &_obj; }
@ -39,6 +73,13 @@ class ComPtr {
}
void setNull() { _obj = nullptr; }
template <class T2>
bool operator==(T2* p)
{
return (p == _obj);
}
};

View File

@ -0,0 +1,12 @@
#ifndef ___VBox_intnet_h
#define ___VBox_intnet_h
#define INTNET_MAX_NETWORK_NAME 128
enum INTNETTRUNKTYPE
{
kIntNetTrunkType_WhateverNone,
kIntNetTrunkType_NetFlt,
};
#endif

View File

@ -0,0 +1,38 @@
#ifndef nsError_h__
#define nsError_h__
/* Standard "it worked" return value */
#define NS_OK 0
#define NS_ERROR_BASE ((nsresult) 0xC1F30000)
/* Returned by a not implemented function */
#define NS_ERROR_NOT_IMPLEMENTED ((nsresult) 0x80004001L)
/* Returned when a given interface is not supported. */
#define NS_NOINTERFACE ((nsresult) 0x80004002L)
#define NS_ERROR_NO_INTERFACE NS_NOINTERFACE
#define NS_ERROR_INVALID_POINTER ((nsresult) 0x80004003L)
#define NS_ERROR_NULL_POINTER NS_ERROR_INVALID_POINTER
/* Returned when a function aborts */
#define NS_ERROR_ABORT ((nsresult) 0x80004004L)
/* Returned when a function fails */
#define NS_ERROR_FAILURE ((nsresult) 0x80004005L)
/* Returned when an IPC fails */
#define NS_ERROR_CALL_FAILED ((nsresult) 0x800706beL)
/* Returned when an unexpected error occurs */
#define NS_ERROR_UNEXPECTED ((nsresult) 0x8000ffffL)
/* Returned when a memory allocation fails */
#define NS_ERROR_OUT_OF_MEMORY ((nsresult) 0x8007000eL)
/* Returned when an illegal value is passed */
#define NS_ERROR_ILLEGAL_VALUE ((nsresult) 0x80070057L)
#define NS_ERROR_INVALID_ARG NS_ERROR_ILLEGAL_VALUE
#endif

View File

@ -0,0 +1,14 @@
#ifndef nsID_h__
#define nsID_h__
#ifndef nscore_h___
#include "nscore.h"
#endif
typedef struct { char x [sizeof(RTUUID)]; } nsID; /* differs from original */
typedef nsID nsCID;
#define NS_DEFINE_STATIC_IID_ACCESSOR(x)
#endif

View File

@ -0,0 +1,10 @@
#ifndef __gen_nsIException_h__
#define __gen_nsIException_h__
#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif
class nsIException : public nsISupports { };
#endif /* __gen_nsIException_h__ */

View File

@ -0,0 +1,23 @@
#ifndef __gen_nsISupports_h__
#define __gen_nsISupports_h__
#ifndef nsError_h__
#include "nsError.h"
#endif
#ifndef nsISupportsImpl_h__
#include "nsISupportsImpl.h"
#endif
class nsISupports
{
public:
/* make the class polymorphic, so it can be used with 'dynamic_cast' */
virtual ~nsISupports() { }
void AddRef() { }
void Release() { }
};
#endif /* __gen_nsISupports_h__ */

View File

@ -0,0 +1,14 @@
#ifndef nsISupportsImpl_h__
#define nsISupportsImpl_h__
#ifndef nscore_h___
#include "nscore.h"
#endif
#define NS_DECL_CLASSINFO(x)
#define NS_IMPL_THREADSAFE_ADDREF(x)
#define NS_IMPL_THREADSAFE_RELEASE(x)
#define NS_IMPL_QUERY_INTERFACE1_CI(x, y)
#define NS_IMPL_CI_INTERFACE_GETTER1(x, y)
#endif

View File

@ -1,8 +1,6 @@
#ifndef nsMemory_h__
#define nsMemory_h__
#define nsID GUID
#include <stddef.h>
class nsMemory

View File

@ -0,0 +1,13 @@
#ifndef nscore_h___
#define nscore_h___
#include "prtypes.h"
#define NS_IMETHOD_(type) virtual type
#define NS_IMETHOD NS_IMETHOD_(nsresult)
typedef PRUint32 nsresult;
#include "nsError.h"
#endif /* nscore_h___ */

View File

@ -0,0 +1,14 @@
#ifndef prtypes_h___
#define prtypes_h___
typedef bool PRBool;
typedef uint8_t PRUint8;
typedef int16_t PRInt16;
typedef uint16_t PRUint16;
typedef int32_t PRInt32;
typedef uint32_t PRUint32;
typedef int64_t PRInt64;
typedef uint64_t PRUint64;
typedef PRUint16 PRUnichar;
#endif /* prtypes_h___ */

View File

@ -1,4 +1,9 @@
+++ src/app/virtualbox/src/VBox/Devices/PC/DrvACPI.cpp
acpi_drv.patch
diff --git a/src/app/virtualbox/src/VBox/Devices/PC/DrvACPI.cpp b/src/app/virtualbox/src/VBox/Devices/PC/DrvACPI.cpp
index d22fc11..f194326 100644
--- a/src/app/virtualbox/src/VBox/Devices/PC/DrvACPI.cpp
+++ b/src/app/virtualbox/src/VBox/Devices/PC/DrvACPI.cpp
@@ -44,6 +44,7 @@
# include <IOKit/ps/IOPSKeys.h>
#endif

View File

@ -1,5 +1,31 @@
+++ src/app/virtualbox/src/VBox/VMM/VMMR3/VMM.cpp
@@ -660,11 +660,13 @@
avoid_yield.patch
diff --git a/src/app/virtualbox/src/VBox/Devices/Storage/DevATA.cpp b/src/app/virtualbox/src/VBox/Devices/Storage/DevATA.cpp
index 009f80f..39cb535 100644
--- a/src/app/virtualbox/src/VBox/Devices/Storage/DevATA.cpp
+++ b/src/app/virtualbox/src/VBox/Devices/Storage/DevATA.cpp
@@ -4466,6 +4466,7 @@ static int ataIOPortReadU8(PATACONTROLLER pCtl, uint32_t addr, uint32_t *pu32)
{
#ifdef IN_RING3
cBusy = 0;
+#if 0
PDMCritSectLeave(&pCtl->lock);
#ifndef RT_OS_WINDOWS
@@ -4501,7 +4502,7 @@ static int ataIOPortReadU8(PATACONTROLLER pCtl, uint32_t addr, uint32_t *pu32)
PDMCritSectEnter(&pCtl->lock, VINF_SUCCESS);
STAM_PROFILE_STOP(&pCtl->StatLockWait, a);
}
-
+#endif
val = s->uATARegStatus;
#else /* !IN_RING3 */
/* Cannot yield CPU in guest context. And switching to host
diff --git a/src/app/virtualbox/src/VBox/VMM/VMMR3/VMM.cpp b/src/app/virtualbox/src/VBox/VMM/VMMR3/VMM.cpp
index c0a1400..f35bc0e 100644
--- a/src/app/virtualbox/src/VBox/VMM/VMMR3/VMM.cpp
+++ b/src/app/virtualbox/src/VBox/VMM/VMMR3/VMM.cpp
@@ -660,11 +660,13 @@ VMMR3_INT_DECL(int) VMMR3InitCompleted(PVM pVM, VMINITCOMPLETED enmWhat)
/*
* Create the EMT yield timer.
*/
@ -13,7 +39,7 @@
#ifdef VBOX_WITH_NMI
/*
@@ -1160,6 +1162,7 @@
@@ -1160,6 +1162,7 @@ VMMR3_INT_DECL(int) VMMR3GetImportRC(PVM pVM, const char *pszSymbol, PRTRCPTR pR
*/
VMMR3_INT_DECL(void) VMMR3YieldSuspend(PVM pVM)
{
@ -21,7 +47,7 @@
VMCPU_ASSERT_EMT(&pVM->aCpus[0]);
if (!pVM->vmm.s.cYieldResumeMillies)
{
@@ -1172,6 +1175,7 @@
@@ -1172,6 +1175,7 @@ VMMR3_INT_DECL(void) VMMR3YieldSuspend(PVM pVM)
TMTimerStop(pVM->vmm.s.pYieldTimer);
}
pVM->vmm.s.u64LastYield = RTTimeNanoTS();
@ -29,7 +55,7 @@
}
@@ -1182,10 +1186,12 @@
@@ -1182,10 +1186,12 @@ VMMR3_INT_DECL(void) VMMR3YieldSuspend(PVM pVM)
*/
VMMR3_INT_DECL(void) VMMR3YieldStop(PVM pVM)
{
@ -42,7 +68,7 @@
}
@@ -1196,11 +1202,13 @@
@@ -1196,11 +1202,13 @@ VMMR3_INT_DECL(void) VMMR3YieldStop(PVM pVM)
*/
VMMR3_INT_DECL(void) VMMR3YieldResume(PVM pVM)
{
@ -56,21 +82,3 @@
}
+++ src/app/virtualbox/src/VBox/Devices/Storage/DevATA.cpp
@@ -4466,6 +4466,7 @@
{
#ifdef IN_RING3
cBusy = 0;
+#if 0
PDMCritSectLeave(&pCtl->lock);
#ifndef RT_OS_WINDOWS
@@ -4502,7 +4501,7 @@
PDMCritSectEnter(&pCtl->lock, VINF_SUCCESS);
STAM_PROFILE_STOP(&pCtl->StatLockWait, a);
}
+#endif
-
val = s->uATARegStatus;
#else /* !IN_RING3 */
/* Cannot yield CPU in guest context. And switching to host

View File

@ -1,5 +1,10 @@
+++ src/app/virtualbox/src/VBox/Devices/Network/DevE1000.cpp
@@ -5721,22 +5721,29 @@
dev_e1000.patch
diff --git a/src/app/virtualbox/src/VBox/Devices/Network/DevE1000.cpp b/src/app/virtualbox/src/VBox/Devices/Network/DevE1000.cpp
index b8f9ebf..aa3eb87 100644
--- a/src/app/virtualbox/src/VBox/Devices/Network/DevE1000.cpp
+++ b/src/app/virtualbox/src/VBox/Devices/Network/DevE1000.cpp
@@ -5721,22 +5721,29 @@ static int e1kRegReadUnaligned(PE1KSTATE pThis, uint32_t offReg, void *pv, uint3
rc = g_aE1kRegMap[index].pfnRead(pThis, offReg & 0xFFFFFFFC, index, &u32);
u32 &= mask;
//e1kCsLeave(pThis);

View File

@ -1,10 +1,10 @@
Triggers misalignment assertion in STAM.cpp
eminternal.patch
case STAMTYPE_PROFILE_ADV:
AssertMsg(!((uintptr_t)pvSample & 7), ("%p - %s - %u\n", pvSample, pszName, enmType));
+++ src/app/virtualbox/src/VBox/VMM/include/EMInternal.h
@@ -361,6 +361,8 @@
diff --git a/src/app/virtualbox/src/VBox/VMM/include/EMInternal.h b/src/app/virtualbox/src/VBox/VMM/include/EMInternal.h
index 11a7ac3..02e6e29 100644
--- a/src/app/virtualbox/src/VBox/VMM/include/EMInternal.h
+++ b/src/app/virtualbox/src/VBox/VMM/include/EMInternal.h
@@ -361,6 +361,8 @@ typedef struct EMCPU
#ifdef VBOX_WITH_RAW_MODE
/** Pointer to the PATM status structure. (R3 Ptr) */
R3PTRTYPE(PPATMGCSTATE) pPatmGCState;

View File

@ -1,5 +1,10 @@
+++ src/app/virtualbox/src/VBox/Runtime/r3/posix/utf8-posix.cpp
@@ -324,11 +324,7 @@
iconv.patch
diff --git a/src/app/virtualbox/src/VBox/Runtime/r3/posix/utf8-posix.cpp b/src/app/virtualbox/src/VBox/Runtime/r3/posix/utf8-posix.cpp
index cb723eb..d51dd51 100644
--- a/src/app/virtualbox/src/VBox/Runtime/r3/posix/utf8-posix.cpp
+++ b/src/app/virtualbox/src/VBox/Runtime/r3/posix/utf8-posix.cpp
@@ -324,11 +324,7 @@ static int rtStrConvertUncached(const void *pvInput, size_t cbInput, const char
const void *pvInputLeft = pvInput;
void *pvOutputLeft = pvOutput;
size_t cchNonRev;

View File

@ -1,9 +1,10 @@
This patch avoids an assertion in the VboxBFE frontend when the PS/2 model does
not manage to read out the mouse events quick enough. The PS/2 model is still
alive but reads out the buffer with some delay.
mouse.patch
+++ src/app/virtualbox/src/VBox/Devices/Input/DrvMouseQueue.cpp
@@ -101,6 +101,7 @@
diff --git a/src/app/virtualbox/src/VBox/Devices/Input/DrvMouseQueue.cpp b/src/app/virtualbox/src/VBox/Devices/Input/DrvMouseQueue.cpp
index 9d0a8d2..7eb6a09 100644
--- a/src/app/virtualbox/src/VBox/Devices/Input/DrvMouseQueue.cpp
+++ b/src/app/virtualbox/src/VBox/Devices/Input/DrvMouseQueue.cpp
@@ -119,6 +119,7 @@ static DECLCALLBACK(void *) drvMouseQueueQueryInterface(PPDMIBASE pInterface, c
/**
* @interface_method_impl{PDMIMOUSEPORT,pfnPutEvent}
*/
@ -11,7 +12,7 @@ alive but reads out the buffer with some delay.
static DECLCALLBACK(int) drvMouseQueuePutEvent(PPDMIMOUSEPORT pInterface,
int32_t dx, int32_t dy,
int32_t dz, int32_t dw,
@@ -121,7 +122,8 @@
@@ -141,7 +142,8 @@ static DECLCALLBACK(int) drvMouseQueuePutEvent(PPDMIMOUSEPORT pInterface,
PDMQueueInsert(pDrv->pQueue, &pItem->Core);
return VINF_SUCCESS;
}
@ -21,7 +22,7 @@ alive but reads out the buffer with some delay.
}
/**
@@ -147,7 +149,8 @@
@@ -169,7 +171,8 @@ static DECLCALLBACK(int) drvMouseQueuePutEventAbs(PPDMIMOUSEPORT pInterface,
PDMQueueInsert(pDrv->pQueue, &pItem->Core);
return VINF_SUCCESS;
}

View File

@ -1,18 +1,10 @@
+++ src/app/virtualbox/src/VBox/Devices/Network/DevPCNet.cpp
@@ -5331,6 +5331,11 @@
rc = PDMDevHlpDriverAttach(pDevIns, 0, &pThis->IBase, &pThis->pDrvBase, "Network Port");
if (RT_SUCCESS(rc))
{
+ /* Genode: read out the mac address from nic_session interface */
+ PPDMINETWORKCONFIG pDrvConfig = PDMIBASE_QUERY_INTERFACE(pThis->pDrvBase, PDMINETWORKCONFIG);
+ Assert(pDrvConfig && pDrvConfig->pfnGetMac);
+ pDrvConfig->pfnGetMac(pDrvConfig, &pThis->MacConfigured);
+
if (rc == VINF_NAT_DNS)
{
#ifdef RT_OS_LINUX
+++ src/app/virtualbox/src/VBox/Devices/Network/DevE1000.cpp
@@ -7512,6 +7519,35 @@
network.patch
diff --git a/src/app/virtualbox/src/VBox/Devices/Network/DevE1000.cpp b/src/app/virtualbox/src/VBox/Devices/Network/DevE1000.cpp
index aa3eb87..fc2660a 100644
--- a/src/app/virtualbox/src/VBox/Devices/Network/DevE1000.cpp
+++ b/src/app/virtualbox/src/VBox/Devices/Network/DevE1000.cpp
@@ -7519,6 +7519,35 @@ static DECLCALLBACK(int) e1kR3Construct(PPDMDEVINS pDevIns, int iInstance, PCFGM
pThis->fR0Enabled ? "enabled" : "disabled",
pThis->fRCEnabled ? "enabled" : "disabled"));
@ -48,7 +40,7 @@
/* Initialize the EEPROM. */
pThis->eeprom.init(pThis->macConfigured);
@@ -7670,28 +7706,6 @@
@@ -7677,28 +7706,6 @@ static DECLCALLBACK(int) e1kR3Construct(PPDMDEVINS pDevIns, int iInstance, PCFGM
return PDMDEV_SET_ERROR(pDevIns, rc, N_("Failed to attach the status LUN"));
pThis->pLedsConnector = PDMIBASE_QUERY_INTERFACE(pBase, PDMILEDCONNECTORS);
@ -77,3 +69,19 @@
rc = RTSemEventCreate(&pThis->hEventMoreRxDescAvail);
if (RT_FAILURE(rc))
return rc;
diff --git a/src/app/virtualbox/src/VBox/Devices/Network/DevPCNet.cpp b/src/app/virtualbox/src/VBox/Devices/Network/DevPCNet.cpp
index 481267e..80f4af9 100644
--- a/src/app/virtualbox/src/VBox/Devices/Network/DevPCNet.cpp
+++ b/src/app/virtualbox/src/VBox/Devices/Network/DevPCNet.cpp
@@ -5056,6 +5056,11 @@ static DECLCALLBACK(int) pcnetConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGM
rc = PDMDevHlpDriverAttach(pDevIns, 0, &pThis->IBase, &pThis->pDrvBase, "Network Port");
if (RT_SUCCESS(rc))
{
+ /* Genode: read out the mac address from nic_session interface */
+ PPDMINETWORKCONFIG pDrvConfig = PDMIBASE_QUERY_INTERFACE(pThis->pDrvBase, PDMINETWORKCONFIG);
+ Assert(pDrvConfig && pDrvConfig->pfnGetMac);
+ pDrvConfig->pfnGetMac(pDrvConfig, &pThis->MacConfigured);
+
if (rc == VINF_NAT_DNS)
{
#ifdef RT_OS_LINUX

View File

@ -1,5 +1,10 @@
+++ src/app/virtualbox/src/VBox/VMM/VMMR3/PDMDriver.cpp
@@ -1550,7 +1550,11 @@
pdm_driver.patch
diff --git a/src/app/virtualbox/src/VBox/VMM/VMMR3/PDMDriver.cpp b/src/app/virtualbox/src/VBox/VMM/VMMR3/PDMDriver.cpp
index 80e4efc..43b3bfc 100644
--- a/src/app/virtualbox/src/VBox/VMM/VMMR3/PDMDriver.cpp
+++ b/src/app/virtualbox/src/VBox/VMM/VMMR3/PDMDriver.cpp
@@ -1550,7 +1550,11 @@ static DECLCALLBACK(int) pdmR3DrvHlp_AsyncCompletionTemplateCreate(PPDMDRVINS pD
LogFlow(("pdmR3DrvHlp_AsyncCompletionTemplateCreate: caller='%s'/%d: ppTemplate=%p pfnCompleted=%p pszDesc=%p:{%s}\n",
pDrvIns->pReg->szName, pDrvIns->iInstance, ppTemplate, pfnCompleted, pszDesc, pszDesc));

View File

@ -1,4 +1,9 @@
+++ src/app/virtualbox/src/VBox/VMM/VMMR3/VMEmt.cpp
poke.patch
diff --git a/src/app/virtualbox/src/VBox/VMM/VMMR3/VMEmt.cpp b/src/app/virtualbox/src/VBox/VMM/VMMR3/VMEmt.cpp
index f52b3c7..8135443 100644
--- a/src/app/virtualbox/src/VBox/VMM/VMMR3/VMEmt.cpp
+++ b/src/app/virtualbox/src/VBox/VMM/VMMR3/VMEmt.cpp
@@ -804,6 +804,20 @@ static DECLCALLBACK(int) vmR3HaltGlobal1Wait(PUVMCPU pUVCpu)
*/
static DECLCALLBACK(void) vmR3HaltGlobal1NotifyCpuFF(PUVMCPU pUVCpu, uint32_t fFlags)

View File

@ -1,5 +1,10 @@
+++ src/app/virtualbox/src/VBox/VMM/VMMR3/TRPM.cpp
@@ -1561,6 +1561,17 @@
rem_irq.patch
diff --git a/src/app/virtualbox/src/VBox/VMM/VMMR3/TRPM.cpp b/src/app/virtualbox/src/VBox/VMM/VMMR3/TRPM.cpp
index 8c12949..a7fd67e 100644
--- a/src/app/virtualbox/src/VBox/VMM/VMMR3/TRPM.cpp
+++ b/src/app/virtualbox/src/VBox/VMM/VMMR3/TRPM.cpp
@@ -1561,6 +1561,17 @@ VMMR3DECL(int) TRPMR3InjectEvent(PVM pVM, PVMCPU pVCpu, TRPMEVENT enmEvent)
return HMR3IsActive(pVCpu) ? VINF_EM_RESCHEDULE_HM : VINF_EM_RESCHEDULE_REM; /* (Heed the halted state if this is changed!) */
}
#else /* !TRPM_FORWARD_TRAPS_IN_GC */
@ -17,7 +22,7 @@
uint8_t u8Interrupt;
int rc = PDMGetInterrupt(pVCpu, &u8Interrupt);
Log(("TRPMR3InjectEvent: u8Interrupt=%d (%#x) rc=%Rrc\n", u8Interrupt, u8Interrupt, rc));
@@ -1571,6 +1582,7 @@
@@ -1571,6 +1582,7 @@ VMMR3DECL(int) TRPMR3InjectEvent(PVM pVM, PVMCPU pVCpu, TRPMEVENT enmEvent)
STAM_COUNTER_INC(&pVM->trpm.s.paStatForwardedIRQR3[u8Interrupt]);
return HMR3IsActive(pVCpu) ? VINF_EM_RESCHEDULE_HM : VINF_EM_RESCHEDULE_REM;
}

View File

@ -1,5 +1,10 @@
+++ src/app/virtualbox/src/VBox/Devices/Serial/DrvHostSerial.cpp
@@ -903,6 +903,7 @@
serial.patch
diff --git a/src/app/virtualbox/src/VBox/Devices/Serial/DrvHostSerial.cpp b/src/app/virtualbox/src/VBox/Devices/Serial/DrvHostSerial.cpp
index 0c44fad..34b7fea 100644
--- a/src/app/virtualbox/src/VBox/Devices/Serial/DrvHostSerial.cpp
+++ b/src/app/virtualbox/src/VBox/Devices/Serial/DrvHostSerial.cpp
@@ -903,6 +903,7 @@ static DECLCALLBACK(int) drvHostSerialMonitorThread(PPDMDRVINS pDrvIns, PPDMTHRE
PDMDrvHlpVMSetRuntimeError(pDrvIns, 0 /*fFlags*/, "DrvHostSerialFail",
N_("Ioctl failed for serial host device '%s' (%Rrc). The device will not work properly"),
pThis->pszDevicePath, RTErrConvertFromErrno(errno));

View File

@ -0,0 +1,21 @@
acpi_drv.patch
dev_e1000.patch
eminternal.patch
iconv.patch
mouse.patch
pdm_driver.patch
poke.patch
sharedfolder_pagelist.patch
time-log-deadlock.patch
tm_retries.patch
vbox_inc.patch
vbox_main.patch
network.patch
vga_fb.patch
vga_vbva.patch
vmdk.patch
vmmdev.patch
avoid_yield.patch
serial.patch
rem_irq.patch
usb.patch

View File

@ -1,5 +1,10 @@
+++ src/app/virtualbox/src/VBox/HostServices/SharedFolders/service.cpp
@@ -546,6 +546,14 @@
sharedfolder_pagelist.patch
diff --git a/src/app/virtualbox/src/VBox/HostServices/SharedFolders/service.cpp b/src/app/virtualbox/src/VBox/HostServices/SharedFolders/service.cpp
index 49a0006..499d541 100644
--- a/src/app/virtualbox/src/VBox/HostServices/SharedFolders/service.cpp
+++ b/src/app/virtualbox/src/VBox/HostServices/SharedFolders/service.cpp
@@ -549,6 +549,14 @@ static DECLCALLBACK(void) svcCall (void *, VBOXHGCMCALLHANDLE callHandle, uint32
}
else
{
@ -14,7 +19,7 @@
/* Execute the function. */
if (pStatusLed)
{
@@ -559,13 +567,25 @@
@@ -562,13 +570,25 @@ static DECLCALLBACK(void) svcCall (void *, VBOXHGCMCALLHANDLE callHandle, uint32
if (RT_SUCCESS(rc))
{
@ -41,7 +46,7 @@
}
}
break;
@@ -613,6 +633,16 @@
@@ -616,6 +636,16 @@ static DECLCALLBACK(void) svcCall (void *, VBOXHGCMCALLHANDLE callHandle, uint32
}
else
{
@ -58,7 +63,7 @@
/* Execute the function. */
if (pStatusLed)
{
@@ -626,13 +656,25 @@
@@ -629,13 +659,25 @@ static DECLCALLBACK(void) svcCall (void *, VBOXHGCMCALLHANDLE callHandle, uint32
if (RT_SUCCESS(rc))
{

View File

@ -1,5 +1,10 @@
+++ src/app/virtualbox/src/VBox/Runtime/common/log/log.cpp
@@ -3063,7 +3066,8 @@
time-log-deadlock.patch
diff --git a/src/app/virtualbox/src/VBox/Runtime/common/log/log.cpp b/src/app/virtualbox/src/VBox/Runtime/common/log/log.cpp
index 62463c4..f10baad 100644
--- a/src/app/virtualbox/src/VBox/Runtime/common/log/log.cpp
+++ b/src/app/virtualbox/src/VBox/Runtime/common/log/log.cpp
@@ -3128,7 +3128,8 @@ static DECLCALLBACK(size_t) rtLogOutputPrefixed(void *pv, const char *pachChars,
{
#if defined(IN_RING3) || defined(IN_RC)

View File

@ -1,22 +1,9 @@
Wait longer for stable timer state
Some functions in the time manager, for example 'TMTimerSet()' and
'TMTimerStop()' let VirtualBox abort with a failed assertion if the timer
does not change to a 'stable' state after 1000 calls of a mixture of
'yield' and 'sleep'. On Genode, this happens sometimes when the 'EMT'
thread is executing 'TMTimerSet()' and gets interrupted by the 'TAP'
thread, which calls 'TMTimerStop()' and waits for the 'EMT' thread to
finish setting the timer. Since the 'EMT' thread has the lowest priority,
1000 retries can be too few. Without the assertion, these functions would
return an error code, which is often ignored by the caller, so it seems
safer to keep retrying until the function can return successfully.
tm_retries.patch
Issue #1437
diff --git src/app/virtualbox/src/VBox/VMM/VMMAll/TMAll.cpp src/app/virtualbox/src/VBox/VMM/VMMAll/TMAll.cpp
diff --git a/src/app/virtualbox/src/VBox/VMM/VMMAll/TMAll.cpp b/src/app/virtualbox/src/VBox/VMM/VMMAll/TMAll.cpp
index a1167a1..fbf95e2 100644
--- src/app/virtualbox/src/VBox/VMM/VMMAll/TMAll.cpp
+++ src/app/virtualbox/src/VBox/VMM/VMMAll/TMAll.cpp
--- a/src/app/virtualbox/src/VBox/VMM/VMMAll/TMAll.cpp
+++ b/src/app/virtualbox/src/VBox/VMM/VMMAll/TMAll.cpp
@@ -1334,6 +1334,12 @@ VMMDECL(int) TMTimerSet(PTMTIMER pTimer, uint64_t u64Expire)
AssertMsgFailed(("Unknown timer state %d (%s)\n", enmState, R3STRING(pTimer->pszDesc)));
return VERR_TM_UNKNOWN_STATE;
@ -69,10 +56,10 @@ index a1167a1..fbf95e2 100644
} while (cRetries-- > 0);
AssertMsgFailed(("Failed waiting for stable state. state=%d (%s)\n", pTimer->enmState, R3STRING(pTimer->pszDesc)));
diff --git src/app/virtualbox/src/VBox/VMM/VMMR3/TM.cpp src/app/virtualbox/src/VBox/VMM/VMMR3/TM.cpp
diff --git a/src/app/virtualbox/src/VBox/VMM/VMMR3/TM.cpp b/src/app/virtualbox/src/VBox/VMM/VMMR3/TM.cpp
index f6f6c8e..c3bc22d 100644
--- src/app/virtualbox/src/VBox/VMM/VMMR3/TM.cpp
+++ src/app/virtualbox/src/VBox/VMM/VMMR3/TM.cpp
--- a/src/app/virtualbox/src/VBox/VMM/VMMR3/TM.cpp
+++ b/src/app/virtualbox/src/VBox/VMM/VMMR3/TM.cpp
@@ -1617,8 +1617,10 @@ VMMR3DECL(int) TMR3TimerDestroy(PTMTIMER pTimer)
TM_UNLOCK_TIMERS(pVM);
if (!RTThreadYield())

View File

@ -1,103 +1,10 @@
+++ src/app/virtualbox/src/VBox/Devices/USB/VUSBDevice.cpp
@@ -230,7 +230,14 @@
if (i != VUSB_PIPE_DEFAULT)
{
vusbMsgFreeExtraData(pDev->aPipes[i].pCtrl);
+
+ int rc = RTCritSectDelete(&pDev->aPipes[i].CritSectCtrl);
+ AssertRC(rc);
+
memset(&pDev->aPipes[i], 0, sizeof(pDev->aPipes[i]));
+
+ rc = RTCritSectInit(&pDev->aPipes[i].CritSectCtrl);
+ AssertRC(rc);
}
}
memset(pDev->paIfStates, 0, pCfgDesc->Core.bNumInterfaces * sizeof(pDev->paIfStates[0]));
@@ -1134,7 +1134,7 @@
vusbUrbDoReapAsyncDev(pDev, RT_INDEFINITE_WAIT);
/* Process any URBs waiting to be cancelled first. */
- int rc = RTReqQueueProcess(pDev->hReqQueueSync, 0); /* Don't wait if there is nothing to do. */
+ int rc = RTReqQueueProcess(pDev->hReqQueueSync, pDev->enmState == VUSB_DEVICE_STATE_RESET ? 5 : 0); /* if in reset state (takes 10ms) sleep a bit - otherwise this thread consumes in this loop a lot of cpu time */
Assert(RT_SUCCESS(rc) || rc == VERR_TIMEOUT);
}
+++ src/app/virtualbox/src/VBox/Main/src-server/MachineImpl.cpp
@@ -13571,6 +13582,7 @@
AutoCaller autoCaller(this);
AssertComRCReturn(autoCaller.rc(), autoCaller.rc());
+#if 0
#ifdef VBOX_WITH_USB
HRESULT rc = mUSBDeviceFilters->notifyProxy(true /* aInsertFilters */);
AssertComRC(rc);
@@ -13579,6 +13591,7 @@
USBProxyService *service = mParent->host()->usbProxyService();
AssertReturn(service, E_FAIL);
return service->autoCaptureDevicesForVM(this);
+#endif /* if 0 */
#else
return S_OK;
#endif
@@ -13601,6 +13614,7 @@
AutoCaller autoCaller(this);
AssertComRCReturn(autoCaller.rc(), autoCaller.rc());
+#if 0
#ifdef VBOX_WITH_USB
HRESULT rc = mUSBDeviceFilters->notifyProxy(false /* aInsertFilters */);
AssertComRC(rc);
@@ -13609,6 +13623,7 @@
USBProxyService *service = mParent->host()->usbProxyService();
AssertReturn(service, E_FAIL);
return service->detachAllDevicesFromVM(this, !!aDone, false /* aAbnormal */);
+#endif /* if 0 */
#else
NOREF(aDone);
return S_OK;
+++ src/app/virtualbox/src/VBox/Main/include/Matching.h
@@ -291,10 +291,12 @@
return mValueAny || mValue == aValue;
}
+#if 0
bool isMatch (const BOOL aValue) const
{
return isMatch (bool (aValue == TRUE));
}
+#endif /* if 0 */
private:
+++ src/app/virtualbox/src/VBox/Main/src-server/USBDeviceFiltersImpl.cpp
@@ -1037,13 +1037,10 @@
LogFlowThisFunc(("aInsertFilters=%RTbool\n", aInsertFilters));
AutoCaller autoCaller(this);
- AssertComRCReturn(autoCaller.rc(), false);
+ AssertComRCReturnRC(autoCaller.rc());
AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
- USBProxyService *pProxySvc = m->pHost->usbProxyService();
- AssertReturn(pProxySvc, E_FAIL);
-
DeviceFilterList::const_iterator it = m->llDeviceFilters->begin();
while (it != m->llDeviceFilters->end())
{
@@ -1054,6 +1051,9 @@
&& pFilter->getData().mRemote.isMatch(false) /* and if the filter is NOT remote */
)
{
+ USBProxyService *pProxySvc = m->pHost->usbProxyService();
+ AssertReturn(pProxySvc, E_FAIL);
+
if (aInsertFilters)
{
AssertReturn(pFilter->getId() == NULL, E_FAIL);
+++ src/app/virtualbox/src/VBox/Devices/USB/USBProxyDevice.cpp
@@ -843,10 +843,14 @@
usb.patch
diff --git a/src/app/virtualbox/src/VBox/Devices/USB/USBProxyDevice.cpp b/src/app/virtualbox/src/VBox/Devices/USB/USBProxyDevice.cpp
index a51bc36..bed42e8 100644
--- a/src/app/virtualbox/src/VBox/Devices/USB/USBProxyDevice.cpp
+++ b/src/app/virtualbox/src/VBox/Devices/USB/USBProxyDevice.cpp
@@ -843,10 +843,14 @@ static DECLCALLBACK(int) usbProxyConstruct(PPDMUSBINS pUsbIns, int iInstance, PC
/*
* Select backend and open the device.
*/
@ -112,8 +19,39 @@
pThis->pvInstanceDataR3 = RTMemAllocZ(pThis->pOps->cbBackend);
if (!pThis->pvInstanceDataR3)
+++ src/app/virtualbox/src/VBox/Devices/build/VBoxDD.cpp
@@ -39,6 +39,7 @@
diff --git a/src/app/virtualbox/src/VBox/Devices/USB/VUSBDevice.cpp b/src/app/virtualbox/src/VBox/Devices/USB/VUSBDevice.cpp
index 4790fcb..4efa818 100644
--- a/src/app/virtualbox/src/VBox/Devices/USB/VUSBDevice.cpp
+++ b/src/app/virtualbox/src/VBox/Devices/USB/VUSBDevice.cpp
@@ -230,7 +230,14 @@ bool vusbDevDoSelectConfig(PVUSBDEV pDev, PCVUSBDESCCONFIGEX pCfgDesc)
if (i != VUSB_PIPE_DEFAULT)
{
vusbMsgFreeExtraData(pDev->aPipes[i].pCtrl);
+
+ int rc = RTCritSectDelete(&pDev->aPipes[i].CritSectCtrl);
+ AssertRC(rc);
+
memset(&pDev->aPipes[i], 0, sizeof(pDev->aPipes[i]));
+
+ rc = RTCritSectInit(&pDev->aPipes[i].CritSectCtrl);
+ AssertRC(rc);
}
}
memset(pDev->paIfStates, 0, pCfgDesc->Core.bNumInterfaces * sizeof(pDev->paIfStates[0]));
@@ -1134,7 +1141,7 @@ static DECLCALLBACK(int) vusbDevUrbIoThread(RTTHREAD hThread, void *pvUser)
vusbUrbDoReapAsyncDev(pDev, RT_INDEFINITE_WAIT);
/* Process any URBs waiting to be cancelled first. */
- int rc = RTReqQueueProcess(pDev->hReqQueueSync, 0); /* Don't wait if there is nothing to do. */
+ int rc = RTReqQueueProcess(pDev->hReqQueueSync, pDev->enmState == VUSB_DEVICE_STATE_RESET ? 5 : 0); /* if in reset state (takes 10ms) sleep a bit - otherwise this thread consumes in this loop a lot of cpu time */
Assert(RT_SUCCESS(rc) || rc == VERR_TIMEOUT);
}
diff --git a/src/app/virtualbox/src/VBox/Devices/build/VBoxDD.cpp b/src/app/virtualbox/src/VBox/Devices/build/VBoxDD.cpp
index 3173a36..8105987 100644
--- a/src/app/virtualbox/src/VBox/Devices/build/VBoxDD.cpp
+++ b/src/app/virtualbox/src/VBox/Devices/build/VBoxDD.cpp
@@ -39,6 +39,7 @@ const void *g_apvVBoxDDDependencies[] =
NULL,
};
@ -121,7 +59,7 @@
/**
* Register builtin devices.
@@ -329,6 +330,7 @@
@@ -329,6 +330,7 @@ extern "C" DECLEXPORT(int) VBoxDriversRegister(PCPDMDRVREGCB pCallbacks, uint32_
return VINF_SUCCESS;
}
@ -129,3 +67,85 @@
/**
* Register builtin USB device.
diff --git a/src/app/virtualbox/src/VBox/Main/include/Matching.h b/src/app/virtualbox/src/VBox/Main/include/Matching.h
index 2f01f69..9b13e37 100644
--- a/src/app/virtualbox/src/VBox/Main/include/Matching.h
+++ b/src/app/virtualbox/src/VBox/Main/include/Matching.h
@@ -291,10 +291,12 @@ public:
return mValueAny || mValue == aValue;
}
+#if 0
bool isMatch (const BOOL aValue) const
{
return isMatch (bool (aValue == TRUE));
}
+#endif /* if 0 */
private:
diff --git a/src/app/virtualbox/src/VBox/Main/src-server/MachineImpl.cpp b/src/app/virtualbox/src/VBox/Main/src-server/MachineImpl.cpp
index 5fcb53c..b4016b2 100644
--- a/src/app/virtualbox/src/VBox/Main/src-server/MachineImpl.cpp
+++ b/src/app/virtualbox/src/VBox/Main/src-server/MachineImpl.cpp
@@ -13582,6 +13582,7 @@ STDMETHODIMP SessionMachine::AutoCaptureUSBDevices()
AutoCaller autoCaller(this);
AssertComRCReturn(autoCaller.rc(), autoCaller.rc());
+#if 0
#ifdef VBOX_WITH_USB
HRESULT rc = mUSBDeviceFilters->notifyProxy(true /* aInsertFilters */);
AssertComRC(rc);
@@ -13590,6 +13591,7 @@ STDMETHODIMP SessionMachine::AutoCaptureUSBDevices()
USBProxyService *service = mParent->host()->usbProxyService();
AssertReturn(service, E_FAIL);
return service->autoCaptureDevicesForVM(this);
+#endif /* if 0 */
#else
return S_OK;
#endif
@@ -13612,6 +13614,7 @@ STDMETHODIMP SessionMachine::DetachAllUSBDevices(BOOL aDone)
AutoCaller autoCaller(this);
AssertComRCReturn(autoCaller.rc(), autoCaller.rc());
+#if 0
#ifdef VBOX_WITH_USB
HRESULT rc = mUSBDeviceFilters->notifyProxy(false /* aInsertFilters */);
AssertComRC(rc);
@@ -13620,6 +13623,7 @@ STDMETHODIMP SessionMachine::DetachAllUSBDevices(BOOL aDone)
USBProxyService *service = mParent->host()->usbProxyService();
AssertReturn(service, E_FAIL);
return service->detachAllDevicesFromVM(this, !!aDone, false /* aAbnormal */);
+#endif /* if 0 */
#else
NOREF(aDone);
return S_OK;
diff --git a/src/app/virtualbox/src/VBox/Main/src-server/USBDeviceFiltersImpl.cpp b/src/app/virtualbox/src/VBox/Main/src-server/USBDeviceFiltersImpl.cpp
index 09b42f5..c179ca6 100644
--- a/src/app/virtualbox/src/VBox/Main/src-server/USBDeviceFiltersImpl.cpp
+++ b/src/app/virtualbox/src/VBox/Main/src-server/USBDeviceFiltersImpl.cpp
@@ -1037,13 +1037,10 @@ HRESULT USBDeviceFilters::notifyProxy(bool aInsertFilters)
LogFlowThisFunc(("aInsertFilters=%RTbool\n", aInsertFilters));
AutoCaller autoCaller(this);
- AssertComRCReturn(autoCaller.rc(), false);
+ AssertComRCReturnRC(autoCaller.rc());
AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
- USBProxyService *pProxySvc = m->pHost->usbProxyService();
- AssertReturn(pProxySvc, E_FAIL);
-
DeviceFilterList::const_iterator it = m->llDeviceFilters->begin();
while (it != m->llDeviceFilters->end())
{
@@ -1054,6 +1051,9 @@ HRESULT USBDeviceFilters::notifyProxy(bool aInsertFilters)
&& pFilter->getData().mRemote.isMatch(false) /* and if the filter is NOT remote */
)
{
+ USBProxyService *pProxySvc = m->pHost->usbProxyService();
+ AssertReturn(pProxySvc, E_FAIL);
+
if (aInsertFilters)
{
AssertReturn(pFilter->getId() == NULL, E_FAIL);

View File

@ -1,5 +1,25 @@
+++ src/app/virtualbox/include/VBox/com/array.h
@@ -219,10 +219,10 @@
vbox_inc.patch
diff --git a/src/app/virtualbox/include/VBox/com/ErrorInfo.h b/src/app/virtualbox/include/VBox/com/ErrorInfo.h
index 869b998..c6adf70 100644
--- a/src/app/virtualbox/include/VBox/com/ErrorInfo.h
+++ b/src/app/virtualbox/include/VBox/com/ErrorInfo.h
@@ -31,8 +31,8 @@
#include "VBox/com/Guid.h"
#include "VBox/com/assert.h"
-struct IProgress;
-struct IVirtualBoxErrorInfo;
+//struct IProgress;
+//struct IVirtualBoxErrorInfo;
namespace com
{
diff --git a/src/app/virtualbox/include/VBox/com/array.h b/src/app/virtualbox/include/VBox/com/array.h
index 77f9d60..dcbad41 100644
--- a/src/app/virtualbox/include/VBox/com/array.h
+++ b/src/app/virtualbox/include/VBox/com/array.h
@@ -219,10 +219,10 @@ struct SafeArrayTraits
protected:
/** Initializes memory for aElem. */
@ -12,49 +32,11 @@
/** Creates a deep copy of aFrom and stores it in aTo. */
static void Copy(const T &aFrom, T &aTo) { aTo = aFrom; }
+++ src/app/virtualbox/include/VBox/com/ErrorInfo.h
@@ -31,8 +31,8 @@
#include "VBox/com/Guid.h"
#include "VBox/com/assert.h"
-struct IProgress;
-struct IVirtualBoxErrorInfo;
+//struct IProgress;
+//struct IVirtualBoxErrorInfo;
namespace com
{
+++ src/app/virtualbox/include/VBox/com/string.h
@@ -109,11 +109,13 @@
}
#if defined(VBOX_WITH_XPCOM)
+/*
Bstr(const wchar_t *that)
{
AssertCompile(sizeof(wchar_t) == sizeof(OLECHAR));
copyFrom((const OLECHAR *)that);
}
+*/
#endif
Bstr(const RTCString &that)
@@ -151,12 +153,14 @@
}
#if defined(VBOX_WITH_XPCOM)
+/*
Bstr& operator=(const wchar_t *that)
{
cleanup();
copyFrom((const OLECHAR *)that);
return *this;
}
+*/
#endif
Bstr& setNull()
@@ -247,7 +251,7 @@
diff --git a/src/app/virtualbox/include/VBox/com/string.h b/src/app/virtualbox/include/VBox/com/string.h
index 263dc40..768c336 100644
--- a/src/app/virtualbox/include/VBox/com/string.h
+++ b/src/app/virtualbox/include/VBox/com/string.h
@@ -247,7 +247,7 @@ public:
* returns a pointer to a global variable containing an empty BSTR with a proper zero
* length prefix so that Windows is happy.
*/
@ -63,8 +45,11 @@
{
if (m_bstr)
return m_bstr;
+++ src/app/virtualbox/include/VBox/vmm/hm_vmx.h
@@ -1859,10 +1859,10 @@
diff --git a/src/app/virtualbox/include/VBox/vmm/hm_vmx.h b/src/app/virtualbox/include/VBox/vmm/hm_vmx.h
index 7deb357..668764c 100644
--- a/src/app/virtualbox/include/VBox/vmm/hm_vmx.h
+++ b/src/app/virtualbox/include/VBox/vmm/hm_vmx.h
@@ -1859,10 +1859,10 @@ DECLINLINE(int) VMXEnable(RTHCPHYS pVMXOn)
".byte 0xF3, 0x0F, 0xC7, 0x34, 0x24 # VMXON [esp] \n\t"
"ja 2f \n\t"
"je 1f \n\t"
@ -77,7 +62,7 @@
"2: \n\t"
"add $8, %%esp \n\t"
:"=rm"(rc)
@@ -1952,7 +1952,7 @@
@@ -1952,7 +1952,7 @@ DECLINLINE(int) VMXClearVmcs(RTHCPHYS pVMCS)
"push %2 \n\t"
".byte 0x66, 0x0F, 0xC7, 0x34, 0x24 # VMCLEAR [esp] \n\t"
"jnc 1f \n\t"
@ -86,7 +71,7 @@
"1: \n\t"
"add $8, %%esp \n\t"
:"=rm"(rc)
@@ -2009,7 +2009,7 @@
@@ -2009,7 +2009,7 @@ DECLINLINE(int) VMXActivateVmcs(RTHCPHYS pVMCS)
"push %2 \n\t"
".byte 0x0F, 0xC7, 0x34, 0x24 # VMPTRLD [esp] \n\t"
"jnc 1f \n\t"
@ -95,7 +80,7 @@
"1: \n\t"
"add $8, %%esp \n\t"
:"=rm"(rc)
@@ -2079,10 +2079,10 @@
@@ -2079,10 +2079,10 @@ DECLINLINE(int) VMXWriteVmcs32(uint32_t idxField, uint32_t u32Val)
".byte 0x0F, 0x79, 0xC2 # VMWRITE eax, edx \n\t"
"ja 2f \n\t"
"je 1f \n\t"
@ -108,7 +93,7 @@
"2: \n\t"
:"=rm"(rc)
:"0"(VINF_SUCCESS),
@@ -2207,14 +2207,14 @@
@@ -2207,14 +2207,14 @@ DECLINLINE(int) VMXReadVmcs32(uint32_t idxField, uint32_t *pData)
# if RT_INLINE_ASM_GNU_STYLE
int rc = VINF_SUCCESS;
__asm__ __volatile__ (

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,10 @@
+++ src/app/virtualbox/src/VBox/Devices/Graphics/DevVGA.cpp
@@ -3468,9 +3475,15 @@
vga_fb.patch
diff --git a/src/app/virtualbox/src/VBox/Devices/Graphics/DevVGA.cpp b/src/app/virtualbox/src/VBox/Devices/Graphics/DevVGA.cpp
index a21fe7e..5b3b9b3 100644
--- a/src/app/virtualbox/src/VBox/Devices/Graphics/DevVGA.cpp
+++ b/src/app/virtualbox/src/VBox/Devices/Graphics/DevVGA.cpp
@@ -3494,9 +3494,15 @@ static DECLCALLBACK(int) vgaR3LFBAccessHandler(PVM pVM, RTGCPHYS GCPhys, void *p
int rc;
Assert(pThis);
Assert(GCPhys >= pThis->GCPhysVRAM);

View File

@ -1,5 +1,10 @@
+++ src/app/virtualbox/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp
@@ -536,7 +536,8 @@
vga_vbva.patch
diff --git a/src/app/virtualbox/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp b/src/app/virtualbox/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp
index 28ab4a8..1cc8e6b 100644
--- a/src/app/virtualbox/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp
+++ b/src/app/virtualbox/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp
@@ -546,7 +546,8 @@ static int vbvaDisable (unsigned uScreenId, PVGASTATE pVGAState, VBVACONTEXT *pC
pView->u32VBVAOffset = HGSMIOFFSET_VOID;
}
@ -8,4 +13,4 @@
+ pVGAState->pDrv->pfnVBVADisable (pVGAState->pDrv, uScreenId);
return VINF_SUCCESS;
}

View File

@ -1,13 +1,18 @@
+++ src/app/virtualbox/src/VBox/Storage/VMDK.cpp
@@ -6114,7 +6114,6 @@
vmdk.patch
diff --git a/src/app/virtualbox/src/VBox/Storage/VMDK.cpp b/src/app/virtualbox/src/VBox/Storage/VMDK.cpp
index f749ee4..0c5d49e 100644
--- a/src/app/virtualbox/src/VBox/Storage/VMDK.cpp
+++ b/src/app/virtualbox/src/VBox/Storage/VMDK.cpp
@@ -5771,7 +5771,6 @@ static int vmdkRead(void *pBackendData, uint64_t uOffset, size_t cbToRead,
}
pExtent->uGrainSectorAbs = uSectorExtentAbs;
pExtent->uGrain = uSectorExtentRel / pExtent->cSectorsPerGrain;
- Assert(uLBA == uSectorExtentRel);
}
memcpy(pvBuf, (uint8_t *)pExtent->pvGrain + VMDK_SECTOR2BYTE(uSectorInGrain), cbToRead);
}
@@ -6258,7 +6257,6 @@
vdIfIoIntIoCtxCopyTo(pImage->pIfIo, pIoCtx,
(uint8_t *)pExtent->pvGrain
@@ -5920,7 +5919,6 @@ static int vmdkWrite(void *pBackendData, uint64_t uOffset, size_t cbToWrite,
* which is somewhere between expensive and impossible. */
rc = VERR_VD_VMDK_INVALID_STATE;
pExtent->uGrainSectorAbs = 0;

View File

@ -1,5 +1,10 @@
+++ src/app/virtualbox/src/VBox/Devices/VMMDev/VMMDev.cpp
@@ -2179,6 +2179,10 @@
vmmdev.patch
diff --git a/src/app/virtualbox/src/VBox/Devices/VMMDev/VMMDev.cpp b/src/app/virtualbox/src/VBox/Devices/VMMDev/VMMDev.cpp
index 8ce46a8..a6b84b0 100644
--- a/src/app/virtualbox/src/VBox/Devices/VMMDev/VMMDev.cpp
+++ b/src/app/virtualbox/src/VBox/Devices/VMMDev/VMMDev.cpp
@@ -2179,6 +2179,10 @@ static int vmmdevReqHandler_GetPageSharingStatus(PVMMDEV pThis, VMMDevRequestHea
("%u\n", pReq->header.size), VERR_INVALID_PARAMETER);
pReq->fEnabled = false;
@ -10,7 +15,7 @@
int rc = pThis->pDrv->pfnIsPageFusionEnabled(pThis->pDrv, &pReq->fEnabled);
if (RT_FAILURE(rc))
pReq->fEnabled = false;
@@ -2404,7 +2408,6 @@
@@ -2404,7 +2408,6 @@ static int vmmdevReqDispatcher(PVMMDEV pThis, VMMDevRequestHeader *pReqHdr, RTGC
pReqHdr->rc = vmmdevReqHandler_HGCMCall(pThis, pReqHdr, GCPhysReqHdr);
*pfDelayedUnlock = true;
break;
@ -18,7 +23,7 @@
case VMMDevReq_HGCMCancel:
pReqHdr->rc = vmmdevReqHandler_HGCMCancel(pThis, pReqHdr, GCPhysReqHdr);
@@ -2414,6 +2417,7 @@
@@ -2414,6 +2417,7 @@ static int vmmdevReqDispatcher(PVMMDEV pThis, VMMDevRequestHeader *pReqHdr, RTGC
case VMMDevReq_HGCMCancel2:
pReqHdr->rc = vmmdevReqHandler_HGCMCancel2(pThis, pReqHdr);
break;
@ -26,7 +31,7 @@
case VMMDevReq_VideoAccelEnable:
pReqHdr->rc = vmmdevReqHandler_VideoAccelEnable(pThis, pReqHdr);
@@ -3595,8 +3599,10 @@
@@ -3595,8 +3599,10 @@ static DECLCALLBACK(void) vmmdevReset(PPDMDEVINS pDevIns)
/* disabled statistics updating */
pThis->u32LastStatIntervalSize = 0;
@ -37,7 +42,10 @@
/*
* Clear the event variables.
+++ src/app/virtualbox/src/VBox/Devices/VMMDev/VMMDevHGCM.cpp
diff --git a/src/app/virtualbox/src/VBox/Devices/VMMDev/VMMDevHGCM.cpp b/src/app/virtualbox/src/VBox/Devices/VMMDev/VMMDevHGCM.cpp
index d495599..21dfada 100644
--- a/src/app/virtualbox/src/VBox/Devices/VMMDev/VMMDevHGCM.cpp
+++ b/src/app/virtualbox/src/VBox/Devices/VMMDev/VMMDevHGCM.cpp
@@ -19,7 +19,7 @@
/*******************************************************************************
* Header Files *

View File

@ -1,4 +1,5 @@
VBOX_CC_OPT += -DVBOX_WITH_HARDENING
VBOX_CC_OPT += -DVBOX_WITH_GENERIC_SESSION_WATCHER
include $(REP_DIR)/lib/mk/virtualbox-common.inc
@ -6,6 +7,9 @@ CC_WARN += -Wall
TARGET = virtualbox
SRC_CC = frontend/main.cc frontend/console.cc \
frontend/VBoxAPIWrap/MediumFormatWrap.cpp \
frontend/VBoxAPIWrap/TokenWrap.cpp \
frontend/VirtualBoxErrorInfoImpl.cpp \
devices.cc drivers.cc dummies.cc libc.cc \
logger.cc mm.cc pdm.cc pgm.cc rt.cc sup.cc iommio.cc ioport.cc \
hm.cc thread.cc dynlib.cc unimpl.cc
@ -39,6 +43,8 @@ INC_DIR += $(VBOX_DIR)/Main/include
INC_DIR += $(VBOX_DIR)/VMM/include
INC_DIR += $(REP_DIR)/src/virtualbox/frontend
INC_DIR += $(REP_DIR)/src/virtualbox/frontend/VBoxAPIWrap
INC_DIR += $(VBOX_DIR)/Main/xml
# search path to 'scan_code_set_2.h'