VirtualBox

source: vbox/trunk/src/VBox/Main/HostFloppyDriveImpl.cpp@ 382

Last change on this file since 382 was 1, checked in by vboxsync, 55 years ago

import

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.9 KB
Line 
1/** @file
2 *
3 * VirtualBox COM class implementation
4 */
5
6/*
7 * Copyright (C) 2006 InnoTek Systemberatung GmbH
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License as published by the Free Software Foundation,
13 * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
14 * distribution. VirtualBox OSE is distributed in the hope that it will
15 * be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * If you received this file as part of a commercial VirtualBox
18 * distribution, then only the terms of your commercial VirtualBox
19 * license agreement apply instead of the previous paragraph.
20 */
21
22#include "HostFloppyDriveImpl.h"
23
24// constructor / destructor
25/////////////////////////////////////////////////////////////////////////////
26
27HostFloppyDrive::HostFloppyDrive()
28{
29}
30
31HostFloppyDrive::~HostFloppyDrive()
32{
33}
34
35// public initializer/uninitializer for internal purposes only
36/////////////////////////////////////////////////////////////////////////////
37
38/**
39 * Initializes the host floppy drive object.
40 *
41 * @returns COM result indicator
42 * @param driveName name of the drive
43 */
44HRESULT HostFloppyDrive::init (INPTR BSTR driveName)
45{
46 ComAssertRet (driveName, E_INVALIDARG);
47
48 AutoLock lock(this);
49 mDriveName = driveName;
50 setReady(true);
51 return S_OK;
52}
53
54// IHostFloppyDrive properties
55/////////////////////////////////////////////////////////////////////////////
56
57/**
58 * Returns the name of the host drive
59 *
60 * @returns COM status code
61 * @param driveName address of result pointer
62 */
63STDMETHODIMP HostFloppyDrive::COMGETTER(Name) (BSTR *driveName)
64{
65 if (!driveName)
66 return E_POINTER;
67 AutoLock lock(this);
68 CHECK_READY();
69 mDriveName.cloneTo(driveName);
70 return S_OK;
71}
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