Changeset 17669 in vbox for trunk/src/VBox/Main/include/HardDiskAttachmentImpl.h
- Timestamp:
- Mar 11, 2009 9:56:29 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 44161
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/HardDiskAttachmentImpl.h
r16867 r17669 39 39 : public std::unary_function <ComObjPtr<HardDiskAttachment>, bool> 40 40 { 41 explicit EqualsTo ( StorageBus_T aBus, LONG aChannel, LONG aDevice)42 : bus (aBus), channel (aChannel), device (aDevice) {}41 explicit EqualsTo (CBSTR aController, LONG aPort, LONG aDevice) 42 : controller(aController), port (aPort), device (aDevice) {} 43 43 44 44 bool operator() (const argument_type &aThat) const 45 45 { 46 return aThat-> bus() == bus && aThat->channel() == channel&&46 return aThat->controller() == controller && aThat->port() == port && 47 47 aThat->device() == device; 48 48 } 49 49 50 const StorageBus_T bus;51 const LONG channel;50 const Bstr controller; 51 const LONG port; 52 52 const LONG device; 53 53 }; … … 82 82 83 83 // public initializer/uninitializer for internal purposes only 84 HRESULT init(HardDisk *aHD, StorageBus_T aBus, LONG aChannel,84 HRESULT init(HardDisk *aHD, IN_BSTR aController, LONG aPort, 85 85 LONG aDevice, bool aImplicit = false); 86 86 void uninit(); … … 88 88 // IHardDiskAttachment properties 89 89 STDMETHOD(COMGETTER(HardDisk)) (IHardDisk **aHardDisk); 90 STDMETHOD(COMGETTER( Bus)) (StorageBus_T *aBus);91 STDMETHOD(COMGETTER( Channel)) (LONG *aChannel);90 STDMETHOD(COMGETTER(Controller)) (BSTR *aController); 91 STDMETHOD(COMGETTER(Port)) (LONG *aPort); 92 92 STDMETHOD(COMGETTER(Device)) (LONG *aDevice); 93 93 … … 99 99 100 100 const ComObjPtr<HardDisk> &hardDisk() const { return m.hardDisk; } 101 StorageBus_T bus() const { return m.bus; }102 LONG channel() const { return m.channel; }101 Bstr controller() const { return m.controller; } 102 LONG port() const { return m.port; } 103 103 LONG device() const { return m.device; } 104 104 … … 117 117 struct Data 118 118 { 119 Data() : bus (StorageBus_Null), channel(0), device (0)119 Data() : port (0), device (0) 120 120 , implicit (false) {} 121 121 … … 123 123 /// rid of locks at all in this simple readonly structure-like interface 124 124 ComObjPtr<HardDisk> hardDisk; 125 const StorageBus_T bus;126 const LONG channel;125 const Bstr controller; 126 const LONG port; 127 127 const LONG device; 128 128
Note:
See TracChangeset
for help on using the changeset viewer.