summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2010-07-16 14:52:42 +0200
committerAndreas Schneider <asn@samba.org>2010-07-19 12:59:18 +0200
commit5cefbfef26bf2d5f470f1d8c52d75e9756c0f738 (patch)
treee68e42882b0dd51a29240ff936097ff0e6a54981 /source3/include
parentb91e5cf17d09e4e8bf73e78b96f69831a7cb0d0b (diff)
downloadsamba-5cefbfef26bf2d5f470f1d8c52d75e9756c0f738.tar.gz
samba-5cefbfef26bf2d5f470f1d8c52d75e9756c0f738.tar.bz2
samba-5cefbfef26bf2d5f470f1d8c52d75e9756c0f738.zip
s3-rpc_server: Added callbacks for init and shutdown of a rpc service.
This adds two callback function for each rpc service. One is for initialisation and the other for shutdown. rpc_<service>_unregister() needs to be called to execute the shutdown function.
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/proto.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index a5b98cdc4d..d9f9ab96d4 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5047,6 +5047,22 @@ void *_policy_handle_find(struct pipes_struct *p,
(_access_granted), #_type, __location__, (_pstatus))
+/* The following definitions come from rpc_server/srv_rpc_register.c */
+
+struct rpc_srv_callbacks {
+ bool (*init)(void *private_data);
+ bool (*shutdown)(void *private_data);
+ void *private_data;
+};
+
+NTSTATUS rpc_srv_register(int version, const char *clnt,
+ const char *srv,
+ const struct ndr_interface_table *iface,
+ const struct api_struct *cmds, int size,
+ const struct rpc_srv_callbacks *rpc_srv_cb);
+
+NTSTATUS rpc_srv_unregister(const struct ndr_interface_table *iface);
+
/* The following definitions come from rpc_server/srv_pipe.c */
bool create_next_pdu(pipes_struct *p);
@@ -5056,10 +5072,6 @@ NTSTATUS rpc_pipe_register_commands(int version, const char *clnt,
const char *srv,
const struct ndr_syntax_id *interface,
const struct api_struct *cmds, int size);
-NTSTATUS rpc_srv_register(int version, const char *clnt,
- const char *srv,
- const struct ndr_interface_table *iface,
- const struct api_struct *cmds, int size);
bool is_known_pipename(const char *cli_filename, struct ndr_syntax_id *syntax);
bool api_pipe_bind_req(pipes_struct *p, struct ncacn_packet *pkt);
bool api_pipe_alter_context(pipes_struct *p, struct ncacn_packet *pkt);