AppleRemote Class Reference

#include <AppleRemote.h>

List of all members.


Detailed Description

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)
Listenerlistener ()
void setOpenInExclusiveMode (bool in)
bool isOpenInExclusiveMode ()
void startListening ()
void stopListening ()
void runLoop ()

Static Public Member Functions

static AppleRemoteinstance ()

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, EventcookieToButtonMapping
int remoteId
Listener_listener

Classes

class  Listener

Member Enumeration Documentation

Enumerator:
VolumePlus 
VolumeMinus 
Menu 
Play 
Right 
Left 
RightHold 
LeftHold 
MenuHold 
PlaySleep 
ControlSwitched 

Definition at line 17 of file AppleRemote.h.


Constructor & Destructor Documentation

AppleRemote::~AppleRemote (  ) 

Definition at line 39 of file AppleRemote.cpp.

AppleRemote::AppleRemote (  )  [protected]

Definition at line 106 of file AppleRemote.cpp.

Referenced by instance().


Member Function Documentation

AppleRemote & AppleRemote::instance (  )  [static]

Definition at line 31 of file AppleRemote.cpp.

Referenced by MythMainWindow::event(), and SpawnAppleRemote().

bool AppleRemote::isListeningToRemote (  ) 

Definition at line 45 of file AppleRemote.cpp.

Referenced by SpawnAppleRemote().

void AppleRemote::setListener ( AppleRemote::Listener listener  ) 

Definition at line 51 of file AppleRemote.cpp.

Referenced by SpawnAppleRemote().

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 (  ) 

Definition at line 100 of file AppleRemote.cpp.

Referenced by SpawnAppleRemote().

void AppleRemote::_initCookieMap (  )  [private]

Definition at line 116 of file AppleRemote.cpp.

Referenced by AppleRemote().

io_object_t AppleRemote::_findAppleRemoteDevice (  )  [private]

Definition at line 147 of file AppleRemote.cpp.

Referenced by startListening().

bool AppleRemote::_initCookies (  )  [private]

Definition at line 172 of file AppleRemote.cpp.

Referenced by startListening().

bool AppleRemote::_createDeviceInterface ( io_object_t  hidDevice  )  [private]

Definition at line 213 of file AppleRemote.cpp.

Referenced by startListening().

bool AppleRemote::_openDevice (  )  [private]

Definition at line 244 of file AppleRemote.cpp.

Referenced by startListening().

void AppleRemote::QueueCallbackFunction ( void *  target,
IOReturn  result,
void *  refcon,
void *  sender 
) [static, private]

Definition at line 304 of file AppleRemote.cpp.

Referenced by _openDevice().

void AppleRemote::_queueCallbackFunction ( IOReturn  result,
void *  refcon,
void *  sender 
) [private]

Definition at line 313 of file AppleRemote.cpp.

Referenced by QueueCallbackFunction().

void AppleRemote::_handleEventWithCookieString ( std::string  cookieString,
SInt32  sumOfValues 
) [private]

Definition at line 344 of file AppleRemote.cpp.

Referenced by _queueCallbackFunction().


Member Data Documentation

AppleRemote * AppleRemote::_instance = 0 [static, protected]

Definition at line 52 of file AppleRemote.h.

Referenced by instance().

const char *const AppleRemote::AppleRemoteDeviceName = "AppleIRController" [static, protected]

Definition at line 53 of file AppleRemote.h.

Referenced by _findAppleRemoteDevice().

const int AppleRemote::REMOTE_SWITCH_COOKIE = 19 [static, protected]

Definition at line 54 of file AppleRemote.h.

Referenced by _queueCallbackFunction().

Definition at line 58 of file AppleRemote.h.

Referenced by _openDevice(), isOpenInExclusiveMode(), and setOpenInExclusiveMode().

IOHIDDeviceInterface** AppleRemote::hidDeviceInterface [private]

IOHIDQueueInterface** AppleRemote::queue [private]

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]

Definition at line 63 of file AppleRemote.h.

Referenced by _queueCallbackFunction().

Definition at line 64 of file AppleRemote.h.

Referenced by _handleEventWithCookieString(), listener(), and setListener().


The documentation for this class was generated from the following files:

Generated on Sat Dec 18 05:15:59 2010 for MythTV by  doxygen 1.5.5