Make UEFI boot-platform build again
[haiku.git] / src / servers / launch / VolumeWatcher.h
blobdfd533cbcc4e337502312765929372cd3c30064d
1 /*
2 * Copyright 2015, Axel Dörfler, axeld@pinc-software.de.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef VOLUME_WATCHER_H
6 #define VOLUME_WATCHER_H
9 #include <Handler.h>
10 #include <ObjectList.h>
13 class VolumeListener {
14 public:
15 virtual ~VolumeListener();
17 virtual void VolumeMounted(dev_t device) = 0;
18 virtual void VolumeUnmounted(dev_t device) = 0;
22 class VolumeWatcher : public BHandler {
23 public:
24 VolumeWatcher();
25 virtual ~VolumeWatcher();
27 void AddListener(VolumeListener* listener);
28 void RemoveListener(VolumeListener* listener);
29 int32 CountListeners() const;
31 virtual void MessageReceived(BMessage* message);
33 static void Register(VolumeListener* listener);
34 static void Unregister(VolumeListener* listener);
36 protected:
37 BObjectList<VolumeListener>
38 fListeners;
42 #endif // VOLUME_WATCHER_H