VirtualBox

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

Last change on this file since 33451 was 30764, checked in by vboxsync, 14 years ago

back out r63543, r63544 until windows build problems can be solved properly

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.9 KB
Line 
1/* $Id: SerialPortImpl.h 30764 2010-07-09 14:12:12Z vboxsync $ */
2
3/** @file
4 *
5 * VirtualBox COM class implementation
6 */
7
8/*
9 * Copyright (C) 2006-2007 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 "VirtualBoxBase.h"
24
25class GuestOSType;
26
27namespace settings
28{
29 struct SerialPort;
30}
31
32class ATL_NO_VTABLE SerialPort :
33 public VirtualBoxBase,
34 VBOX_SCRIPTABLE_IMPL(ISerialPort)
35{
36public:
37 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(SerialPort, ISerialPort)
38
39 DECLARE_NOT_AGGREGATABLE(SerialPort)
40
41 DECLARE_PROTECT_FINAL_CONSTRUCT()
42
43 BEGIN_COM_MAP(SerialPort)
44 COM_INTERFACE_ENTRY (ISupportErrorInfo)
45 COM_INTERFACE_ENTRY (ISerialPort)
46 COM_INTERFACE_ENTRY2 (IDispatch, ISerialPort)
47 END_COM_MAP()
48
49 DECLARE_EMPTY_CTOR_DTOR (SerialPort)
50
51 HRESULT FinalConstruct();
52 void FinalRelease();
53
54 // public initializer/uninitializer for internal purposes only
55 HRESULT init (Machine *aParent, ULONG aSlot);
56 HRESULT init (Machine *aParent, SerialPort *aThat);
57 HRESULT initCopy (Machine *parent, SerialPort *aThat);
58 void uninit();
59
60 // ISerialPort properties
61 STDMETHOD(COMGETTER(Slot)) (ULONG *aSlot);
62 STDMETHOD(COMGETTER(Enabled)) (BOOL *aEnabled);
63 STDMETHOD(COMSETTER(Enabled)) (BOOL aEnabled);
64 STDMETHOD(COMGETTER(HostMode)) (PortMode_T *aHostMode);
65 STDMETHOD(COMSETTER(HostMode)) (PortMode_T aHostMode);
66 STDMETHOD(COMGETTER(IRQ)) (ULONG *aIRQ);
67 STDMETHOD(COMSETTER(IRQ)) (ULONG aIRQ);
68 STDMETHOD(COMGETTER(IOBase) ) (ULONG *aIOBase);
69 STDMETHOD(COMSETTER(IOBase)) (ULONG aIOBase);
70 STDMETHOD(COMGETTER(Path)) (BSTR *aPath);
71 STDMETHOD(COMSETTER(Path)) (IN_BSTR aPath);
72 STDMETHOD(COMGETTER(Server)) (BOOL *aServer);
73 STDMETHOD(COMSETTER(Server)) (BOOL aServer);
74
75 // public methods only for internal purposes
76
77 HRESULT loadSettings(const settings::SerialPort &data);
78 HRESULT saveSettings(settings::SerialPort &data);
79
80 bool isModified();
81 void rollback();
82 void commit();
83 void copyFrom(SerialPort *aThat);
84
85 void applyDefaults (GuestOSType *aOsType);
86
87 // public methods for internal purposes only
88 // (ensure there is a caller and a read lock before calling them!)
89
90private:
91 HRESULT checkSetPath(const Utf8Str &str);
92
93 struct Data;
94 Data *m;
95};
96
97#endif // ____H_FLOPPYDRIVEIMPL
98/* 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