#include <AppleRemote.h>
Definition at line 14 of file AppleRemote.h.
Public Types | |
| enum | Event { VolumePlus = 0, VolumeMinus, Menu, Play, Right, Left, RightHold, LeftHold, MenuHold, PlaySleep, ControlSwitched } |
Public Member Functions | |
| ~AppleRemote () | |
| bool | isListeningToRemote () |
| void | setListener (Listener *listener) |
| Listener * | listener () |
| void | setOpenInExclusiveMode (bool in) |
| bool | isOpenInExclusiveMode () |
| void | startListening () |
| void | stopListening () |
| void | runLoop () |
Static Public Member Functions | |
| static AppleRemote & | instance () |
Protected Member Functions | |
| AppleRemote () | |
Static Protected Attributes | |
| static AppleRemote * | _instance = 0 |
| static const char *const | AppleRemoteDeviceName = "AppleIRController" |
| static const int | REMOTE_SWITCH_COOKIE = 19 |
Private Member Functions | |
| void | _initCookieMap () |
| io_object_t | _findAppleRemoteDevice () |
| bool | _initCookies () |
| bool | _createDeviceInterface (io_object_t hidDevice) |
| bool | _openDevice () |
| void | _queueCallbackFunction (IOReturn result, void *refcon, void *sender) |
| void | _handleEventWithCookieString (std::string cookieString, SInt32 sumOfValues) |
Static Private Member Functions | |
| static void | QueueCallbackFunction (void *target, IOReturn result, void *refcon, void *sender) |
Private Attributes | |
| bool | openInExclusiveMode |
| IOHIDDeviceInterface ** | hidDeviceInterface |
| IOHIDQueueInterface ** | queue |
| std::vector< int > | cookies |
| std::map< std::string, Event > | cookieToButtonMapping |
| int | remoteId |
| Listener * | _listener |
Classes | |
| class | Listener |
| enum AppleRemote::Event |
| VolumePlus | |
| VolumeMinus | |
| Menu | |
| Play | |
| Right | |
| Left | |
| RightHold | |
| LeftHold | |
| MenuHold | |
| PlaySleep | |
| ControlSwitched |
Definition at line 17 of file AppleRemote.h.
| AppleRemote::~AppleRemote | ( | ) |
Definition at line 39 of file AppleRemote.cpp.
| AppleRemote::AppleRemote | ( | ) | [protected] |
| AppleRemote & AppleRemote::instance | ( | ) | [static] |
Definition at line 31 of file AppleRemote.cpp.
Referenced by MythMainWindow::event(), and SpawnAppleRemote().
| bool AppleRemote::isListeningToRemote | ( | ) |
| void AppleRemote::setListener | ( | AppleRemote::Listener * | listener | ) |
| Listener* AppleRemote::listener | ( | ) | [inline] |
Definition at line 42 of file AppleRemote.h.
| void AppleRemote::setOpenInExclusiveMode | ( | bool | in | ) | [inline] |
Definition at line 43 of file AppleRemote.h.
| bool AppleRemote::isOpenInExclusiveMode | ( | ) | [inline] |
Definition at line 44 of file AppleRemote.h.
| void AppleRemote::startListening | ( | ) |
Definition at line 57 of file AppleRemote.cpp.
Referenced by MythMainWindow::event(), and SpawnAppleRemote().
| void AppleRemote::stopListening | ( | ) |
Definition at line 78 of file AppleRemote.cpp.
Referenced by MythMainWindow::event(), startListening(), and ~AppleRemote().
| void AppleRemote::runLoop | ( | ) |
| void AppleRemote::_initCookieMap | ( | ) | [private] |
| io_object_t AppleRemote::_findAppleRemoteDevice | ( | ) | [private] |
| bool AppleRemote::_initCookies | ( | ) | [private] |
| bool AppleRemote::_createDeviceInterface | ( | io_object_t | hidDevice | ) | [private] |
| bool AppleRemote::_openDevice | ( | ) | [private] |
| void AppleRemote::QueueCallbackFunction | ( | void * | target, | |
| IOReturn | result, | |||
| void * | refcon, | |||
| void * | sender | |||
| ) | [static, private] |
| void AppleRemote::_queueCallbackFunction | ( | IOReturn | result, | |
| void * | refcon, | |||
| void * | sender | |||
| ) | [private] |
| void AppleRemote::_handleEventWithCookieString | ( | std::string | cookieString, | |
| SInt32 | sumOfValues | |||
| ) | [private] |
AppleRemote * AppleRemote::_instance = 0 [static, protected] |
const char *const AppleRemote::AppleRemoteDeviceName = "AppleIRController" [static, protected] |
const int AppleRemote::REMOTE_SWITCH_COOKIE = 19 [static, protected] |
bool AppleRemote::openInExclusiveMode [private] |
Definition at line 58 of file AppleRemote.h.
Referenced by _openDevice(), isOpenInExclusiveMode(), and setOpenInExclusiveMode().
IOHIDDeviceInterface** AppleRemote::hidDeviceInterface [private] |
Definition at line 59 of file AppleRemote.h.
Referenced by _createDeviceInterface(), _initCookies(), _openDevice(), isListeningToRemote(), and stopListening().
IOHIDQueueInterface** AppleRemote::queue [private] |
Definition at line 60 of file AppleRemote.h.
Referenced by _openDevice(), _queueCallbackFunction(), isListeningToRemote(), startListening(), and stopListening().
std::vector<int> AppleRemote::cookies [private] |
Definition at line 61 of file AppleRemote.h.
Referenced by _initCookies(), _openDevice(), isListeningToRemote(), and stopListening().
std::map< std::string, Event > AppleRemote::cookieToButtonMapping [private] |
Definition at line 62 of file AppleRemote.h.
Referenced by _handleEventWithCookieString(), and _initCookieMap().
int AppleRemote::remoteId [private] |
Listener* AppleRemote::_listener [private] |
Definition at line 64 of file AppleRemote.h.
Referenced by _handleEventWithCookieString(), listener(), and setListener().
1.5.5