VirtualBox

source: vbox/trunk/src/VBox/Main/include/ParallelPortImpl.h@ 30257

Last change on this file since 30257 was 28800, checked in by vboxsync, 15 years ago

Automated rebranding to Oracle copyright/license strings via filemuncher

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.8 KB
Line 
1/* $Id: ParallelPortImpl.h 28800 2010-04-27 08:22:32Z vboxsync $ */
2
3/** @file
4 * VirtualBox COM class implementation.
5 */
6
7/*
8 * Copyright (C) 2006-2007 Oracle Corporation
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License (GPL) as published by the Free Software
14 * Foundation, in version 2 as it comes in the "COPYING" file of the
15 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17 */
18
19#ifndef ____H_PARALLELPORTIMPL
20#define ____H_PARALLELPORTIMPL
21
22#include "VirtualBoxBase.h"
23
24namespace settings
25{
26 struct ParallelPort;
27}
28
29class ATL_NO_VTABLE ParallelPort :
30 public VirtualBoxBase,
31 public VirtualBoxSupportErrorInfoImpl<ParallelPort, IParallelPort>,
32 public VirtualBoxSupportTranslation<ParallelPort>,
33 VBOX_SCRIPTABLE_IMPL(IParallelPort)
34{
35public:
36 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT (ParallelPort)
37
38 DECLARE_NOT_AGGREGATABLE(ParallelPort)
39
40 DECLARE_PROTECT_FINAL_CONSTRUCT()
41
42 BEGIN_COM_MAP(ParallelPort)
43 COM_INTERFACE_ENTRY (ISupportErrorInfo)
44 COM_INTERFACE_ENTRY (IParallelPort)
45 COM_INTERFACE_ENTRY2 (IDispatch, IParallelPort)
46 END_COM_MAP()
47
48 ParallelPort() {}
49 ~ParallelPort() {}
50
51 HRESULT FinalConstruct();
52 void FinalRelease();
53
54 // public initializer/uninitializer for internal purposes only
55 HRESULT init (Machine *aParent, ULONG aSlot);
56 HRESULT init (Machine *aParent, ParallelPort *aThat);
57 HRESULT initCopy (Machine *parent, ParallelPort *aThat);
58 void uninit();
59
60 // IParallelPort properties
61 STDMETHOD(COMGETTER(Slot)) (ULONG *aSlot);
62 STDMETHOD(COMGETTER(Enabled)) (BOOL *aEnabled);
63 STDMETHOD(COMSETTER(Enabled)) (BOOL aEnabled);
64 STDMETHOD(COMGETTER(IRQ)) (ULONG *aIRQ);
65 STDMETHOD(COMSETTER(IRQ)) (ULONG aIRQ);
66 STDMETHOD(COMGETTER(IOBase)) (ULONG *aIOBase);
67 STDMETHOD(COMSETTER(IOBase)) (ULONG aIOBase);
68 STDMETHOD(COMGETTER(Path)) (BSTR *aPath);
69 STDMETHOD(COMSETTER(Path)) (IN_BSTR aPath);
70
71 // public methods only for internal purposes
72
73 HRESULT loadSettings(const settings::ParallelPort &data);
74 HRESULT saveSettings(settings::ParallelPort &data);
75
76 bool isModified();
77 void rollback();
78 void commit();
79 void copyFrom(ParallelPort *aThat);
80
81 // public methods for internal purposes only
82 // (ensure there is a caller and a read lock before calling them!)
83
84 // for VirtualBoxSupportErrorInfoImpl
85 static const wchar_t *getComponentName() { return L"ParallelPort"; }
86
87private:
88 HRESULT checkSetPath(const Utf8Str &str);
89
90 struct Data;
91 Data *m;
92};
93
94#endif // ____H_FLOPPYDRIVEIMPL
95/* 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