1/* 2 * IrDAUserClient.h 3 * 4 * to be included by both sides of the IrDA user-client interface. 5 * keep free of kernel-only or C++ only includes. 6 */ 7 8#ifndef __IrDAUserClient__ 9#define __IrDAUserClient__ 10 11#include "IrDAStats.h" 12 13enum { 14 kIrDAUserClientCookie = 123 // pass to IOServiceOpen 15}; 16 17enum { // command bytes to send to the user client 18 kIrDAUserCmd_GetLog = 0x12, // return irdalog buffers 19 kIrDAUserCmd_GetStatus = 0x13, // return connection status and counters 20 kIrDAUserCmd_Enable = 0x14, // Enable the hardware and the IrDA stack 21 kIrDAUserCmd_Disable = 0x15 // Disable the hardware and the IrDA stack 22}; 23 24enum { // messageType for the callback routines 25 kIrDACallBack_Status = 0x1000, // Status Information is coming 26 kIrDACallBack_Unplug = 0x1001 // USB Device is unplugged 27}; 28 29// This is the way the messages are sent from user space to kernel space: 30typedef struct IrDACommand 31{ 32 unsigned char commandID; // one of the commands above (tbd) 33 char data[1]; // this is not really one byte, it is as big as I like 34 // I set it to 1 just to make the compiler happy 35} IrDACommand; 36typedef IrDACommand *IrDACommandPtr; 37 38#endif // __IrDAUserClient__ 39