move common high-level device checking logic into base class:
- report STATE_CHECKING when a device is first seen, so "checking" shows up quickly - read quick profile data once bMount is true
This commit is contained in:
@@ -81,7 +81,16 @@ public:
|
||||
|
||||
/* Poll for memory card changes. If anything has changed, fill in vStorageDevicesOut
|
||||
* and return true. */
|
||||
virtual bool DoOneUpdate( bool bMount, vector<UsbStorageDevice>& vStorageDevicesOut ) = 0;
|
||||
virtual bool DoOneUpdate( bool bMount, vector<UsbStorageDevice>& vStorageDevicesOut );
|
||||
|
||||
protected:
|
||||
virtual void GetUSBStorageDevices( vector<UsbStorageDevice>& vDevicesOut ) { }
|
||||
virtual bool USBStorageDevicesChanged() { return false; }
|
||||
bool TestWrite( UsbStorageDevice* pDevice ) { return true; }
|
||||
|
||||
private:
|
||||
vector<UsbStorageDevice> m_vDevicesLastSeen;
|
||||
bool NeedUpdate( bool bMount );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user