VirtualBox

source: vbox/trunk/src/VBox/Main/include/StorageControllerImpl.h@ 51856

Last change on this file since 51856 was 49644, checked in by vboxsync, 11 years ago

stage 1/8 of 6813 changes

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.1 KB
Line 
1/* $Id: StorageControllerImpl.h 49644 2013-11-25 16:57:15Z vboxsync $ */
2
3/** @file
4 *
5 * VBox StorageController COM Class declaration.
6 */
7
8/*
9 * Copyright (C) 2008-2013 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_STORAGECONTROLLERIMPL
21#define ____H_STORAGECONTROLLERIMPL
22#include "StorageControllerWrap.h"
23
24class ATL_NO_VTABLE StorageController :
25 public StorageControllerWrap
26{
27public:
28
29 DECLARE_EMPTY_CTOR_DTOR(StorageController)
30
31 HRESULT FinalConstruct();
32 void FinalRelease();
33
34 // public initializer/uninitializer for internal purposes only
35 HRESULT init(Machine *aParent,
36 const Utf8Str &aName,
37 StorageBus_T aBus,
38 ULONG aInstance,
39 bool fBootable);
40 HRESULT init(Machine *aParent,
41 StorageController *aThat,
42 bool aReshare = false);
43 HRESULT initCopy(Machine *aParent,
44 StorageController *aThat);
45 void uninit();
46
47 // public methods only for internal purposes
48 const Utf8Str &i_getName() const;
49 StorageControllerType_T i_getControllerType() const;
50 StorageBus_T i_getStorageBus() const;
51 ULONG i_getInstance() const;
52 bool i_getBootable() const;
53 HRESULT i_checkPortAndDeviceValid(LONG aControllerPort,
54 LONG aDevice);
55 void i_setBootable(BOOL fBootable);
56 void i_rollback();
57 void i_commit();
58 HRESULT i_getIDEEmulationPort (LONG DevicePosition, LONG *aPortNumber);
59 HRESULT i_setIDEEmulationPort (LONG DevicePosition, LONG aPortNumber);
60
61 // public methods for internal purposes only
62 // (ensure there is a caller and a read lock before calling them!)
63
64 void i_unshare();
65
66 /** @note this doesn't require a read lock since mParent is constant. */
67 Machine* i_getMachine();
68 ComObjPtr<StorageController> i_getPeer();
69
70private:
71
72 // Wrapped IStorageController properties
73 HRESULT getName(com::Utf8Str &aName);
74 HRESULT getMaxDevicesPerPortCount(ULONG *aMaxDevicesPerPortCount);
75 HRESULT getMinPortCount(ULONG *aMinPortCount);
76 HRESULT getMaxPortCount(ULONG *aMaxPortCount);
77 HRESULT getInstance(ULONG *aInstance);
78 HRESULT setInstance(ULONG aInstance);
79 HRESULT getPortCount(ULONG *aPortCount);
80 HRESULT setPortCount(ULONG aPortCount);
81 HRESULT getBus(StorageBus_T *aBus);
82 HRESULT getControllerType(StorageControllerType_T *aControllerType);
83 HRESULT setControllerType(StorageControllerType_T aControllerType);
84 HRESULT getUseHostIOCache(BOOL *aUseHostIOCache);
85 HRESULT setUseHostIOCache(BOOL aUseHostIOCache);
86 HRESULT getBootable(BOOL *aBootable);
87
88 void i_printList();
89
90 struct Data;
91 Data *m;
92};
93
94#endif //!____H_STORAGECONTROLLERIMPL
95/* vi: set tabstop=4 shiftwidth=4 expandtab: */
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