xref: /haiku/src/servers/bluetooth/DeviceManager.h (revision 95c9effd68127df2dce202d5e254a7c86560010a)
1 /*
2 ** Copyright 2004, the Haiku project. All rights reserved.
3 ** Distributed under the terms of the Haiku License.
4 **
5 ** Author : Jérôme Duval
6 ** Original authors: Marcus Overhagen, Axel Dörfler
7 */
8 #ifndef _DEVICE_MANAGER_H
9 #define _DEVICE_MANAGER_H
10 
11 // Manager for devices monitoring
12 #include <Handler.h>
13 #include <Node.h>
14 #include <Looper.h>
15 #include <Locker.h>
16 
17 
18 class DeviceManager : public BLooper {
19 	public:
20 		DeviceManager();
21 		~DeviceManager();
22 
23 		void		LoadState();
24 		void		SaveState();
25 
26 		status_t StartMonitoringDevice(const char* device);
27 		status_t StopMonitoringDevice(const char* device);
28 
29 		void MessageReceived(BMessage *msg);
30 
31 	private:
32 		status_t AddDirectory(node_ref* nref);
33 		status_t RemoveDirectory(node_ref* nref);
34 		status_t AddDevice(entry_ref* nref);
35 
36 		BLocker fLock;
37 };
38 
39 #endif // _DEVICE_MANAGER_H
40