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