1 /* 2 * Copyright 2003-2008, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _KERNEL_NODE_MONITOR_H 6 #define _KERNEL_NODE_MONITOR_H 7 8 9 #include <fs_interface.h> 10 11 12 struct io_context; 13 14 #ifdef __cplusplus 15 16 // C++ only part 17 18 class NotificationListener; 19 20 extern status_t remove_node_listener(dev_t device, ino_t node, 21 NotificationListener& listener); 22 extern status_t add_node_listener(dev_t device, ino_t node, uint32 flags, 23 NotificationListener& listener); 24 25 extern "C" { 26 #endif 27 28 // private kernel API 29 extern status_t remove_node_monitors(struct io_context *context); 30 extern status_t node_monitor_init(void); 31 extern status_t notify_unmount(dev_t device); 32 extern status_t notify_mount(dev_t device, dev_t parentDevice, 33 ino_t parentDirectory); 34 35 // user-space exported calls 36 extern status_t _user_stop_notifying(port_id port, uint32 token); 37 extern status_t _user_start_watching(dev_t device, ino_t node, uint32 flags, 38 port_id port, uint32 token); 39 extern status_t _user_stop_watching(dev_t device, ino_t node, port_id port, 40 uint32 token); 41 42 #ifdef __cplusplus 43 } 44 #endif 45 46 #endif /* _KRENEL_NODE_MONITOR_H */ 47