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:
Glenn Maynard
2005-12-10 02:07:30 +00:00
parent bd6b59df43
commit 39535c11e5
4 changed files with 119 additions and 109 deletions
@@ -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