From 4af09fc75a0c539e27c9c039c69ffa4f1dc117b2 Mon Sep 17 00:00:00 2001 From: Matt1360 Date: Wed, 13 Feb 2008 03:45:13 +0000 Subject: [PATCH] git-svn-id: https://openitg.svn.sourceforge.net/svnroot/openitg@9 83fadc84-e282-4d84-a09a-c4228d6ae7e5 --- src/USBDevice.cpp | 15 +++++++++++++++ src/USBDevice.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 src/USBDevice.cpp create mode 100644 src/USBDevice.h diff --git a/src/USBDevice.cpp b/src/USBDevice.cpp new file mode 100644 index 00000000..e406cb42 --- /dev/null +++ b/src/USBDevice.cpp @@ -0,0 +1,15 @@ +#include "global.h" +#include + +CString USBDevice::GetClassDescription( int iClass ) +{ + return "not implemented"; +} + +CString USBDevice::GetDescription() +{ + if( IsITGIO() || IsPIUIO() ) + return "Input/lights controller"; + + return "Description not implemented"; +} diff --git a/src/USBDevice.h b/src/USBDevice.h new file mode 100644 index 00000000..80b8f63d --- /dev/null +++ b/src/USBDevice.h @@ -0,0 +1,50 @@ +#ifndef INPUT_HANDLER_USBDRIVER_H +#define INPUT_HANDLER_USBDRIVER_H + +#include +#include "InputHandler.h" + +class USBDevice +{ +public: + USBDevice(); + ~USBDevice(); + + bool Load(); + + CString GetDeviceProperty( CString sProperty ); + CString GetInterfaceProperty( CString sProperty, int iInterface ); + CString GetClassDescription( int iClass ); + CString GetDescription(); + + bool IsHub(); + bool IsITGIO(); + bool IsPIUIO(); +}; + +#endif + +/* + * (c) 2008 BoXoRRoXoRs + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, and/or sell copies of the Software, and to permit persons to + * whom the Software is furnished to do so, provided that the above + * copyright notice(s) and this permission notice appear in all copies of + * the Software and that both the above copyright notice(s) and this + * permission notice appear in supporting documentation. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT + * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS + * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ -- 2.11.0