leases_db: Add share_mode_lease info to leases.tdb
[rusty/samba-autobuild/.git] / source3 / librpc / idl / leases_db.idl
1 #include "idl_types.h"
2
3 import "misc.idl";
4 import "smb2_lease_struct.idl";
5 import "file_id.idl";
6
7 [
8         pointer_default(unique)
9 ]
10 interface leases_db
11 {
12         typedef [public] struct {
13                 GUID client_guid;
14                 smb2_lease_key lease_key;
15         } leases_db_key;
16
17         typedef [public] struct {
18                 file_id id;
19                 [string,charset(UTF8)] char *servicepath;
20                 [string,charset(UTF8)] char *base_name;
21                 [string,charset(UTF8)] char *stream_name;
22         } leases_db_file;
23
24         typedef [public] struct {
25                 smb2_lease_state        current_state;
26                 /*
27                  * 'breaking' indicates that we're waiting
28                  * for a lease break ack from the client
29                  * and breaking_to_requested and breaking_to_required
30                  * have a meaning.
31                  *
32                  * breaking_to_requested is the value already sent to
33                  * the client, the client needs to ack to this (or less).
34                  *
35                  * breaking_to_required is the internal value that needs to
36                  * be reached before we can reset breaking = false, this
37                  * may requires multiple roundtrips to the client, e.g.
38                  * when the lease broken to a more reduced value, while
39                  * the lease break is still in progress.
40                  *
41                  * The following can be assumed (if breaking == true):
42                  *
43                  * current_state>breaking_to_requested>=breaking_to_required
44                  */
45                 boolean8                breaking;
46                 smb2_lease_state        breaking_to_requested;
47                 smb2_lease_state        breaking_to_required;
48                 uint16                  lease_version;
49                 uint16                  epoch;
50
51                 uint32 num_files;
52                 [size_is(num_files)] leases_db_file files[];
53         } leases_db_value;
54 }