VirtualBox

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

Last change on this file since 25414 was 25203, checked in by vboxsync, 15 years ago

Main: make SerialPort instance data private and make it use the XML settings struct for simplicity

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.0 KB
Line 
1/* $Id: ParallelPortImpl.h 25203 2009-12-04 19:30:50Z vboxsync $ */
2
3/** @file
4 * VirtualBox COM class implementation.
5 */
6
7/*
8 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
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 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
19 * Clara, CA 95054 USA or visit http://www.sun.com if you need
20 * additional information or have any questions.
21 */
22
23#ifndef ____H_PARALLELPORTIMPL
24#define ____H_PARALLELPORTIMPL
25
26#include "VirtualBoxBase.h"
27
28class Machine;
29
30namespace settings
31{
32 struct ParallelPort;
33}
34
35class ATL_NO_VTABLE ParallelPort :
36 public VirtualBoxBase,
37 public VirtualBoxSupportErrorInfoImpl<ParallelPort, IParallelPort>,
38 public VirtualBoxSupportTranslation<ParallelPort>,
39 VBOX_SCRIPTABLE_IMPL(IParallelPort)
40{
41public:
42 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT (ParallelPort)
43
44 DECLARE_NOT_AGGREGATABLE(ParallelPort)
45
46 DECLARE_PROTECT_FINAL_CONSTRUCT()
47
48 BEGIN_COM_MAP(ParallelPort)
49 COM_INTERFACE_ENTRY (ISupportErrorInfo)
50 COM_INTERFACE_ENTRY (IParallelPort)
51 COM_INTERFACE_ENTRY2 (IDispatch, IParallelPort)
52 END_COM_MAP()
53
54 ParallelPort() {}
55 ~ParallelPort() {}
56
57 HRESULT FinalConstruct();
58 void FinalRelease();
59
60 // public initializer/uninitializer for internal purposes only
61 HRESULT init (Machine *aParent, ULONG aSlot);
62 HRESULT init (Machine *aParent, ParallelPort *aThat);
63 HRESULT initCopy (Machine *parent, ParallelPort *aThat);
64 void uninit();
65
66 // IParallelPort properties
67 STDMETHOD(COMGETTER(Slot)) (ULONG *aSlot);
68 STDMETHOD(COMGETTER(Enabled)) (BOOL *aEnabled);
69 STDMETHOD(COMSETTER(Enabled)) (BOOL aEnabled);
70 STDMETHOD(COMGETTER(IRQ)) (ULONG *aIRQ);
71 STDMETHOD(COMSETTER(IRQ)) (ULONG aIRQ);
72 STDMETHOD(COMGETTER(IOBase)) (ULONG *aIOBase);
73 STDMETHOD(COMSETTER(IOBase)) (ULONG aIOBase);
74 STDMETHOD(COMGETTER(Path)) (BSTR *aPath);
75 STDMETHOD(COMSETTER(Path)) (IN_BSTR aPath);
76
77 // public methods only for internal purposes
78
79 HRESULT loadSettings(const settings::ParallelPort &data);
80 HRESULT saveSettings(settings::ParallelPort &data);
81
82 bool isModified();
83 bool isReallyModified();
84 bool rollback();
85 void commit();
86 void copyFrom(ParallelPort *aThat);
87
88 // public methods for internal purposes only
89 // (ensure there is a caller and a read lock before calling them!)
90
91 // for VirtualBoxSupportErrorInfoImpl
92 static const wchar_t *getComponentName() { return L"ParallelPort"; }
93
94private:
95 HRESULT checkSetPath(const Utf8Str &str);
96
97 struct Data;
98 Data *m;
99};
100
101#endif // ____H_FLOPPYDRIVEIMPL
102/* vi: set tabstop=4 shiftwidth=4 expandtab: */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use