xref: /haiku/src/add-ons/input_server/devices/mouse/MouseInputDevice.h (revision 746cac055adc6ac3308c7bc2d29040fb95689cc9)
1 /*
2  * Copyright 2004-2006, Haiku.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Stefano Ceccherini
7  */
8 #ifndef MOUSE_INPUT_DEVICE_H
9 #define MOUSE_INPUT_DEVICE_H
10 
11 
12 #include <InputServerDevice.h>
13 #include <InterfaceDefs.h>
14 #include <List.h>
15 
16 #include <stdio.h>
17 
18 
19 class MouseDevice;
20 
21 class MouseInputDevice : public BInputServerDevice {
22 	public:
23 		MouseInputDevice();
24 		virtual ~MouseInputDevice();
25 
26 		virtual status_t InitCheck();
27 
28 		virtual status_t Start(const char* name, void* cookie);
29 		virtual status_t Stop(const char* name, void* cookie);
30 
31 		virtual status_t Control(const char* name, void* cookie,
32 							uint32 command, BMessage* message);
33 
34 	private:
35 		status_t _HandleMonitor(BMessage* message);
36 		void _RecursiveScan(const char* directory);
37 
38 		MouseDevice* _FindDevice(const char* path);
39 		status_t _AddDevice(const char* path);
40 		status_t _RemoveDevice(const char* path);
41 
42 		BList fDevices;
43 #ifdef DEBUG
44 public:
45 	static FILE *sLogFile;
46 #endif
47 };
48 
49 extern "C" BInputServerDevice* instantiate_input_device();
50 
51 #endif	// MOUSE_INPUT_DEVICE_H
52