From 9cea63d757f9f9f9d409dec2e4b2627dbe01f006 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 5 Aug 2005 01:23:35 +0000 Subject: r9092: Generate some more stub functions. (This used to be commit 301dd7b78b78a4036a8dbf40c12171c0de50974f) --- source4/script/build_smb_interfaces.pl | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'source4/script') diff --git a/source4/script/build_smb_interfaces.pl b/source4/script/build_smb_interfaces.pl index cc942ea3d3..a3a4164d4f 100755 --- a/source4/script/build_smb_interfaces.pl +++ b/source4/script/build_smb_interfaces.pl @@ -87,12 +87,40 @@ open(FILE, ">ejs_${basename}.c"); print FILE "/* EJS wrapper functions auto-generated by build_smb_interfaces.pl */\n\n"; -# Top level functions +# Top level push/pull functions foreach my $x (@{$header}) { + next, if $x->{STRUCT_NAME} eq ""; + + print FILE "static NTSTATUS ejs_pull_$x->{STRUCT_NAME}(struct ejs_rpc *ejs, struct MprVar *v, struct $x->{STRUCT_NAME} *r)\n"; + print FILE "{\n"; + print FILE "\tNDR_CHECK(ejs_pull_struct_start(ejs, &v, \"input\"));\n"; + print FILE "\treturn NT_STATUS_OK;\n"; + print FILE "}\n\n"; + + print FILE "static NTSTATUS ejs_push_$x->{STRUCT_NAME}(struct ejs_rpc *ejs, struct MprVar *v, const struct $x->{STRUCT_NAME} *r)\n\n"; + print FILE "{\n"; + print FILE "\tNDR_CHECK(ejs_push_struct_start(ejs, &v, \"output\"));\n"; + + print FILE "\treturn NT_STATUS_OK;\n"; + print FILE "}\n\n"; +} + +# Top level call functions + +foreach my $x (@{$header}) { + next, if $x->{STRUCT_NAME} eq ""; + + $raw_name = $x->{STRUCT_NAME}; + $raw_name =~ s/smb_/smb_raw_/; + print FILE "static int ejs_$x->{STRUCT_NAME}(int eid, int argc, struct MprVar **argv)\n"; print FILE "{\n"; + print FILE "\tstruct $x->{STRUCT_NAME} parms;\n\n"; + + print FILE "\t$raw_name(tree, ¶ms);\n"; + print FILE "\tejsSetErrorMsg(eid, \"Not implemented\");\n"; print FILE "\treturn -1;\n"; print FILE "}\n\n"; -- cgit