VirtualBox

source: vbox/trunk/src/VBox/Main/include/PCIDeviceAttachmentImpl.h@ 62497

Last change on this file since 62497 was 61009, checked in by vboxsync, 9 years ago

Main: big settings cleanup and writing optimization. Moved constructors/equality/default checks into the .cpp file, and write only settings which aren't at the default value. Greatly reduces the effort needed to write everything out, especially when a lot of snapshots have to be dealt with. Move the storage controllers to the hardware settings, where they always belonged. No change to the XML file (yet). Lots of settings related cleanups in the API code.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.8 KB
Line 
1/* $Id: PCIDeviceAttachmentImpl.h 61009 2016-05-17 17:18:29Z vboxsync $ */
2
3/** @file
4 *
5 * PCI attachment information implmentation.
6 */
7
8/*
9 * Copyright (C) 2010-2016 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 ____H_PCIDEVICEATTACHMENTIMPL
21#define ____H_PCIDEVICEATTACHMENTIMPL
22
23#include "PCIDeviceAttachmentWrap.h"
24
25namespace settings
26{
27 struct HostPCIDeviceAttachment;
28}
29
30class ATL_NO_VTABLE PCIDeviceAttachment :
31 public PCIDeviceAttachmentWrap
32{
33public:
34
35 DECLARE_EMPTY_CTOR_DTOR(PCIDeviceAttachment)
36
37 // public initializer/uninitializer for internal purposes only
38 HRESULT init(IMachine * aParent,
39 const Utf8Str &aName,
40 LONG aHostAddess,
41 LONG aGuestAddress,
42 BOOL fPhysical);
43
44 void uninit();
45
46 // settings
47 HRESULT i_loadSettings(IMachine * aParent,
48 const settings::HostPCIDeviceAttachment& aHpda);
49 HRESULT i_saveSettings(settings::HostPCIDeviceAttachment &data);
50
51 HRESULT FinalConstruct();
52 void FinalRelease();
53
54private:
55
56 // wrapped IPCIDeviceAttachment properties
57 HRESULT getName(com::Utf8Str &aName);
58 HRESULT getIsPhysicalDevice(BOOL *aIsPhysicalDevice);
59 HRESULT getHostAddress(LONG *aHostAddress);
60 HRESULT getGuestAddress(LONG *aGuestAddress);
61
62 struct Data;
63 Data* m;
64};
65
66#endif // ____H_PCIDEVICEATTACHMENTIMPL
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