1 | /* $Id: PCIDeviceAttachmentImpl.h 93115 2022-01-01 11:31:46Z vboxsync $ */
|
---|
2 |
|
---|
3 | /** @file
|
---|
4 | *
|
---|
5 | * PCI attachment information implmentation.
|
---|
6 | */
|
---|
7 |
|
---|
8 | /*
|
---|
9 | * Copyright (C) 2010-2022 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 |
|
---|
20 | #ifndef MAIN_INCLUDED_PCIDeviceAttachmentImpl_h
|
---|
21 | #define MAIN_INCLUDED_PCIDeviceAttachmentImpl_h
|
---|
22 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
23 | # pragma once
|
---|
24 | #endif
|
---|
25 |
|
---|
26 | #include "PCIDeviceAttachmentWrap.h"
|
---|
27 |
|
---|
28 | namespace settings
|
---|
29 | {
|
---|
30 | struct HostPCIDeviceAttachment;
|
---|
31 | }
|
---|
32 |
|
---|
33 | class ATL_NO_VTABLE PCIDeviceAttachment :
|
---|
34 | public PCIDeviceAttachmentWrap
|
---|
35 | {
|
---|
36 | public:
|
---|
37 |
|
---|
38 | DECLARE_COMMON_CLASS_METHODS(PCIDeviceAttachment)
|
---|
39 |
|
---|
40 | // public initializer/uninitializer for internal purposes only
|
---|
41 | HRESULT init(IMachine * aParent,
|
---|
42 | const Utf8Str &aDevName,
|
---|
43 | LONG aHostAddess,
|
---|
44 | LONG aGuestAddress,
|
---|
45 | BOOL fPhysical);
|
---|
46 | HRESULT initCopy(IMachine *aParent, PCIDeviceAttachment *aThat);
|
---|
47 | void uninit();
|
---|
48 |
|
---|
49 | // settings
|
---|
50 | HRESULT i_loadSettings(IMachine * aParent,
|
---|
51 | const settings::HostPCIDeviceAttachment& aHpda);
|
---|
52 | HRESULT i_saveSettings(settings::HostPCIDeviceAttachment &data);
|
---|
53 |
|
---|
54 | HRESULT FinalConstruct();
|
---|
55 | void FinalRelease();
|
---|
56 |
|
---|
57 | private:
|
---|
58 |
|
---|
59 | // wrapped IPCIDeviceAttachment properties
|
---|
60 | HRESULT getName(com::Utf8Str &aName);
|
---|
61 | HRESULT getIsPhysicalDevice(BOOL *aIsPhysicalDevice);
|
---|
62 | HRESULT getHostAddress(LONG *aHostAddress);
|
---|
63 | HRESULT getGuestAddress(LONG *aGuestAddress);
|
---|
64 |
|
---|
65 | struct Data;
|
---|
66 | Data* m;
|
---|
67 | };
|
---|
68 |
|
---|
69 | #endif /* !MAIN_INCLUDED_PCIDeviceAttachmentImpl_h */
|
---|