2006-03-03 14:48:49 +03:00
|
|
|
/*
|
2008-02-20 19:48:16 +03:00
|
|
|
* Copyright 2003-2008, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
2006-03-03 14:48:49 +03:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
2003-01-18 17:04:22 +03:00
|
|
|
#ifndef _KERNEL_NODE_MONITOR_H
|
|
|
|
#define _KERNEL_NODE_MONITOR_H
|
|
|
|
|
|
|
|
|
2006-03-03 14:48:49 +03:00
|
|
|
#include <fs_interface.h>
|
2003-01-18 17:04:22 +03:00
|
|
|
|
|
|
|
|
|
|
|
struct io_context;
|
|
|
|
|
2003-10-17 18:42:45 +04:00
|
|
|
#ifdef __cplusplus
|
2008-02-20 19:48:16 +03:00
|
|
|
|
|
|
|
// C++ only part
|
|
|
|
|
|
|
|
class NotificationListener;
|
|
|
|
|
2008-07-09 17:04:54 +04:00
|
|
|
extern status_t remove_node_listener(dev_t device, ino_t node,
|
2008-02-20 19:48:16 +03:00
|
|
|
NotificationListener& listener);
|
2008-07-09 17:04:54 +04:00
|
|
|
extern status_t add_node_listener(dev_t device, ino_t node, uint32 flags,
|
2008-02-20 19:48:16 +03:00
|
|
|
NotificationListener& listener);
|
|
|
|
|
2003-10-17 18:42:45 +04:00
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2003-01-18 17:04:22 +03:00
|
|
|
// private kernel API
|
|
|
|
extern status_t remove_node_monitors(struct io_context *context);
|
|
|
|
extern status_t node_monitor_init(void);
|
2007-06-21 23:50:57 +04:00
|
|
|
extern status_t notify_unmount(dev_t device);
|
|
|
|
extern status_t notify_mount(dev_t device, dev_t parentDevice,
|
|
|
|
ino_t parentDirectory);
|
2003-01-18 17:04:22 +03:00
|
|
|
|
|
|
|
// user-space exported calls
|
2004-06-30 00:12:29 +04:00
|
|
|
extern status_t _user_stop_notifying(port_id port, uint32 token);
|
|
|
|
extern status_t _user_start_watching(dev_t device, ino_t node, uint32 flags,
|
2003-01-18 17:04:22 +03:00
|
|
|
port_id port, uint32 token);
|
2007-08-01 18:48:44 +04:00
|
|
|
extern status_t _user_stop_watching(dev_t device, ino_t node, port_id port,
|
|
|
|
uint32 token);
|
2003-01-18 17:04:22 +03:00
|
|
|
|
2003-10-17 18:42:45 +04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2003-01-18 17:04:22 +03:00
|
|
|
#endif /* _KRENEL_NODE_MONITOR_H */
|