summaryrefslogtreecommitdiffstats
path: root/source3/librpc/idl/leases_db.idl
blob: 2551dfc2ba06d2420c0d783350a1fe9c4e4eac4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#include "idl_types.h"

import "misc.idl";
import "smb2_lease_struct.idl";
import "file_id.idl";

[
	pointer_default(unique)
]
interface leases_db
{
	typedef [public] struct {
		GUID client_guid;
		smb2_lease_key lease_key;
	} leases_db_key;

	typedef [public] struct {
		file_id id;
		[string,charset(UTF8)] char *servicepath;
		[string,charset(UTF8)] char *base_name;
		[string,charset(UTF8)] char *stream_name;
	} leases_db_file;

	typedef [public] struct {
		smb2_lease_state	current_state;
		/*
		 * 'breaking' indicates that we're waiting
		 * for a lease break ack from the client
		 * and breaking_to_requested and breaking_to_required
		 * have a meaning.
		 *
		 * breaking_to_requested is the value already sent to
		 * the client, the client needs to ack to this (or less).
		 *
		 * breaking_to_required is the internal value that needs to
		 * be reached before we can reset breaking = false, this
		 * may requires multiple roundtrips to the client, e.g.
		 * when the lease broken to a more reduced value, while
		 * the lease break is still in progress.
		 *
		 * The following can be assumed (if breaking == true):
		 *
		 * current_state>breaking_to_requested>=breaking_to_required
		 */
		boolean8		breaking;
		smb2_lease_state	breaking_to_requested;
		smb2_lease_state	breaking_to_required;
		uint16			lease_version;
		uint16			epoch;

		uint32 num_files;
		leases_db_file files[num_files];
	} leases_db_value;
}