2007-01-31 14:48:14 +03:00
#include "idl_types.h"
2011-02-16 02:39:55 +03:00
import "file_id.idl", "server_id.idl";
2011-01-25 04:42:59 +03:00
2007-01-31 14:48:14 +03:00
/*
IDL structures for notify change code
this defines the structures used in the notify database code, and
the change notify buffers
*/
[
pointer_default(unique)
]
interface notify
{
/* structure used in the notify database */
typedef [public] struct {
server_id server;
uint32 filter; /* filter to apply in this directory */
uint32 subdir_filter; /* filter to apply in child directories */
2009-02-21 00:23:53 +03:00
uint32 dir_fd; /* fd of open directory */
file_id dir_id; /* file_id of open directory */
2007-01-31 14:48:14 +03:00
utf8string path;
uint32 path_len; /* saves some computation on search */
pointer private_data;
} notify_entry;
2009-04-14 22:39:14 +04:00
typedef [public] struct {
uint32 num_entries;
notify_entry entries[num_entries];
} notify_entry_array;
2012-04-04 16:51:43 +04:00
typedef [public] struct {
server_id server;
uint32 filter; /* filter to apply in this directory */
uint32 subdir_filter; /* filter to apply in child directories */
pointer private_data;
} notify_db_entry;
2007-01-31 14:48:14 +03:00
/*
to allow for efficient search for matching entries, we
divide them by the directory depth, with a separate array
per depth. The entries within each depth are sorted by path,
allowing for a bisection search.
The max_mask and max_mask_subdir at each depth is the
bitwise or of the filters and subdir filters for all entries
at that depth. This allows a depth to be quickly skipped if
2011-05-02 05:10:12 +04:00
no entries will match the target filter
2007-01-31 14:48:14 +03:00
*/
typedef struct {
uint32 max_mask;
uint32 max_mask_subdir;
uint32 num_entries;
notify_entry entries[num_entries];
} notify_depth;
typedef [public] struct {
uint32 num_depths;
notify_depth depth[num_depths];
} notify_array;
/* structure sent between servers in notify messages */
typedef [public] struct {
uint32 action;
2014-11-05 14:44:42 +03:00
utf8string dir;
2007-01-31 14:48:14 +03:00
utf8string path;
pointer private_data;
} notify_event;
2012-04-04 16:51:43 +04:00
typedef [public] struct {
uint32 action;
uint32 filter;
utf8string path;
} notify_remote_event;
2010-07-07 03:50:18 +04:00
typedef [v1_enum] enum {
FILE_ACTION_ADDED = 0x00000001,
FILE_ACTION_REMOVED = 0x00000002,
FILE_ACTION_MODIFIED = 0x00000003,
FILE_ACTION_RENAMED_OLD_NAME = 0x00000004,
FILE_ACTION_RENAMED_NEW_NAME = 0x00000005,
FILE_ACTION_ADDED_STREAM = 0x00000006,
FILE_ACTION_REMOVED_STREAM = 0x00000007,
FILE_ACTION_MODIFIED_STREAM = 0x00000008
} FILE_NOTIFY_ACTION;
/* structure sent at the CIFS layer */
/* Align on 4-byte boundary according to MS-CIFS 2.2.7.4.2 */
typedef [public,gensize,flag(NDR_ALIGN4)] struct {
uint32 NextEntryOffset;
FILE_NOTIFY_ACTION Action;
[value(strlen_m(FileName1)*2)] uint32 FileNameLength;
2015-10-17 01:13:47 +03:00
[charset(UTF16),flag(STR_NOTERM)]
uint16 FileName1[strlen_m(FileName1)];
DATA_BLOB _pad;
2010-07-07 03:50:18 +04:00
} FILE_NOTIFY_INFORMATION;
2007-01-31 14:48:14 +03:00
}