VirtualBox

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

Last change on this file since 100108 was 98103, checked in by vboxsync, 23 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
Line 
1/* $Id: StorageControllerImpl.h 98103 2023-01-17 14:15:46Z vboxsync $ */
2
3/** @file
4 *
5 * VBox StorageController COM Class declaration.
6 */
7
8/*
9 * Copyright (C) 2008-2023 Oracle and/or its affiliates.
10 *
11 * This file is part of VirtualBox base platform packages, as
12 * available from https://www.virtualbox.org.
13 *
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation, in version 3 of the
17 * License.
18 *
19 * This program is distributed in the hope that it will be useful, but
20 * WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, see <https://www.gnu.org/licenses>.
26 *
27 * SPDX-License-Identifier: GPL-3.0-only
28 */
29
30#ifndef MAIN_INCLUDED_StorageControllerImpl_h
31#define MAIN_INCLUDED_StorageControllerImpl_h
32#ifndef RT_WITHOUT_PRAGMA_ONCE
33# pragma once
34#endif
35#include "StorageControllerWrap.h"
36
37class ATL_NO_VTABLE StorageController :
38 public StorageControllerWrap
39{
40public:
41
42 DECLARE_COMMON_CLASS_METHODS(StorageController)
43
44 HRESULT FinalConstruct();
45 void FinalRelease();
46
47 // public initializer/uninitializer for internal purposes only
48 HRESULT init(Machine *aParent,
49 const com::Utf8Str &aName,
50 StorageBus_T aBus,
51 ULONG aInstance,
52 bool fBootable);
53 HRESULT init(Machine *aParent,
54 StorageController *aThat,
55 bool aReshare = false);
56 HRESULT initCopy(Machine *aParent,
57 StorageController *aThat);
58 void uninit();
59
60 // public methods only for internal purposes
61 const Utf8Str &i_getName() const;
62 StorageControllerType_T i_getControllerType() const;
63 StorageBus_T i_getStorageBus() const;
64 ULONG i_getInstance() const;
65 bool i_getBootable() const;
66 HRESULT i_checkPortAndDeviceValid(LONG aControllerPort,
67 LONG aDevice);
68 void i_setBootable(BOOL fBootable);
69 void i_rollback();
70 void i_commit();
71
72 // public methods for internal purposes only
73 // (ensure there is a caller and a read lock before calling them!)
74
75 void i_unshare();
76
77 /** @note this doesn't require a read lock since mParent is constant. */
78 Machine* i_getMachine();
79 ComObjPtr<StorageController> i_getPeer();
80
81private:
82
83 // Wrapped IStorageController properties
84 HRESULT getName(com::Utf8Str &aName);
85 HRESULT setName(const com::Utf8Str &aName);
86 HRESULT getMaxDevicesPerPortCount(ULONG *aMaxDevicesPerPortCount);
87 HRESULT getMinPortCount(ULONG *aMinPortCount);
88 HRESULT getMaxPortCount(ULONG *aMaxPortCount);
89 HRESULT getInstance(ULONG *aInstance);
90 HRESULT setInstance(ULONG aInstance);
91 HRESULT getPortCount(ULONG *aPortCount);
92 HRESULT setPortCount(ULONG aPortCount);
93 HRESULT getBus(StorageBus_T *aBus);
94 HRESULT getControllerType(StorageControllerType_T *aControllerType);
95 HRESULT setControllerType(StorageControllerType_T aControllerType);
96 HRESULT getUseHostIOCache(BOOL *aUseHostIOCache);
97 HRESULT setUseHostIOCache(BOOL aUseHostIOCache);
98 HRESULT getBootable(BOOL *aBootable);
99
100 void i_printList();
101
102 struct Data;
103 Data *m;
104};
105
106#endif /* !MAIN_INCLUDED_StorageControllerImpl_h */
107/* 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