s3:modules: Update getdate.y to work with newer bison versions
[samba.git] / source3 / rpc_server / rpc_modules.h
1 /*
2  *  Unix SMB/CIFS implementation.
3  *
4  *  SMBD RPC modules
5  *
6  *  Copyright (c) 2015 Ralph Boehme <slow@samba.org>
7  *
8  *  This program is free software; you can redistribute it and/or modify
9  *  it under the terms of the GNU General Public License as published by
10  *  the Free Software Foundation; either version 3 of the License, or
11  *  (at your option) any later version.
12  *
13  *  This program is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  *  GNU General Public License for more details.
17  *
18  *  You should have received a copy of the GNU General Public License
19  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
20  */
21
22 #ifndef _RPC_MODULES_H
23 #define _RPC_MODULES_H
24
25 struct rpc_srv_callbacks;
26
27 struct rpc_module_fns {
28         bool (*setup)(struct tevent_context *ev_ctx, struct messaging_context *msg_ctx);
29         NTSTATUS (*init)(const struct rpc_srv_callbacks *rpc_srv_cb);
30         NTSTATUS (*shutdown)(void);
31 };
32
33 NTSTATUS register_rpc_module(struct rpc_module_fns *fns,
34                              const char *name);
35
36 bool setup_rpc_modules(struct tevent_context *ev_ctx,
37                        struct messaging_context *msg_ctx);
38
39 bool setup_rpc_module(struct tevent_context *ev_ctx,
40                       struct messaging_context *msg_ctx,
41                       const char *name);
42
43 bool init_rpc_module(const char *name,
44                      const struct rpc_srv_callbacks *rpc_srv_cb);
45
46 bool shutdown_rpc_module(const char *name);
47 #endif