VirtualBox

source: vbox/trunk/src/VBox/Main/include/BusAssignmentManager.h@ 53517

Last change on this file since 53517 was 51612, checked in by vboxsync, 11 years ago

6813 Use of server side API wrapper code - ConsoleImpl.cpp

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.4 KB
Line 
1/* $Id: BusAssignmentManager.h 51612 2014-06-12 16:46:20Z vboxsync $ */
2
3/** @file
4 *
5 * VirtualBox bus slots assignment manager
6 */
7
8/*
9 * Copyright (C) 2010-2014 Oracle Corporation
10 *
11 * This file is part of VirtualBox Open Source Edition (OSE), as
12 * available from http://www.virtualbox.org. This file is free software;
13 * you can redistribute it and/or modify it under the terms of the GNU
14 * General Public License (GPL) as published by the Free Software
15 * Foundation, in version 2 as it comes in the "COPYING" file of the
16 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
17 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
18 */
19#ifndef __BusAssignmentManager_h
20#define __BusAssignmentManager_h
21
22#include "VBox/types.h"
23#include "VBox/pci.h"
24#include "VirtualBoxBase.h"
25#include <vector>
26
27class BusAssignmentManager
28{
29private:
30 struct State;
31 State* pState;
32
33 BusAssignmentManager();
34 virtual ~BusAssignmentManager();
35
36 HRESULT assignPCIDeviceImpl(const char* pszDevName, PCFGMNODE pCfg, PCIBusAddress& GuestAddress,
37 PCIBusAddress HostAddress, bool fGuestAddressRequired = false);
38
39public:
40 static BusAssignmentManager* createInstance(ChipsetType_T chipsetType);
41 virtual void AddRef();
42 virtual void Release();
43
44 virtual HRESULT assignHostPCIDevice(const char* pszDevName, PCFGMNODE pCfg, PCIBusAddress HostAddress,
45 PCIBusAddress& GuestAddress, bool fAddressRequired = false)
46 {
47 return assignPCIDeviceImpl(pszDevName, pCfg, GuestAddress, HostAddress, fAddressRequired);
48 }
49
50 virtual HRESULT assignPCIDevice(const char* pszDevName, PCFGMNODE pCfg, PCIBusAddress& Address, bool fAddressRequired = false)
51 {
52 PCIBusAddress HostAddress;
53 return assignPCIDeviceImpl(pszDevName, pCfg, Address, HostAddress, fAddressRequired);
54 }
55
56 virtual HRESULT assignPCIDevice(const char* pszDevName, PCFGMNODE pCfg)
57 {
58 PCIBusAddress GuestAddress;
59 PCIBusAddress HostAddress;
60 return assignPCIDeviceImpl(pszDevName, pCfg, GuestAddress, HostAddress, false);
61 }
62 virtual bool findPCIAddress(const char* pszDevName, int iInstance, PCIBusAddress& Address);
63 virtual bool hasPCIDevice(const char* pszDevName, int iInstance)
64 {
65 PCIBusAddress Address;
66 return findPCIAddress(pszDevName, iInstance, Address);
67 }
68 virtual void listAttachedPCIDevices(std::vector<ComPtr<IPCIDeviceAttachment> > &aAttached);
69};
70
71#endif // __BusAssignmentManager_h
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette