summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2005-08-05 01:23:35 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:31:16 -0500
commit9cea63d757f9f9f9d409dec2e4b2627dbe01f006 (patch)
tree45b572b5ff890cd55af8634b9c589fb0d68f7911
parent6f6e42c8565c63c637bc9b5a73aa08bf3a48550a (diff)
downloadsamba-9cea63d757f9f9f9d409dec2e4b2627dbe01f006.tar.gz
samba-9cea63d757f9f9f9d409dec2e4b2627dbe01f006.tar.bz2
samba-9cea63d757f9f9f9d409dec2e4b2627dbe01f006.zip
r9092: Generate some more stub functions.
(This used to be commit 301dd7b78b78a4036a8dbf40c12171c0de50974f)
-rwxr-xr-xsource4/script/build_smb_interfaces.pl30
1 files changed, 29 insertions, 1 deletions
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, &params);\n";
+
print FILE "\tejsSetErrorMsg(eid, \"Not implemented\");\n";
print FILE "\treturn -1;\n";
print FILE "}\n\n";