VirtualBox

source: vbox/trunk/src/VBox/Main/include/USBControllerImpl.h@ 48297

Last change on this file since 48297 was 47401, checked in by vboxsync, 11 years ago

Main,Frontends: Second step of USB controller rework. There is one controller instance for every USB controller now. Adapt frontends and testsuite to work with the changed API

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 KB
Line 
1/* $Id: USBControllerImpl.h 47401 2013-07-25 19:12:24Z vboxsync $ */
2
3/** @file
4 *
5 * VBox USBController COM Class declaration.
6 */
7
8/*
9 * Copyright (C) 2005-2012 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 "VirtualBoxBase.h"
24
25class HostUSBDevice;
26class USBDeviceFilter;
27
28namespace settings
29{
30 struct USBController;
31}
32
33class ATL_NO_VTABLE USBController :
34 public VirtualBoxBase,
35 VBOX_SCRIPTABLE_IMPL(IUSBController)
36{
37public:
38 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(USBController, IUSBController)
39
40 DECLARE_NOT_AGGREGATABLE(USBController)
41
42 DECLARE_PROTECT_FINAL_CONSTRUCT()
43
44 BEGIN_COM_MAP(USBController)
45 VBOX_DEFAULT_INTERFACE_ENTRIES(IUSBController)
46 END_COM_MAP()
47
48 DECLARE_EMPTY_CTOR_DTOR(USBController)
49
50 HRESULT FinalConstruct();
51 void FinalRelease();
52
53 // public initializer/uninitializer for internal purposes only
54 HRESULT init(Machine *aParent, const Utf8Str &aName, USBControllerType_T enmType);
55 HRESULT init(Machine *aParent, USBController *aThat, bool fReshare = false);
56 HRESULT initCopy(Machine *aParent, USBController *aThat);
57 void uninit();
58
59 // IUSBController properties
60 STDMETHOD(COMGETTER(Name))(BSTR *aName);
61 STDMETHOD(COMGETTER(Type))(USBControllerType_T *enmType);
62 STDMETHOD(COMGETTER(USBStandard))(USHORT *aUSBStandard);
63
64 // public methods only for internal purposes
65
66 void rollback();
67 void commit();
68 void copyFrom(USBController *aThat);
69 void unshare();
70
71 const Utf8Str &getName() const;
72 USBControllerType_T getControllerType() const;
73
74 ComObjPtr<USBController> getPeer();
75
76private:
77
78 void printList();
79
80 struct Data;
81 Data *m;
82};
83
84#endif //!____H_USBCONTROLLERIMPL
85/* 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