2015-04-19 22:52:45 +00:00
|
|
|
#ifndef CDEVICEBASE
|
|
|
|
#define CDEVICEBASE
|
|
|
|
|
2015-04-21 04:02:43 +00:00
|
|
|
class CDeviceToken;
|
|
|
|
class IHIDDevice;
|
2015-04-19 22:52:45 +00:00
|
|
|
|
|
|
|
class CDeviceBase
|
|
|
|
{
|
2015-04-21 04:02:43 +00:00
|
|
|
CDeviceToken* m_token;
|
|
|
|
IHIDDevice* m_hidDev;
|
2015-04-22 21:48:23 +00:00
|
|
|
friend CDeviceToken;
|
|
|
|
void _deviceDisconnected();
|
2015-04-19 22:52:45 +00:00
|
|
|
public:
|
2015-04-21 04:02:43 +00:00
|
|
|
inline CDeviceBase(CDeviceToken* token, IHIDDevice* hidDev)
|
|
|
|
: m_token(token), m_hidDev(hidDev) {}
|
2015-04-22 21:48:23 +00:00
|
|
|
void closeDevice();
|
2015-04-21 04:02:43 +00:00
|
|
|
virtual void deviceDisconnected()=0;
|
2015-04-19 22:52:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CDEVICEBASE
|