1 | /* $Id: USBControllerImpl.h 76562 2019-01-01 03:22:50Z vboxsync $ */
|
---|
2 |
|
---|
3 | /** @file
|
---|
4 | *
|
---|
5 | * VBox USBController COM Class declaration.
|
---|
6 | */
|
---|
7 |
|
---|
8 | /*
|
---|
9 | * Copyright (C) 2005-2019 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 MAIN_INCLUDED_USBControllerImpl_h
|
---|
21 | #define MAIN_INCLUDED_USBControllerImpl_h
|
---|
22 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
23 | # pragma once
|
---|
24 | #endif
|
---|
25 |
|
---|
26 | #include "USBControllerWrap.h"
|
---|
27 |
|
---|
28 | class HostUSBDevice;
|
---|
29 | class USBDeviceFilter;
|
---|
30 |
|
---|
31 | namespace settings
|
---|
32 | {
|
---|
33 | struct USBController;
|
---|
34 | }
|
---|
35 |
|
---|
36 | class ATL_NO_VTABLE USBController :
|
---|
37 | public USBControllerWrap
|
---|
38 | {
|
---|
39 | public:
|
---|
40 |
|
---|
41 | DECLARE_EMPTY_CTOR_DTOR(USBController)
|
---|
42 |
|
---|
43 | HRESULT FinalConstruct();
|
---|
44 | void FinalRelease();
|
---|
45 |
|
---|
46 | // public initializer/uninitializer for internal purposes only
|
---|
47 | HRESULT init(Machine *aParent, const com::Utf8Str &aName, USBControllerType_T enmType);
|
---|
48 | HRESULT init(Machine *aParent, USBController *aThat, bool fReshare = false);
|
---|
49 | HRESULT initCopy(Machine *aParent, USBController *aThat);
|
---|
50 | void uninit();
|
---|
51 |
|
---|
52 | // public methods only for internal purposes
|
---|
53 | void i_rollback();
|
---|
54 | void i_commit();
|
---|
55 | void i_copyFrom(USBController *aThat);
|
---|
56 | void i_unshare();
|
---|
57 |
|
---|
58 | ComObjPtr<USBController> i_getPeer();
|
---|
59 | const Utf8Str &i_getName() const;
|
---|
60 | const USBControllerType_T &i_getControllerType() const;
|
---|
61 |
|
---|
62 | private:
|
---|
63 |
|
---|
64 | // wrapped IUSBController properties
|
---|
65 | HRESULT getName(com::Utf8Str &aName);
|
---|
66 | HRESULT setName(const com::Utf8Str &aName);
|
---|
67 | HRESULT getType(USBControllerType_T *aType);
|
---|
68 | HRESULT setType(USBControllerType_T aType);
|
---|
69 | HRESULT getUSBStandard(USHORT *aUSBStandard);
|
---|
70 |
|
---|
71 | void printList();
|
---|
72 |
|
---|
73 | struct Data;
|
---|
74 | Data *m;
|
---|
75 | };
|
---|
76 |
|
---|
77 | #endif /* !MAIN_INCLUDED_USBControllerImpl_h */
|
---|
78 | /* vi: set tabstop=4 shiftwidth=4 expandtab: */
|
---|