Changeset 2845 in vbox for trunk/src/VBox/Main/include
- Timestamp:
- May 24, 2007 4:16:41 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/USBControllerImpl.h
r2805 r2845 33 33 class HostUSBDevice; 34 34 35 /** 36 * @note we cannot use VirtualBoxBaseWithTypedChildren <USBDeviceFilter> as a 37 * base class, because we want a quick (map-based) way of validating 38 * IUSBDeviceFilter pointers passed from outside as method parameters that 39 * VirtualBoxBaseWithChildren::getDependentChild() gives us. 40 */ 41 35 42 class ATL_NO_VTABLE USBController : 36 public VirtualBoxBaseWithChildren ,37 public VirtualBoxSupportErrorInfoImpl <USBController, IUSBController>,38 public VirtualBoxSupportTranslation <USBController>,43 public VirtualBoxBaseWithChildrenNEXT, 44 public VirtualBoxSupportErrorInfoImpl <USBController, IUSBController>, 45 public VirtualBoxSupportTranslation <USBController>, 39 46 public IUSBController 40 47 { … … 44 51 { 45 52 /* Constructor. */ 46 Data() : m _fEnabled(FALSE) { }53 Data() : mEnabled (FALSE) { } 47 54 48 55 bool operator== (const Data &that) const 49 56 { 50 return this == &that || m _fEnabled == that.m_fEnabled;57 return this == &that || mEnabled == that.mEnabled; 51 58 } 52 59 53 60 /** Enabled indicator. */ 54 BOOL m_fEnabled;61 BOOL mEnabled; 55 62 }; 56 63 57 64 public: 58 65 59 DECLARE_NOT_AGGREGATABLE(USBController) 66 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT (USBController) 67 68 DECLARE_NOT_AGGREGATABLE (USBController) 60 69 61 70 DECLARE_PROTECT_FINAL_CONSTRUCT() 62 71 63 72 BEGIN_COM_MAP(USBController) 64 COM_INTERFACE_ENTRY (ISupportErrorInfo)65 COM_INTERFACE_ENTRY (IUSBController)73 COM_INTERFACE_ENTRY (ISupportErrorInfo) 74 COM_INTERFACE_ENTRY (IUSBController) 66 75 END_COM_MAP() 67 76 68 77 NS_DECL_ISUPPORTS 78 79 DECLARE_EMPTY_CTOR_DTOR (USBController) 69 80 70 81 HRESULT FinalConstruct(); … … 72 83 73 84 // public initializer/uninitializer for internal purposes only 74 HRESULT init (Machine * parent);75 HRESULT init (Machine * parent, USBController *that);76 HRESULT initCopy (Machine * parent, USBController *that);85 HRESULT init (Machine *aParent); 86 HRESULT init (Machine *aParent, USBController *aThat); 87 HRESULT initCopy (Machine *aParent, USBController *aThat); 77 88 void uninit(); 78 89 79 90 // IUSBController properties 80 STDMETHOD(COMGETTER(Enabled)) (BOOL *a_pfEnabled);81 STDMETHOD(COMSETTER(Enabled)) (BOOL a_fEnabled);82 STDMETHOD(COMGETTER(USBStandard)) (USHORT *a_pusUSBStandard);83 STDMETHOD(COMGETTER(DeviceFilters)) (IUSBDeviceFilterCollection **aDevicesFilters);91 STDMETHOD(COMGETTER(Enabled)) (BOOL *aEnabled); 92 STDMETHOD(COMSETTER(Enabled)) (BOOL aEnabled); 93 STDMETHOD(COMGETTER(USBStandard)) (USHORT *aUSBStandard); 94 STDMETHOD(COMGETTER(DeviceFilters)) (IUSBDeviceFilterCollection **aDevicesFilters); 84 95 85 96 // IUSBController methods … … 90 101 // public methods only for internal purposes 91 102 92 ComObjPtr <Machine, ComWeakRef> &parent() { return m_Parent; };103 const ComObjPtr <Machine, ComWeakRef> &parent() { return mParent; }; 93 104 94 105 HRESULT loadSettings (CFGNODE aMachine); … … 101 112 void copyFrom (USBController *aThat); 102 113 103 const Backupable<Data> &data() { return m _Data; }114 const Backupable<Data> &data() { return mData; } 104 115 105 116 HRESULT onMachineRegistered (BOOL aRegistered); … … 130 141 131 142 /** Parent object. */ 132 ComObjPtr<Machine, ComWeakRef> m_Parent;143 const ComObjPtr<Machine, ComWeakRef> mParent; 133 144 /** Peer object. */ 134 ComObjPtr<USBController> m_Peer;145 const ComObjPtr <USBController> mPeer; 135 146 /** Data. */ 136 Backupable <Data> m_Data;147 Backupable <Data> mData; 137 148 138 149 // the following fields need special backup/rollback/commit handling, … … 140 151 141 152 typedef std::list <ComObjPtr <USBDeviceFilter> > DeviceFilterList; 142 Backupable <DeviceFilterList> m _DeviceFilters;153 Backupable <DeviceFilterList> mDeviceFilters; 143 154 }; 144 155
Note:
See TracChangeset
for help on using the changeset viewer.