VirtualBox

source: vbox/trunk/src/VBox/Main/include/HostDriveImpl.h@ 96407

Last change on this file since 96407 was 96407, checked in by vboxsync, 2 years ago

scm copyright and license note update

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
Line 
1/* $Id: HostDriveImpl.h 96407 2022-08-22 17:43:14Z vboxsync $ */
2/** @file
3 * VirtualBox Main - IHostDrive implementation, VBoxSVC.
4 */
5
6/*
7 * Copyright (C) 2013-2022 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#ifndef MAIN_INCLUDED_HostDriveImpl_h
29#define MAIN_INCLUDED_HostDriveImpl_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34#include "HostDriveWrap.h"
35
36class ATL_NO_VTABLE HostDrive
37 : public HostDriveWrap
38{
39public:
40 DECLARE_COMMON_CLASS_METHODS(HostDrive)
41
42 HRESULT FinalConstruct();
43 void FinalRelease();
44
45 /** @name Public initializer/uninitializer for internal purposes only.
46 * @{ */
47 HRESULT initFromPathAndModel(const com::Utf8Str &drivePath, const com::Utf8Str &driveModel);
48 void uninit();
49 /** @} */
50
51 com::Utf8Str i_getDrivePath() { return m.drivePath; }
52
53private:
54 /** @name wrapped IHostDrive properties
55 * @{ */
56 virtual HRESULT getPartitioningType(PartitioningType_T *aPartitioningType) RT_OVERRIDE;
57 virtual HRESULT getDrivePath(com::Utf8Str &aDrivePath) RT_OVERRIDE;
58 virtual HRESULT getUuid(com::Guid &aUuid) RT_OVERRIDE;
59 virtual HRESULT getSectorSize(ULONG *aSectorSize) RT_OVERRIDE;
60 virtual HRESULT getSize(LONG64 *aSize) RT_OVERRIDE;
61 virtual HRESULT getModel(com::Utf8Str &aModel) RT_OVERRIDE;
62 virtual HRESULT getPartitions(std::vector<ComPtr<IHostDrivePartition> > &aPartitions) RT_OVERRIDE;
63 /** @} */
64
65 /** Data. */
66 struct Data
67 {
68 Data() : cbSector(0), cbDisk(0)
69 {
70 }
71
72 PartitioningType_T partitioningType;
73 com::Utf8Str drivePath;
74 com::Guid uuid;
75 uint32_t cbSector;
76 uint64_t cbDisk;
77 com::Utf8Str model;
78 std::vector<ComPtr<IHostDrivePartition> > partitions;
79 };
80
81 Data m;
82};
83
84#endif /* !MAIN_INCLUDED_HostDriveImpl_h */
85
86/* 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