#ifndef _IOKIT_HID_IOHIDCONSUMER_H
#define _IOKIT_HID_IOHIDCONSUMER_H
#include <IOKit/IOLib.h>
#include <IOKit/IOService.h>
#include <IOKit/hidsystem/IOHIDDescriptorParser.h>
#include <IOKit/hidsystem/IOHIDShared.h>
#include <IOKit/hidsystem/IOHIKeyboard.h>
#include <libkern/OSByteOrder.h>
class IOHIDConsumer : public IOHIKeyboard
{
OSDeclareDefaultStructors(IOHIDConsumer)
bool _muteIsPressed;
bool _ejectIsPressed;
bool _powerIsPressed;
bool _playIsPressed;
bool _soundUpIsPressed;
bool _soundDownIsPressed;
bool _fastForwardIsPressed;
bool _rewindIsPressed;
bool _nextTrackIsPressed;
bool _prevTrackIsPressed;
unsigned _eventFlags;
bool _capsLockOn;
UInt32 * _systemPowerValuePtr;
UInt32 * _systemSleepValuePtr;
UInt32 * _systemWakeUpValuePtr;
UInt32 * _powerValuePtr;
UInt32 * _resetValuePtr;
UInt32 * _sleepValuePtr;
UInt32 * _playValuePtr;
UInt32 * _playOrPauseValuePtr;
UInt32 * _playOrSkipPtr;
UInt32 * _nextTrackValuePtr;
UInt32 * _prevTrackValuePtr;
UInt32 * _fastFowardValuePtr;
UInt32 * _rewindValuePtr;
UInt32 * _stopOrEjectPtr;
UInt32 * _ejectValuePtr;
UInt32 * _volumeIncValuePtr;
UInt32 * _volumeDecValuePtr;
UInt32 * _volumeMuteValuePtr;
bool findDesiredElements(OSArray *elements);
UInt32 FindKeyboardsAndGetModifiers();
public:
static IOHIDConsumer * Consumer(OSArray *elements);
virtual bool init(OSDictionary *properties=0);
virtual void handleReport();
virtual const unsigned char* defaultKeymapOfLength( UInt32 * length );
virtual unsigned eventFlags();
virtual bool alphaLock();
};
#endif