VirtualBox

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

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

Main: remove SupportErrorInfo template magic

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.7 KB
Line 
1/* $Id: ParallelPortImpl.h 30714 2010-07-07 16:20:03Z 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.215389.xyz. 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 VirtualBoxSupportTranslation<ParallelPort>,
32 VBOX_SCRIPTABLE_IMPL(IParallelPort)
33{
34public:
35 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(ParallelPort, IParallelPort)
36
37 DECLARE_NOT_AGGREGATABLE(ParallelPort)
38
39 DECLARE_PROTECT_FINAL_CONSTRUCT()
40
41 BEGIN_COM_MAP(ParallelPort)
42 COM_INTERFACE_ENTRY (ISupportErrorInfo)
43 COM_INTERFACE_ENTRY (IParallelPort)
44 COM_INTERFACE_ENTRY2 (IDispatch, IParallelPort)
45 END_COM_MAP()
46
47 ParallelPort() {}
48 ~ParallelPort() {}
49
50 HRESULT FinalConstruct();
51 void FinalRelease();
52
53 // public initializer/uninitializer for internal purposes only
54 HRESULT init (Machine *aParent, ULONG aSlot);
55 HRESULT init (Machine *aParent, ParallelPort *aThat);
56 HRESULT initCopy (Machine *parent, ParallelPort *aThat);
57 void uninit();
58
59 // IParallelPort properties
60 STDMETHOD(COMGETTER(Slot)) (ULONG *aSlot);
61 STDMETHOD(COMGETTER(Enabled)) (BOOL *aEnabled);
62 STDMETHOD(COMSETTER(Enabled)) (BOOL aEnabled);
63 STDMETHOD(COMGETTER(IRQ)) (ULONG *aIRQ);
64 STDMETHOD(COMSETTER(IRQ)) (ULONG aIRQ);
65 STDMETHOD(COMGETTER(IOBase)) (ULONG *aIOBase);
66 STDMETHOD(COMSETTER(IOBase)) (ULONG aIOBase);
67 STDMETHOD(COMGETTER(Path)) (BSTR *aPath);
68 STDMETHOD(COMSETTER(Path)) (IN_BSTR aPath);
69
70 // public methods only for internal purposes
71
72 HRESULT loadSettings(const settings::ParallelPort &data);
73 HRESULT saveSettings(settings::ParallelPort &data);
74
75 bool isModified();
76 void rollback();
77 void commit();
78 void copyFrom(ParallelPort *aThat);
79
80 // public methods for internal purposes only
81 // (ensure there is a caller and a read lock before calling them!)
82
83private:
84 HRESULT checkSetPath(const Utf8Str &str);
85
86 struct Data;
87 Data *m;
88};
89
90#endif // ____H_FLOPPYDRIVEIMPL
91/* vi: set tabstop=4 shiftwidth=4 expandtab: */
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette