1/*
2** Copyright 2004, the Haiku project. All rights reserved.
3** Distributed under the terms of the MIT 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
18class 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