VirtualBox

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

Last change on this file since 73768 was 73768, checked in by vboxsync, 6 years ago

Main,FE/VBoxManage: Allow changing the UART type of the serial ports through the API

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.4 KB
Line 
1/* $Id: SerialPortImpl.h 73768 2018-08-19 19:07:19Z vboxsync $ */
2
3/** @file
4 *
5 * VirtualBox COM class implementation
6 */
7
8/*
9 * Copyright (C) 2006-2017 Oracle Corporation
10 *
11 * This file is part of VirtualBox Open Source Edition (OSE), as
12 * available from http://www.virtualbox.org. This file is free software;
13 * you can redistribute it and/or modify it under the terms of the GNU
14 * General Public License (GPL) as published by the Free Software
15 * Foundation, in version 2 as it comes in the "COPYING" file of the
16 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
17 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
18 */
19
20#ifndef ____H_SERIALPORTIMPL
21#define ____H_SERIALPORTIMPL
22
23#include "SerialPortWrap.h"
24
25class GuestOSType;
26
27namespace settings
28{
29 struct SerialPort;
30}
31
32class ATL_NO_VTABLE SerialPort :
33 public SerialPortWrap
34{
35public:
36
37 DECLARE_EMPTY_CTOR_DTOR(SerialPort)
38
39 HRESULT FinalConstruct();
40 void FinalRelease();
41
42 // public initializer/uninitializer for internal purposes only
43 HRESULT init(Machine *aParent, ULONG aSlot);
44 HRESULT init(Machine *aParent, SerialPort *aThat);
45 HRESULT initCopy(Machine *parent, SerialPort *aThat);
46 void uninit();
47
48 // public methods only for internal purposes
49 HRESULT i_loadSettings(const settings::SerialPort &data);
50 HRESULT i_saveSettings(settings::SerialPort &data);
51
52 bool i_isModified();
53 void i_rollback();
54 void i_commit();
55 void i_copyFrom(SerialPort *aThat);
56
57 void i_applyDefaults(GuestOSType *aOsType);
58 bool i_hasDefaults();
59
60 // public methods for internal purposes only
61 // (ensure there is a caller and a read lock before calling them!)
62
63private:
64
65 HRESULT i_checkSetPath(const Utf8Str &str);
66
67 // Wrapped ISerialPort properties
68 HRESULT getEnabled(BOOL *aEnabled);
69 HRESULT setEnabled(BOOL aEnabled);
70 HRESULT getHostMode(PortMode_T *aHostMode);
71 HRESULT setHostMode(PortMode_T aHostMode);
72 HRESULT getSlot(ULONG *aSlot);
73 HRESULT getIRQ(ULONG *aIRQ);
74 HRESULT setIRQ(ULONG aIRQ);
75 HRESULT getIOBase(ULONG *aIOBase);
76 HRESULT setIOBase(ULONG aIOBase);
77 HRESULT getServer(BOOL *aServer);
78 HRESULT setServer(BOOL aServer);
79 HRESULT getPath(com::Utf8Str &aPath);
80 HRESULT setPath(const com::Utf8Str &aPath);
81 HRESULT getUartType(UartType_T *aUartType);
82 HRESULT setUartType(UartType_T aUartType);
83
84 struct Data;
85 Data *m;
86};
87
88#endif // ____H_SERIALPORTIMPL
89/* vi: set tabstop=4 shiftwidth=4 expandtab: */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use