1 | /** @file
|
---|
2 | *
|
---|
3 | * VBox frontends: Basic Frontend (BFE):
|
---|
4 | * Declaration of HostUSB
|
---|
5 | */
|
---|
6 |
|
---|
7 | /*
|
---|
8 | * Copyright (C) 2006-2007 innotek GmbH
|
---|
9 | *
|
---|
10 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
11 | * available from http://www.virtualbox.org. This file is free software;
|
---|
12 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
13 | * General Public License as published by the Free Software Foundation,
|
---|
14 | * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
|
---|
15 | * distribution. VirtualBox OSE is distributed in the hope that it will
|
---|
16 | * be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
17 | */
|
---|
18 |
|
---|
19 | #ifndef ____H_HOSTUSBIMPL
|
---|
20 | #define ____H_HOSTUSBIMPL
|
---|
21 |
|
---|
22 | #ifndef VBOXBFE_WITH_USB
|
---|
23 | # error "misconfiguration VBOXBFE_WITH_USB isn't defined and HostUSBImpl.h was included."
|
---|
24 | #endif
|
---|
25 |
|
---|
26 | #include "VirtualBoxBase.h"
|
---|
27 | #include "HostUSBDeviceImpl.h"
|
---|
28 |
|
---|
29 | /* We do not support loadable configurations here */
|
---|
30 | // #include <VBox/cfgldr.h>
|
---|
31 |
|
---|
32 | #include <list>
|
---|
33 |
|
---|
34 | class HostUSB :
|
---|
35 | public VirtualBoxBase
|
---|
36 | {
|
---|
37 | public:
|
---|
38 | ~HostUSB();
|
---|
39 |
|
---|
40 | // public initializer/uninitializer for internal purposes only
|
---|
41 | HRESULT init (PVM pVM);
|
---|
42 | void uninit();
|
---|
43 |
|
---|
44 | // public methods only for internal purposes
|
---|
45 |
|
---|
46 | void onUSBDeviceAttached (HostUSBDevice *aDevice);
|
---|
47 | void onUSBDeviceDetached (HostUSBDevice *aDevice);
|
---|
48 | void onUSBDeviceStateChanged (HostUSBDevice *aDevice);
|
---|
49 |
|
---|
50 | USBProxyService *usbProxyService() { return mUSBProxyService; }
|
---|
51 |
|
---|
52 | private:
|
---|
53 |
|
---|
54 | typedef std::list <HostUSBDevice *> USBDeviceList;
|
---|
55 | USBDeviceList mUSBDevices;
|
---|
56 |
|
---|
57 | /** Pointer to the VM */
|
---|
58 | PVM mpVM;
|
---|
59 |
|
---|
60 | /** Pointer to the USBProxyService object. */
|
---|
61 | USBProxyService *mUSBProxyService;
|
---|
62 |
|
---|
63 | STDMETHODIMP AttachUSBDevice (HostUSBDevice *hostDevice);
|
---|
64 | STDMETHODIMP DetachUSBDevice (HostUSBDevice *aDevice);
|
---|
65 | };
|
---|
66 |
|
---|
67 | #endif // ____H_HOSTUSBIMPL
|
---|