[3653] | 1 | /* $Id: ParallelPortImpl.h 98103 2023-01-17 14:15:46Z vboxsync $ */
|
---|
[6076] | 2 |
|
---|
[3653] | 3 | /** @file
|
---|
| 4 | * VirtualBox COM class implementation.
|
---|
| 5 | */
|
---|
| 6 |
|
---|
| 7 | /*
|
---|
[98103] | 8 | * Copyright (C) 2006-2023 Oracle and/or its affiliates.
|
---|
[3653] | 9 | *
|
---|
[96407] | 10 | * This file is part of VirtualBox base platform packages, as
|
---|
| 11 | * available from https://www.virtualbox.org.
|
---|
| 12 | *
|
---|
| 13 | * This program is free software; you can redistribute it and/or
|
---|
| 14 | * modify it under the terms of the GNU General Public License
|
---|
| 15 | * as published by the Free Software Foundation, in version 3 of the
|
---|
| 16 | * License.
|
---|
| 17 | *
|
---|
| 18 | * This program is distributed in the hope that it will be useful, but
|
---|
| 19 | * WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
| 21 | * General Public License for more details.
|
---|
| 22 | *
|
---|
| 23 | * You should have received a copy of the GNU General Public License
|
---|
| 24 | * along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
| 25 | *
|
---|
| 26 | * SPDX-License-Identifier: GPL-3.0-only
|
---|
[3653] | 27 | */
|
---|
| 28 |
|
---|
[76562] | 29 | #ifndef MAIN_INCLUDED_ParallelPortImpl_h
|
---|
| 30 | #define MAIN_INCLUDED_ParallelPortImpl_h
|
---|
[76487] | 31 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
| 32 | # pragma once
|
---|
| 33 | #endif
|
---|
[3653] | 34 |
|
---|
[49871] | 35 | #include "ParallelPortWrap.h"
|
---|
[3653] | 36 |
|
---|
[30764] | 37 | namespace settings
|
---|
| 38 | {
|
---|
| 39 | struct ParallelPort;
|
---|
| 40 | }
|
---|
| 41 |
|
---|
[3653] | 42 | class ATL_NO_VTABLE ParallelPort :
|
---|
[49871] | 43 | public ParallelPortWrap
|
---|
[3653] | 44 | {
|
---|
| 45 | public:
|
---|
| 46 |
|
---|
[90828] | 47 | DECLARE_COMMON_CLASS_METHODS(ParallelPort)
|
---|
[3653] | 48 |
|
---|
| 49 | HRESULT FinalConstruct();
|
---|
| 50 | void FinalRelease();
|
---|
| 51 |
|
---|
| 52 | // public initializer/uninitializer for internal purposes only
|
---|
[59926] | 53 | HRESULT init(Machine *aParent, ULONG aSlot);
|
---|
| 54 | HRESULT init(Machine *aParent, ParallelPort *aThat);
|
---|
| 55 | HRESULT initCopy(Machine *parent, ParallelPort *aThat);
|
---|
[3653] | 56 | void uninit();
|
---|
| 57 |
|
---|
[49871] | 58 | HRESULT i_loadSettings(const settings::ParallelPort &data);
|
---|
| 59 | HRESULT i_saveSettings(settings::ParallelPort &data);
|
---|
[3653] | 60 |
|
---|
| 61 | // public methods only for internal purposes
|
---|
[49871] | 62 | bool i_isModified();
|
---|
| 63 | void i_rollback();
|
---|
| 64 | void i_commit();
|
---|
| 65 | void i_copyFrom(ParallelPort *aThat);
|
---|
[57979] | 66 | void i_applyDefaults();
|
---|
[59926] | 67 | bool i_hasDefaults();
|
---|
[6076] | 68 |
|
---|
[49871] | 69 | private:
|
---|
[6076] | 70 |
|
---|
[49871] | 71 | // Wrapped IParallelPort properties
|
---|
| 72 | HRESULT getEnabled(BOOL *aEnabled);
|
---|
| 73 | HRESULT setEnabled(BOOL aEnabled);
|
---|
| 74 | HRESULT getSlot(ULONG *aSlot);
|
---|
| 75 | HRESULT getIRQ(ULONG *aIRQ);
|
---|
| 76 | HRESULT setIRQ(ULONG aIRQ);
|
---|
| 77 | HRESULT getIOBase(ULONG *aIOBase);
|
---|
| 78 | HRESULT setIOBase(ULONG aIOBase);
|
---|
| 79 | HRESULT getPath(com::Utf8Str &aPath);
|
---|
| 80 | HRESULT setPath(const com::Utf8Str &aPath);
|
---|
[3653] | 81 |
|
---|
[25202] | 82 | struct Data;
|
---|
| 83 | Data *m;
|
---|
[3653] | 84 | };
|
---|
| 85 |
|
---|
[76562] | 86 | #endif /* !MAIN_INCLUDED_ParallelPortImpl_h */
|
---|
[14949] | 87 | /* vi: set tabstop=4 shiftwidth=4 expandtab: */
|
---|