1bb674499SAxel Dörfler /* 29448bb6eSAxel Dörfler * Copyright 2003-2008, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 3bb674499SAxel Dörfler * Distributed under the terms of the MIT License. 4bb674499SAxel Dörfler */ 5f9bdcca5SAxel Dörfler #ifndef _KERNEL_NODE_MONITOR_H 6f9bdcca5SAxel Dörfler #define _KERNEL_NODE_MONITOR_H 7f9bdcca5SAxel Dörfler 8f9bdcca5SAxel Dörfler 9bb674499SAxel Dörfler #include <fs_interface.h> 10f9bdcca5SAxel Dörfler 11f9bdcca5SAxel Dörfler 12f9bdcca5SAxel Dörfler struct io_context; 13f9bdcca5SAxel Dörfler 1450ba16fcSAxel Dörfler #ifdef __cplusplus 159448bb6eSAxel Dörfler 169448bb6eSAxel Dörfler // C++ only part 179448bb6eSAxel Dörfler 189448bb6eSAxel Dörfler class NotificationListener; 199448bb6eSAxel Dörfler 20*191a03fdSAxel Dörfler extern status_t remove_node_listener(dev_t device, ino_t node, 219448bb6eSAxel Dörfler NotificationListener& listener); 22*191a03fdSAxel Dörfler extern status_t add_node_listener(dev_t device, ino_t node, uint32 flags, 239448bb6eSAxel Dörfler NotificationListener& listener); 249448bb6eSAxel Dörfler 2550ba16fcSAxel Dörfler extern "C" { 2650ba16fcSAxel Dörfler #endif 2750ba16fcSAxel Dörfler 28f9bdcca5SAxel Dörfler // private kernel API 29f9bdcca5SAxel Dörfler extern status_t remove_node_monitors(struct io_context *context); 30f9bdcca5SAxel Dörfler extern status_t node_monitor_init(void); 31245aecdaSAxel Dörfler extern status_t notify_unmount(dev_t device); 32245aecdaSAxel Dörfler extern status_t notify_mount(dev_t device, dev_t parentDevice, 33245aecdaSAxel Dörfler ino_t parentDirectory); 34f9bdcca5SAxel Dörfler 35f9bdcca5SAxel Dörfler // user-space exported calls 36bb45cbbbSAxel Dörfler extern status_t _user_stop_notifying(port_id port, uint32 token); 37bb45cbbbSAxel Dörfler extern status_t _user_start_watching(dev_t device, ino_t node, uint32 flags, 38f9bdcca5SAxel Dörfler port_id port, uint32 token); 39edb15b55SAxel Dörfler extern status_t _user_stop_watching(dev_t device, ino_t node, port_id port, 40edb15b55SAxel Dörfler uint32 token); 41f9bdcca5SAxel Dörfler 4250ba16fcSAxel Dörfler #ifdef __cplusplus 4350ba16fcSAxel Dörfler } 4450ba16fcSAxel Dörfler #endif 4550ba16fcSAxel Dörfler 46f9bdcca5SAxel Dörfler #endif /* _KRENEL_NODE_MONITOR_H */ 47