AppleUSBProKbd.h   [plain text]

	File:		AppleUSBProKbd.h
	Contains:	Driver for second Apple Pro USB Keyboard interface (multimedia keys)
	Version:	1.0
	Copyright:	 2000 by Apple, all rights reserved.

	File Ownership:

		DRI:				Jason Giles
		Other Contact:		Bob Bradley
		Technology:			Apple Pro Keyboard (USB)


		(JG)	Jason Giles

	Change History (most recent first):
		 <2>	 12/4/00	JG		Inherit from IOHIKeyboard. Remove unused member vars.
		 <1>	 7/25/00	JG		First checked in.

// Misc IOKit action.


// HID system includes.


// usb includes.


// extra includes.


//	AppleUSBProKbd
//	Driver for the Apple Pro USB Keyboard's second interface (#1).

class AppleUSBProKbd : public IOHIKeyboard


	// Overrides of IOService.
    virtual	bool	start( IOService * provider );
    virtual	void 	stop( IOService *  provider );
    virtual IOReturn 	message( UInt32 type, IOService * provider,  void * argument = 0 );
   	// Overrides of IOHIKeyboard.

	const unsigned char *	defaultKeymapOfLength( UInt32 * length );
	unsigned 				eventFlags();
	bool 					alphaLock();
	// Our implementation specific stuff.
			bool					VerifyNewDevice( void );
	static	void 					ReadHandler( OSObject*	inTarget,
												 void * 	inParameter,
												 IOReturn	inStatus,
												 UInt32		inBufferSizeRemaining );
			void 					HandleSpecialButtons( UInt8 *	inBufferData,
														  UInt32	bufferSize		);
			UInt32					FindKeyboardsAndGetModifiers();


	IOUSBInterface *				mInterface;
	IOUSBPipe *						mInterruptPipe;
	HIDPreparsedDataRef				mPreparsedReportDescriptorData;
	IOBufferMemoryDescriptor *		mReadDataBuffer;
	IOUSBCompletion					mCompletionRoutine;
	UInt16							mMaxPacketSize;
	Boolean							mSoundUpIsPressed;
	Boolean							mSoundDownIsPressed;
	unsigned						mEventFlags;
	bool							mCapsLockOn;

	bool			fTerminating;