~ubuntu-branches/ubuntu/oneiric/virtualbox-ose/oneiric

« back to all changes in this revision

Viewing changes to src/VBox/Main/include/BusAssignmentManager.h

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2011-01-30 23:27:25 UTC
  • mfrom: (0.3.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20110130232725-2ouajjd2ggdet0zd
Tags: 4.0.2-dfsg-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add Apport hook.
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Drop *-source packages.
* Drop ubuntu-01-fix-build-gcc45.patch, fixed upstream.
* Drop ubuntu-02-as-needed.patch, added to the Debian package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: BusAssignmentManager.h 34876 2010-12-09 11:16:00Z vboxsync $ */
 
2
 
 
3
/** @file
 
4
 *
 
5
 * VirtualBox bus slots assignment manager
 
6
 */
 
7
 
 
8
/*
 
9
 * Copyright (C) 2010 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
 
 
26
class BusAssignmentManager
 
27
{
 
28
private:
 
29
    struct State;
 
30
    State* pState;
 
31
 
 
32
    BusAssignmentManager();
 
33
    virtual ~BusAssignmentManager();
 
34
 
 
35
public:
 
36
    static BusAssignmentManager* createInstance(ChipsetType_T chipsetType);
 
37
    virtual void AddRef();
 
38
    virtual void Release();
 
39
 
 
40
    virtual HRESULT assignPciDevice(const char* pszDevName, PCFGMNODE pCfg, PciBusAddress& Address, bool fAddressRequired = false);
 
41
    virtual HRESULT assignPciDevice(const char* pszDevName, PCFGMNODE pCfg)
 
42
    {
 
43
        PciBusAddress Address;
 
44
        return assignPciDevice(pszDevName, pCfg, Address, false);
 
45
    }
 
46
    virtual bool findPciAddress(const char* pszDevName, int iInstance, PciBusAddress& Address);
 
47
    virtual bool hasPciDevice(const char* pszDevName, int iInstance)
 
48
    {
 
49
        PciBusAddress Address;
 
50
        return findPciAddress(pszDevName, iInstance, Address);
 
51
    }
 
52
    virtual void listAttachedPciDevices(ComSafeArrayOut(IPciDeviceAttachment*, aAttached));
 
53
};
 
54
 
 
55
#endif //  __BusAssignmentManager_h