1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/source3/librpc/idl/notify.idl
Volker Lendecke 32a36e4703 Add notify_onelevel.tdb
This optimizes non-recursive notifys. For non-recursive notifies we can use a
per-directory file-id indexed notify record. This matters for the Windows
Explorer and IIS cases which do not use recursive notifies. In these cases, we
do not have to shuffle around the whole notify record on every change.

For the cluster case, this improves correctness of the notifies, ctdb only
distributes the tdb seqnum once a second, so we can lose notifies.
2009-04-16 15:07:06 +02:00

64 lines
1.6 KiB
Plaintext

#include "idl_types.h"
/*
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 */
uint32 dir_fd; /* fd of open directory */
file_id dir_id; /* file_id of open directory */
utf8string path;
uint32 path_len; /* saves some computation on search */
pointer private_data;
} notify_entry;
typedef [public] struct {
uint32 num_entries;
notify_entry entries[num_entries];
} notify_entry_array;
/*
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
no entries will match the target filter
*/
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;
utf8string path;
pointer private_data;
} notify_event;
}