VirtualBox

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

Last change on this file since 55805 was 49644, checked in by vboxsync, 11 years ago

stage 1/8 of 6813 changes

  • 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 49644 2013-11-25 16:57:15Z vboxsync $ */
2
3/** @file
4 *
5 * VirtualBox COM class implementation
6 */
7
8/*
9 * Copyright (C) 2006-2013 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
59 // public methods for internal purposes only
60 // (ensure there is a caller and a read lock before calling them!)
61
62private:
63
64 HRESULT i_checkSetPath(const Utf8Str &str);
65
66 // Wrapped ISerialPort properties
67 HRESULT getEnabled(BOOL *aEnabled);
68 HRESULT setEnabled(BOOL aEnabled);
69 HRESULT getHostMode(PortMode_T *aHostMode);
70 HRESULT setHostMode(PortMode_T aHostMode);
71 HRESULT getSlot(ULONG *aSlot);
72 HRESULT getIRQ(ULONG *aIRQ);
73 HRESULT setIRQ(ULONG aIRQ);
74 HRESULT getIOBase(ULONG *aIOBase);
75 HRESULT setIOBase(ULONG aIOBase);
76 HRESULT getServer(BOOL *aServer);
77 HRESULT setServer(BOOL aServer);
78 HRESULT getPath(com::Utf8Str &aPath);
79 HRESULT setPath(const com::Utf8Str &aPath);
80
81 ////////////////////////////////////////////////////////////////////////////////
82 ////
83 //// SerialPort private data definition
84 ////
85 //////////////////////////////////////////////////////////////////////////////////
86 //
87 struct Data
88 {
89 Data()
90 : fModified(false),
91 pMachine(NULL)
92 { }
93
94 bool fModified;
95 Machine * const pMachine;
96 const ComObjPtr<SerialPort> pPeer;
97 Backupable<settings::SerialPort> bd;
98 };
99
100 Data *m;
101};
102
103#endif // ____H_SERIALPORTIMPL
104/* 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