xref: /haiku/headers/private/fs_shell/fssh_node_monitor.h (revision b6f76ebe7153b94820cf35f8db4facc158841abb)
1a38a92c9SIngo Weinhold #ifndef _FSSH_NODE_MONITOR_H
2a38a92c9SIngo Weinhold #define _FSSH_NODE_MONITOR_H
3a38a92c9SIngo Weinhold /* Node monitor calls for kernel add-ons
4a38a92c9SIngo Weinhold **
5*b6f76ebeSAugustin Cavalier ** Distributed under the terms of the MIT License.
6a38a92c9SIngo Weinhold */
7a38a92c9SIngo Weinhold 
8a38a92c9SIngo Weinhold 
9a38a92c9SIngo Weinhold #include "fssh_defs.h"
10a38a92c9SIngo Weinhold 
11a38a92c9SIngo Weinhold 
12a38a92c9SIngo Weinhold /* Flags for the watch_node() call.
13a38a92c9SIngo Weinhold  *
14a38a92c9SIngo Weinhold  * Note that B_WATCH_MOUNT is NOT included in B_WATCH_ALL.
15a38a92c9SIngo Weinhold  * You may prefer to use BVolumeRoster for volume watching.
16a38a92c9SIngo Weinhold  */
17a38a92c9SIngo Weinhold 
18a38a92c9SIngo Weinhold enum {
19a38a92c9SIngo Weinhold     FSSH_B_STOP_WATCHING		= 0x0000,
20a38a92c9SIngo Weinhold 	FSSH_B_WATCH_NAME			= 0x0001,
21a38a92c9SIngo Weinhold 	FSSH_B_WATCH_STAT			= 0x0002,
22a38a92c9SIngo Weinhold 	FSSH_B_WATCH_ATTR			= 0x0004,
23a38a92c9SIngo Weinhold 	FSSH_B_WATCH_DIRECTORY		= 0x0008,
24a38a92c9SIngo Weinhold 	FSSH_B_WATCH_ALL			= 0x000f,
25a38a92c9SIngo Weinhold 
2649499c17SAxel Dörfler 	FSSH_B_WATCH_MOUNT			= 0x0010,
2749499c17SAxel Dörfler 	FSSH_B_WATCH_INTERIM_STAT	= 0x0020
28a38a92c9SIngo Weinhold };
29a38a92c9SIngo Weinhold 
30a38a92c9SIngo Weinhold 
31a38a92c9SIngo Weinhold /* The "opcode" field of the B_NODE_MONITOR notification message you get.
32a38a92c9SIngo Weinhold  *
33a38a92c9SIngo Weinhold  * The presence and meaning of the other fields in that message specifying what
34a38a92c9SIngo Weinhold  * exactly caused the notification depend on this value.
35a38a92c9SIngo Weinhold  */
36a38a92c9SIngo Weinhold 
37a38a92c9SIngo Weinhold #define	FSSH_B_ENTRY_CREATED	1
38a38a92c9SIngo Weinhold #define	FSSH_B_ENTRY_REMOVED	2
39a38a92c9SIngo Weinhold #define	FSSH_B_ENTRY_MOVED		3
40a38a92c9SIngo Weinhold #define	FSSH_B_STAT_CHANGED		4
41a38a92c9SIngo Weinhold #define	FSSH_B_ATTR_CHANGED		5
42a38a92c9SIngo Weinhold #define	FSSH_B_DEVICE_MOUNTED	6
43a38a92c9SIngo Weinhold #define	FSSH_B_DEVICE_UNMOUNTED	7
44a38a92c9SIngo Weinhold 
45a38a92c9SIngo Weinhold 
46a38a92c9SIngo Weinhold // More specific info in the "cause" field of B_ATTR_CHANGED notification
47a38a92c9SIngo Weinhold // messages. (Haiku only)
48a38a92c9SIngo Weinhold #define	FSSH_B_ATTR_CREATED		1
49a38a92c9SIngo Weinhold #define	FSSH_B_ATTR_REMOVED		2
50a38a92c9SIngo Weinhold //		FSSH_B_ATTR_CHANGED is reused
51a38a92c9SIngo Weinhold 
52a38a92c9SIngo Weinhold 
53a38a92c9SIngo Weinhold // More specific info in the "fields" field of B_STAT_CHANGED notification
54a38a92c9SIngo Weinhold // messages, specifying what parts of the stat data have actually been
55a38a92c9SIngo Weinhold // changed. (Haiku only)
56a38a92c9SIngo Weinhold enum {
5749499c17SAxel Dörfler 	FSSH_B_STAT_MODE				= 0x0001,
5849499c17SAxel Dörfler 	FSSH_B_STAT_UID					= 0x0002,
5949499c17SAxel Dörfler 	FSSH_B_STAT_GID					= 0x0004,
6049499c17SAxel Dörfler 	FSSH_B_STAT_SIZE				= 0x0008,
6149499c17SAxel Dörfler 	FSSH_B_STAT_ACCESS_TIME			= 0x0010,
6249499c17SAxel Dörfler 	FSSH_B_STAT_MODIFICATION_TIME	= 0x0020,
6349499c17SAxel Dörfler 	FSSH_B_STAT_CREATION_TIME		= 0x0040,
6449499c17SAxel Dörfler 	FSSH_B_STAT_CHANGE_TIME			= 0x0080,
6549499c17SAxel Dörfler 	FSSH_B_STAT_INTERIM_UPDATE		= 0x1000
66a38a92c9SIngo Weinhold };
67a38a92c9SIngo Weinhold 
68a38a92c9SIngo Weinhold 
69a38a92c9SIngo Weinhold #endif	/* _FSSH_NODE_MONITOR_H */
70