VirtualBox

source: vbox/trunk/src/VBox/Main/include/HostDVDDriveImpl.h@ 18826

Last change on this file since 18826 was 17238, checked in by vboxsync, 16 years ago

3551: “Main: Replace remaining collections with safe arrays”
Converted HostDVDDriveCollection.
Fixed a locking problem that caused hangs in r43495. Tested locally and by lelik.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
Line 
1/** @file
2 *
3 * VirtualBox COM class implementation
4 */
5
6/*
7 * Copyright (C) 2006-2009 Sun Microsystems, Inc.
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 (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18 * Clara, CA 95054 USA or visit http://www.sun.com if you need
19 * additional information or have any questions.
20 */
21
22#ifndef ____H_HOSTDVDDRIVEIMPL
23#define ____H_HOSTDVDDRIVEIMPL
24
25#include "VirtualBoxBase.h"
26
27class ATL_NO_VTABLE HostDVDDrive :
28 public VirtualBoxBaseNEXT,
29 public VirtualBoxSupportErrorInfoImpl <HostDVDDrive, IHostDVDDrive>,
30 public VirtualBoxSupportTranslation <HostDVDDrive>,
31 public IHostDVDDrive
32{
33public:
34
35 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT (HostDVDDrive)
36
37 DECLARE_NOT_AGGREGATABLE (HostDVDDrive)
38
39 DECLARE_PROTECT_FINAL_CONSTRUCT()
40
41 BEGIN_COM_MAP(HostDVDDrive)
42 COM_INTERFACE_ENTRY(ISupportErrorInfo)
43 COM_INTERFACE_ENTRY(IHostDVDDrive)
44 END_COM_MAP()
45
46 NS_DECL_ISUPPORTS
47
48 DECLARE_EMPTY_CTOR_DTOR (HostDVDDrive)
49
50 HRESULT FinalConstruct();
51 void FinalRelease();
52
53 // public initializer/uninitializer for internal purposes only
54 HRESULT init (IN_BSTR aName, IN_BSTR aUdi = NULL,
55 IN_BSTR aDescription = NULL);
56 void uninit();
57
58 // IHostDVDDrive properties
59 STDMETHOD(COMGETTER(Name)) (BSTR *aName);
60 STDMETHOD(COMGETTER(Udi)) (BSTR *aUdi);
61 STDMETHOD(COMGETTER(Description)) (BSTR *aDescription);
62
63 // public methods for internal purposes only
64
65 /* @note Must be called from under the object read lock. */
66 const Bstr &name() const { return mName; }
67
68 /* @note Must be called from under the object read lock. */
69 const Bstr &udi() const { return mUdi; }
70
71 /* @note Must be called from under the object read lock. */
72 const Bstr &description() const { return mDescription; }
73
74 // for VirtualBoxSupportErrorInfoImpl
75 static const wchar_t *getComponentName() { return L"HostDVDDrive"; }
76
77private:
78
79 const Bstr mName;
80 const Bstr mDescription;
81 const Bstr mUdi;
82};
83
84#endif // ____H_HOSTDVDDRIVEIMPL
85/* 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