vfs: check userland buffers before reading them.
[haiku.git] / src / servers / bluetooth / DeviceManager.h
blob86fddf3f498d3d78c241c1bdf387bd49569e2763
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
11 // Manager for devices monitoring
12 #include <Handler.h>
13 #include <Node.h>
14 #include <Looper.h>
15 #include <Locker.h>
18 class DeviceManager : public BLooper {
19 public:
20 DeviceManager();
21 ~DeviceManager();
23 void LoadState();
24 void SaveState();
26 status_t StartMonitoringDevice(const char* device);
27 status_t StopMonitoringDevice(const char* device);
29 void MessageReceived(BMessage *msg);
31 private:
32 status_t AddDirectory(node_ref* nref);
33 status_t RemoveDirectory(node_ref* nref);
34 status_t AddDevice(entry_ref* nref);
36 BLocker fLock;
39 #endif // _DEVICE_MANAGER_H