TOBI SignalServer  0.1
/home/breidi/Dropbox/signalserver/include/hardware/mouse_linux.h
Go to the documentation of this file.
00001 /*
00002     This file is part of the TOBI SignalServer.
00003 
00004     Commercial Usage
00005     Licensees holding valid Graz University of Technology Commercial
00006     licenses may use this file in accordance with the Graz University
00007     of Technology Commercial License Agreement provided with the
00008     Software or, alternatively, in accordance with the terms contained in
00009     a written agreement between you and Graz University of Technology.
00010 
00011     --------------------------------------------------
00012 
00013     GNU General Public License Usage
00014     Alternatively, this file may be used under the terms of the GNU
00015     General Public License version 3.0 as published by the Free Software
00016     Foundation and appearing in the file gpl.txt included in the
00017     packaging of this file.  Please review the following information to
00018     ensure the GNU General Public License version 3.0 requirements will be
00019     met: http://www.gnu.org/copyleft/gpl.html.
00020 
00021     In case of GNU General Public License Usage ,the TOBI SignalServer
00022     is distributed in the hope that it will be useful,
00023     but WITHOUT ANY WARRANTY; without even the implied warranty of
00024     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00025     GNU General Public License for more details.
00026 
00027     You should have received a copy of the GNU General Public License
00028     along with the TOBI SignalServer. If not, see <http://www.gnu.org/licenses/>.
00029 
00030     Copyright 2010 Graz University of Technology
00031     Contact: SignalServer@tobi-project.org
00032 */
00033 
00042 #ifndef _WIN32
00043 
00044 #ifndef MOUSE_LINUX_H
00045 #define MOUSE_LINUX_H
00046 
00047 #include <usb.h>
00048 #include "mouse.h"
00049 //#include "extern/include/libusb/libusb.h"
00050 #include <libusb-1.0/libusb.h>
00051 
00052 namespace tobiss
00053 {
00054 
00060 class Mouse : public MouseBase
00061 {
00062   public:
00066     Mouse(ticpp::Iterator<ticpp::Element> hw);
00067 
00071     virtual ~Mouse();
00072 
00073   //-----------------------------------------------
00074   protected:
00079     virtual int blockKernelDriver();
00084     virtual int freeKernelDriver();
00088     virtual void acquireData();
00089 
00090     libusb_device **devs_; //pointer to pointer of device, used to retrieve a list of devices
00091     libusb_device_handle *dev_handle_; //a device handle
00092     libusb_context *ctx_; //a libusb session
00093 
00094 
00095     static const HWThreadBuilderTemplateRegistratorWithoutIOService<Mouse> FACTORY_REGISTRATOR_;
00096 };
00097 
00098   //-----------------------------------------------------------------------------
00099 
00100 }
00101 #endif // MOUSE_LINUX_H
00102 #endif // __linux__
 All Data Structures Files Functions Variables