summaryrefslogtreecommitdiff
path: root/source3/librpc/gen_ndr/srv_initshutdown.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-09-15 18:32:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:51:50 -0500
commitc4013df0c18779191d124dcb3ee35499900b54e0 (patch)
tree5565886a7c90e36a73b073b040f967bdb7870d21 /source3/librpc/gen_ndr/srv_initshutdown.c
parent1052e48e87fc1cf0e93ce880fce1820bd842055b (diff)
downloadsamba-c4013df0c18779191d124dcb3ee35499900b54e0.tar.gz
samba-c4013df0c18779191d124dcb3ee35499900b54e0.tar.bz2
samba-c4013df0c18779191d124dcb3ee35499900b54e0.zip
r18560: * Add in the winreg and initshutdown IDL files
* rename PI_SHUTDOWN from include/smb.h to PI_INITSHUTDOWN for compatibility with pidl libndr output (This used to be commit 23a882861311d9d6ca45af1bfcc90d05846ba3a9)
Diffstat (limited to 'source3/librpc/gen_ndr/srv_initshutdown.c')
-rw-r--r--source3/librpc/gen_ndr/srv_initshutdown.c177
1 files changed, 177 insertions, 0 deletions
diff --git a/source3/librpc/gen_ndr/srv_initshutdown.c b/source3/librpc/gen_ndr/srv_initshutdown.c
new file mode 100644
index 0000000000..ba7a20a6d5
--- /dev/null
+++ b/source3/librpc/gen_ndr/srv_initshutdown.c
@@ -0,0 +1,177 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * server auto-generated by pidl. DO NOT MODIFY!
+ */
+
+#include "includes.h"
+#include "librpc/gen_ndr/srv_initshutdown.h"
+
+static BOOL api_initshutdown_Init(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct initshutdown_Init r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_initshutdown_Init");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_initshutdown_Init(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _initshutdown_Init(p, r.in.hostname, r.in.message, r.in.timeout, r.in.force_apps, r.in.reboot);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_initshutdown_Init(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_initshutdown_Abort(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct initshutdown_Abort r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_initshutdown_Abort");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_initshutdown_Abort(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _initshutdown_Abort(p, r.in.server);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_initshutdown_Abort(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_initshutdown_InitEx(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct initshutdown_InitEx r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_initshutdown_InitEx");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_initshutdown_InitEx(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _initshutdown_InitEx(p, r.in.hostname, r.in.message, r.in.timeout, r.in.force_apps, r.in.reboot, r.in.reason);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_initshutdown_InitEx(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+
+/* Tables */
+static struct api_struct api_initshutdown_cmds[] =
+{
+ {"INITSHUTDOWN_INIT", DCERPC_INITSHUTDOWN_INIT, api_initshutdown_Init},
+ {"INITSHUTDOWN_ABORT", DCERPC_INITSHUTDOWN_ABORT, api_initshutdown_Abort},
+ {"INITSHUTDOWN_INITEX", DCERPC_INITSHUTDOWN_INITEX, api_initshutdown_InitEx},
+};
+
+void initshutdown_get_pipe_fns(struct api_struct **fns, int *n_fns)
+{
+ *fns = api_initshutdown_cmds;
+ *n_fns = sizeof(api_initshutdown_cmds) / sizeof(struct api_struct);
+}
+
+NTSTATUS rpc_initshutdown_init(void)
+{
+ return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "initshutdown", "initshutdown", api_initshutdown_cmds, sizeof(api_initshutdown_cmds) / sizeof(struct api_struct));
+}