1/* 2 * @APPLE_LICENSE_HEADER_START@ 3 * 4 * Copyright (c) 1999-2009 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/* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved. 24 * 25 * IOHIDevice.h - Common Event Source object class. 26 * 27 * HISTORY 28 * 22 May 1992 Mike Paquette at NeXT 29 * Created. 30 * 4 Aug 1993 Erik Kay at NeXT 31 * API cleanup 32 * 5 Aug 1993 Erik Kay at NeXT 33 * added ivar space for future expansion 34 */ 35 36#ifndef _IOHIDEVICE_H 37#define _IOHIDEVICE_H 38 39#include <IOKit/IOService.h> 40#include <IOKit/IOLocks.h> 41 42typedef enum { 43 kHIUnknownDevice = 0, 44 kHIKeyboardDevice = 1, 45 kHIRelativePointingDevice = 2 46} IOHIDKind; 47 48class IOHIDevice : public IOService 49{ 50 OSDeclareDefaultStructors(IOHIDevice); 51 52public: 53 virtual bool init(OSDictionary * properties = 0); 54 virtual void free(); 55 virtual bool start(IOService * provider); 56 virtual bool open( IOService * forClient, 57 IOOptionBits options = 0, 58 void * arg = 0 ); 59 60 virtual UInt32 deviceType(); 61 virtual IOHIDKind hidKind(); 62 virtual UInt32 interfaceID(); 63 virtual bool updateProperties(void); 64 virtual IOReturn setProperties( OSObject * properties ); 65 virtual IOReturn setParamProperties(OSDictionary * dict); 66 virtual UInt64 getGUID(); 67 68 static SInt32 GenerateKey(OSObject *object); 69}; 70 71#endif /* !_IOHIDEVICE_H */ 72