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
12struct io_context;
13
14#ifdef __cplusplus
15
16// C++ only part
17
18class NotificationListener;
19
20extern status_t remove_node_listener(dev_t device, ino_t node,
21	NotificationListener& listener);
22extern status_t add_node_listener(dev_t device, ino_t node, uint32 flags,
23	NotificationListener& listener);
24
25extern "C" {
26#endif
27
28// private kernel API
29extern status_t remove_node_monitors(struct io_context *context);
30extern status_t node_monitor_init(void);
31extern status_t notify_unmount(dev_t device);
32extern status_t notify_mount(dev_t device, dev_t parentDevice,
33					ino_t parentDirectory);
34
35// user-space exported calls
36extern status_t _user_stop_notifying(port_id port, uint32 token);
37extern status_t _user_start_watching(dev_t device, ino_t node, uint32 flags,
38					port_id port, uint32 token);
39extern 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