VirtualBox

source: vbox/trunk/src/VBox/Main/include/SerialPortImpl.h@ 96407

Last change on this file since 96407 was 96407, checked in by vboxsync, 2 years ago

scm copyright and license note update

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.8 KB
Line 
1/* $Id: SerialPortImpl.h 96407 2022-08-22 17:43:14Z vboxsync $ */
2
3/** @file
4 *
5 * VirtualBox COM class implementation
6 */
7
8/*
9 * Copyright (C) 2006-2022 Oracle and/or its affiliates.
10 *
11 * This file is part of VirtualBox base platform packages, as
12 * available from https://www.virtualbox.org.
13 *
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation, in version 3 of the
17 * License.
18 *
19 * This program is distributed in the hope that it will be useful, but
20 * WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, see <https://www.gnu.org/licenses>.
26 *
27 * SPDX-License-Identifier: GPL-3.0-only
28 */
29
30#ifndef MAIN_INCLUDED_SerialPortImpl_h
31#define MAIN_INCLUDED_SerialPortImpl_h
32#ifndef RT_WITHOUT_PRAGMA_ONCE
33# pragma once
34#endif
35
36#include "SerialPortWrap.h"
37
38class GuestOSType;
39
40namespace settings
41{
42 struct SerialPort;
43}
44
45class ATL_NO_VTABLE SerialPort :
46 public SerialPortWrap
47{
48public:
49
50 DECLARE_COMMON_CLASS_METHODS(SerialPort)
51
52 HRESULT FinalConstruct();
53 void FinalRelease();
54
55 // public initializer/uninitializer for internal purposes only
56 HRESULT init(Machine *aParent, ULONG aSlot);
57 HRESULT init(Machine *aParent, SerialPort *aThat);
58 HRESULT initCopy(Machine *parent, SerialPort *aThat);
59 void uninit();
60
61 // public methods only for internal purposes
62 HRESULT i_loadSettings(const settings::SerialPort &data);
63 HRESULT i_saveSettings(settings::SerialPort &data);
64
65 bool i_isModified();
66 void i_rollback();
67 void i_commit();
68 void i_copyFrom(SerialPort *aThat);
69
70 void i_applyDefaults(GuestOSType *aOsType);
71 bool i_hasDefaults();
72
73 // public methods for internal purposes only
74 // (ensure there is a caller and a read lock before calling them!)
75
76private:
77
78 HRESULT i_checkSetPath(const Utf8Str &str);
79
80 // Wrapped ISerialPort properties
81 HRESULT getEnabled(BOOL *aEnabled);
82 HRESULT setEnabled(BOOL aEnabled);
83 HRESULT getHostMode(PortMode_T *aHostMode);
84 HRESULT setHostMode(PortMode_T aHostMode);
85 HRESULT getSlot(ULONG *aSlot);
86 HRESULT getIRQ(ULONG *aIRQ);
87 HRESULT setIRQ(ULONG aIRQ);
88 HRESULT getIOBase(ULONG *aIOBase);
89 HRESULT setIOBase(ULONG aIOBase);
90 HRESULT getServer(BOOL *aServer);
91 HRESULT setServer(BOOL aServer);
92 HRESULT getPath(com::Utf8Str &aPath);
93 HRESULT setPath(const com::Utf8Str &aPath);
94 HRESULT getUartType(UartType_T *aUartType);
95 HRESULT setUartType(UartType_T aUartType);
96
97 struct Data;
98 Data *m;
99};
100
101#endif /* !MAIN_INCLUDED_SerialPortImpl_h */
102/* 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