1 | /** @file
|
---|
2 | *
|
---|
3 | * VirtualBox COM class implementation
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006-2007 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_HOSTFLOPPYDRIVEIMPL
|
---|
23 | #define ____H_HOSTFLOPPYDRIVEIMPL
|
---|
24 |
|
---|
25 | #include "VirtualBoxBase.h"
|
---|
26 |
|
---|
27 | class ATL_NO_VTABLE HostFloppyDrive :
|
---|
28 | public VirtualBoxBaseNEXT,
|
---|
29 | public VirtualBoxSupportErrorInfoImpl <HostFloppyDrive, IHostFloppyDrive>,
|
---|
30 | public VirtualBoxSupportTranslation <HostFloppyDrive>,
|
---|
31 | VBOX_SCRIPTABLE_IMPL(IHostFloppyDrive)
|
---|
32 | {
|
---|
33 | public:
|
---|
34 |
|
---|
35 | VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT (HostFloppyDrive)
|
---|
36 |
|
---|
37 | DECLARE_NOT_AGGREGATABLE (HostFloppyDrive)
|
---|
38 |
|
---|
39 | DECLARE_PROTECT_FINAL_CONSTRUCT()
|
---|
40 |
|
---|
41 | BEGIN_COM_MAP(HostFloppyDrive)
|
---|
42 | COM_INTERFACE_ENTRY(ISupportErrorInfo)
|
---|
43 | COM_INTERFACE_ENTRY(IHostFloppyDrive)
|
---|
44 | COM_INTERFACE_ENTRY(IDispatch)
|
---|
45 | END_COM_MAP()
|
---|
46 |
|
---|
47 | NS_DECL_ISUPPORTS
|
---|
48 |
|
---|
49 | DECLARE_EMPTY_CTOR_DTOR (HostFloppyDrive)
|
---|
50 |
|
---|
51 | HRESULT FinalConstruct();
|
---|
52 | void FinalRelease();
|
---|
53 |
|
---|
54 | // public initializer/uninitializer for internal purposes only
|
---|
55 | HRESULT init (IN_BSTR aName, IN_BSTR aUdi = NULL,
|
---|
56 | IN_BSTR aDescription = NULL);
|
---|
57 | void uninit();
|
---|
58 |
|
---|
59 | // IHostFloppyDrive properties
|
---|
60 | STDMETHOD(COMGETTER(Name)) (BSTR *aName);
|
---|
61 | STDMETHOD(COMGETTER(Description)) (BSTR *aDescription);
|
---|
62 | STDMETHOD(COMGETTER(Udi)) (BSTR *aUdi);
|
---|
63 |
|
---|
64 | // public methods for internal purposes only
|
---|
65 |
|
---|
66 | /* @note Must be called from under the object read lock. */
|
---|
67 | const Bstr &name() const { return mName; }
|
---|
68 |
|
---|
69 | /* @note Must be called from under the object read lock. */
|
---|
70 | const Bstr &udi() const { return mUdi; }
|
---|
71 |
|
---|
72 | /* @note Must be called from under the object read lock. */
|
---|
73 | const Bstr &description() const { return mDescription; }
|
---|
74 |
|
---|
75 | // for VirtualBoxSupportErrorInfoImpl
|
---|
76 | static const wchar_t *getComponentName() { return L"HostFloppyDrive"; }
|
---|
77 |
|
---|
78 | private:
|
---|
79 |
|
---|
80 | const Bstr mName;
|
---|
81 | const Bstr mDescription;
|
---|
82 | const Bstr mUdi;
|
---|
83 | };
|
---|
84 |
|
---|
85 | #endif // ____H_HOSTFLOPPYDRIVEIMPL
|
---|
86 | /* vi: set tabstop=4 shiftwidth=4 expandtab: */
|
---|