Go to the documentation of this file.
14 #include <IOKit/IOKitLib.h>
15 #include <IOKit/IOCFPlugIn.h>
16 #include <IOKit/hid/IOHIDLib.h>
17 #include <IOKit/hid/IOHIDKeys.h>
18 #include <CoreFoundation/CoreFoundation.h>
69 IOHIDQueueInterface**
queue {
nullptr};
86 void* refcon,
void* sender);
88 void* refcon,
void* sender);
static AppleRemote * Get()
void run() override
Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.
virtual ~Listener()=default
AppleRemote::Event mLastEvent
void _initCookieMap()
Apple keeps changing the "interface" between the remote and the OS.
void _handleEventWithCookieString(std::string cookieString, SInt32 sumOfValues)
static void QueueCallbackFunction(void *target, IOReturn result, void *refcon, void *sender)
virtual void appleRemoteButton(Event button, bool pressedDown)=0
void _queueCallbackFunction(IOReturn result, void *refcon, void *sender)
void setOpenInExclusiveMode(bool in)
std::vector< int > cookies
IOHIDDeviceInterface ** hidDeviceInterface
bool _createDeviceInterface(io_object_t hidDevice)
bool isOpenInExclusiveMode()
std::map< std::string, Event > cookieToButtonMapping
static AppleRemote * _instance
This is a wrapper around QThread that does several additional things.
IOHIDQueueInterface ** queue
bool isListeningToRemote()
void setListener(Listener *listener)