2015-04-19 22:52:45 +00:00
|
|
|
#ifndef IHIDLISTENER_HPP
|
|
|
|
#define IHIDLISTENER_HPP
|
|
|
|
|
2015-04-24 00:24:15 +00:00
|
|
|
#include <unordered_map>
|
2015-04-21 04:02:43 +00:00
|
|
|
#include <mutex>
|
|
|
|
#include "CDeviceToken.hpp"
|
2015-04-29 10:24:39 +00:00
|
|
|
|
|
|
|
namespace boo
|
|
|
|
{
|
|
|
|
|
2015-04-24 00:24:15 +00:00
|
|
|
typedef std::unordered_map<std::string, CDeviceToken> TDeviceTokens;
|
2015-04-22 21:48:23 +00:00
|
|
|
typedef std::pair<TDeviceTokens::iterator, bool> TInsertedDeviceToken;
|
2015-04-21 04:02:43 +00:00
|
|
|
class CDeviceFinder;
|
|
|
|
|
2015-04-19 22:52:45 +00:00
|
|
|
class IHIDListener
|
|
|
|
{
|
2015-04-21 04:02:43 +00:00
|
|
|
public:
|
2015-04-30 07:01:55 +00:00
|
|
|
virtual ~IHIDListener() {}
|
2015-04-21 04:02:43 +00:00
|
|
|
|
|
|
|
/* Automatic device scanning */
|
|
|
|
virtual bool startScanning()=0;
|
|
|
|
virtual bool stopScanning()=0;
|
|
|
|
|
|
|
|
/* Manual device scanning */
|
|
|
|
virtual bool scanNow()=0;
|
2015-04-19 22:52:45 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
2015-04-21 04:02:43 +00:00
|
|
|
/* Platform-specific constructor */
|
|
|
|
IHIDListener* IHIDListenerNew(CDeviceFinder& finder);
|
|
|
|
|
2015-04-29 10:24:39 +00:00
|
|
|
}
|
|
|
|
|
2015-04-19 22:52:45 +00:00
|
|
|
#endif // IHIDLISTENER_HPP
|