Make UEFI boot-platform build again
[haiku.git] / headers / private / storage / NodeMonitorHandler.h
blob5f4aeb1e673fcba32a6a70fac3bed29e01f7f34c
1 #ifndef _NODE_MONITOR_HANDLER_H
2 #define _NODE_MONITOR_HANDLER_H
4 #include <Entry.h>
5 #include <Handler.h>
6 #include <Message.h>
7 #include <NodeMonitor.h>
9 namespace BPrivate {
10 namespace Storage {
12 class NodeMonitorHandler : public BHandler {
13 private:
14 typedef BHandler inherited;
15 public:
16 NodeMonitorHandler(const char * name = "NodeMonitorHandler");
17 virtual ~NodeMonitorHandler();
19 virtual void MessageReceived(BMessage * msg);
21 // useful utility functions
22 static status_t make_entry_ref(dev_t device, ino_t directory,
23 const char * name,
24 entry_ref * ref);
25 static void make_node_ref(dev_t device, ino_t node, node_ref * ref);
27 protected:
28 // hooks for subclass
29 virtual void EntryCreated(const char *name, ino_t directory,
30 dev_t device, ino_t node);
31 virtual void EntryRemoved(const char *name, ino_t directory,
32 dev_t device, ino_t node);
33 virtual void EntryMoved(const char *name, const char *fromName,
34 ino_t fromDirectory, ino_t toDirectory, dev_t device,
35 ino_t node, dev_t nodeDevice);
36 virtual void StatChanged(ino_t node, dev_t device, int32 statFields);
37 virtual void AttrChanged(ino_t node, dev_t device);
38 virtual void DeviceMounted(dev_t new_device, dev_t device,
39 ino_t directory);
40 virtual void DeviceUnmounted(dev_t new_device);
42 private:
43 status_t HandleEntryCreated(BMessage * msg);
44 status_t HandleEntryRemoved(BMessage * msg);
45 status_t HandleEntryMoved(BMessage * msg);
46 status_t HandleStatChanged(BMessage * msg);
47 status_t HandleAttrChanged(BMessage * msg);
48 status_t HandleDeviceMounted(BMessage * msg);
49 status_t HandleDeviceUnmounted(BMessage * msg);
52 }; // namespace Storage
53 }; // namespace BPrivate
55 using namespace BPrivate::Storage;
57 #endif // _NODE_MONITOR_HANDLER_H