1/* 2 * @APPLE_LICENSE_HEADER_START@ 3 * 4 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. 5 * 6 * This file contains Original Code and/or Modifications of Original Code 7 * as defined in and that are subject to the Apple Public Source License 8 * Version 2.0 (the 'License'). You may not use this file except in 9 * compliance with the License. Please obtain a copy of the License at 10 * http://www.opensource.apple.com/apsl/ and read it before using this 11 * file. 12 * 13 * The Original Code and all software distributed under the License are 14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 * Please see the License for the specific language governing rights and 19 * limitations under the License. 20 * 21 * @APPLE_LICENSE_HEADER_END@ 22 */ 23#ifndef _IOBSDCONSOLE_H 24#define _IOBSDCONSOLE_H 25 26#include <IOKit/IOService.h> 27 28class IOHIKeyboard; 29 30class IOBSDConsole : public IOService 31{ 32 OSDeclareDefaultStructors(IOBSDConsole); 33 34private: 35 IOService * fAudioOut; 36 37 static bool publishNotificationHandler( 38 IOBSDConsole * self, void * ref, 39 IOService * newService ); 40 41 virtual void arbitrateForKeyboard( IOHIKeyboard * kb ); 42 43public: 44 IOService * displayManager; // we send user activity tickles to the display manager 45 46 static void keyboardEvent(OSObject * target, 47 /* eventType */ unsigned eventType, 48 /* flags */ unsigned flags, 49 /* keyCode */ unsigned key, 50 /* charCode */ unsigned charCode, 51 /* charSet */ unsigned charSet, 52 /* originalCharCode */ unsigned origCharCode, 53 /* originalCharSet */ unsigned origCharSet, 54 /* keyboardType */ unsigned keyboardType, 55 /* repeat */ bool repeat, 56 /* atTime */ AbsoluteTime ts, 57 OSObject * sender, 58 void * refcon); 59 60 static void updateEventFlags( 61 OSObject * target, 62 unsigned flags, 63 OSObject * sender, 64 void * refcon); 65 66 virtual bool start(IOService * provider); 67 68 virtual IOReturn message(UInt32 type, IOService * provider, 69 void * argument); 70 71 IOService * getAudioOut() { return fAudioOut; }; 72}; 73 74#endif /* _IOBSDCONSOLE_H */ 75