27 #ifndef OVR_DeviceImpl_h
28 #define OVR_DeviceImpl_h
41 class DeviceManagerImpl;
170 {
OVR_UNUSED2(desc, newDeviceFlag);
return false; }
virtual bool MatchHIDDevice(const HIDDeviceDesc &) const
void CallOnDeviceRemoved(DeviceCreateDesc *desc)
DeviceImpl(DeviceCreateDesc *createDesc, DeviceBase *parent)
DeviceFactory *const pFactory
bool RemoveHandler(MessageHandler *handler)
virtual ThreadId GetThreadId() const =0
Void ReleaseDevice_MgrThread(DeviceBase *device)
DeviceCommon(DeviceCreateDesc *createDesc, DeviceBase *device, DeviceBase *parent)
DeviceManagerImpl * GetManagerImpl()
virtual bool Initialize(DeviceBase *parent)=0
void AddFactory(DeviceFactory *factory)
static DeviceCommon * GetDeviceCommon(DeviceBase *device)
virtual Ptr< DeviceCreateDesc > AddDevice_NeedsLock(const DeviceCreateDesc &createDesc)
virtual ThreadCommandQueue * GetThreadQueue()=0
MessageHandler * pHandlers[MaxHandlersCount]
Ptr< DeviceCreateDesc > pCreateDesc
Ptr< DeviceCreateDesc > FindDevice(const String &path, DeviceType=Device_None)
virtual bool MatchVendorProduct(UInt16 vendorId, UInt16 productId) const
Ptr< DeviceBase > pParent
Ptr< DeviceManagerLock > pLock
void operator=(const DeviceCreateDesc &)
void CallOnDeviceAdded(DeviceCreateDesc *desc)
virtual MatchResult MatchDevice(const DeviceCreateDesc &other, DeviceCreateDesc **pcandidate) const =0
void AddHandler_NTS(MessageHandler *handler)
virtual bool UpdateMatchedCandidate(const DeviceCreateDesc &desc, bool *newDeviceFlag=NULL)
virtual DeviceEnumerator EnumerateDevicesEx(const DeviceEnumerationArgs &args)
Ptr< ProfileManager > pProfileManager
DeviceManagerImpl * GetManagerImpl() const
void AddHandler(MessageHandler *handler)
virtual bool DetectHIDDevice(DeviceManager *pdevMgr, const HIDDeviceDesc &desc)
DeviceManagerImpl * pManager
virtual DeviceBase * NewDeviceInstance()=0
Ptr< DeviceCreateDesc > FindHIDDevice(const HIDDeviceDesc &, bool created)
virtual bool GetDeviceInfo(DeviceInfo *info) const =0
MessageHandlerRef(DeviceBase *device)
virtual void Visit(const DeviceCreateDesc &createDesc)=0
virtual ~DeviceCreateDesc()
virtual Void EnumerateFactoryDevices(DeviceFactory *factory)
List< DeviceFactory > Factories
MessageHandlerRef HandlerRef
List< DeviceCreateDesc > Devices
virtual void Shutdown()=0
virtual HIDDeviceManager * GetHIDDeviceManager() const
DeviceCreateDesc(DeviceFactory *factory, DeviceType type)
AtomicInt< UInt32 > HandleCount
DeviceManagerImpl * GetManagerImpl() const
bool removeHandler(int idx)
Ptr< HIDDeviceManager > HidDeviceManager
virtual bool MatchDevice(const String &)
virtual DeviceCommon * getDeviceCommon() const
DeviceManagerImpl * pManager
friend class DeviceHandle
virtual ProfileManager * GetProfileManager() const
virtual DeviceCreateDesc * Clone() const =0
virtual DeviceCommon * getDeviceCommon() const =0
void DetectHIDDevice(const HIDDeviceDesc &)
virtual Void EnumerateAllFactoryDevices()
virtual void RemovedFromManager()
void Call(const Message &msg)
DeviceBase * GetDevice() const
virtual void EnumerateDevices(EnumerateVisitor &visitor)=0
DeviceBase * CreateDevice_MgrThread(DeviceCreateDesc *createDesc, DeviceBase *parent=0)
static DeviceCreateDesc * CreateManagerDesc()
volatile bool ConnectedFlag
AtomicInt< UInt32 > RefCount
#define OVR_UNUSED2(a1, a2)
virtual bool AddedToManager(DeviceManagerImpl *manager)
virtual bool Initialize(DeviceBase *parent)