2
Unix SMB/CIFS implementation.
4
Copyright (C) Stefan Metzmacher 2008
6
This program is free software; you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation; either version 3 of the License, or
9
(at your option) any later version.
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
16
You should have received a copy of the GNU General Public License
17
along with this program. If not, see <http://www.gnu.org/licenses/>.
20
#include "param/share.h"
22
struct sys_lease_context;
24
struct messaging_context;
25
struct tevent_context;
27
typedef NTSTATUS (*sys_lease_send_break_fn)(struct messaging_context *,
28
struct opendb_entry *,
31
struct sys_lease_ops {
33
NTSTATUS (*init)(struct sys_lease_context *ctx);
34
NTSTATUS (*setup)(struct sys_lease_context *ctx,
35
struct opendb_entry *e);
36
NTSTATUS (*update)(struct sys_lease_context *ctx,
37
struct opendb_entry *e);
38
NTSTATUS (*remove)(struct sys_lease_context *ctx,
39
struct opendb_entry *e);
42
struct sys_lease_context {
43
struct tevent_context *event_ctx;
44
struct messaging_context *msg_ctx;
45
sys_lease_send_break_fn break_send;
46
void *private_data; /* for use of backend */
47
const struct sys_lease_ops *ops;
50
NTSTATUS sys_lease_register(const struct sys_lease_ops *ops);
51
NTSTATUS sys_lease_init(void);
53
struct sys_lease_context *sys_lease_context_create(struct share_config *scfg,
55
struct tevent_context *ev,
56
struct messaging_context *msg_ctx,
57
sys_lease_send_break_fn break_send);
59
NTSTATUS sys_lease_setup(struct sys_lease_context *ctx,
60
struct opendb_entry *e);
62
NTSTATUS sys_lease_update(struct sys_lease_context *ctx,
63
struct opendb_entry *e);
65
NTSTATUS sys_lease_remove(struct sys_lease_context *ctx,
66
struct opendb_entry *e);