1 #ifndef _NODE_MONITOR_HANDLER_H
2 #define _NODE_MONITOR_HANDLER_H
7 #include <NodeMonitor.h>
12 class NodeMonitorHandler
: public BHandler
{
14 typedef BHandler inherited
;
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
,
25 static void make_node_ref(dev_t device
, ino_t node
, node_ref
* ref
);
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
,
40 virtual void DeviceUnmounted(dev_t new_device
);
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