r9092: Generate some more stub functions.
authorTim Potter <tpot@samba.org>
Fri, 5 Aug 2005 01:23:35 +0000 (01:23 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:31:16 +0000 (13:31 -0500)
source/script/build_smb_interfaces.pl

index cc942ea3d30f2add5960ad5c8a0920b4c2f3b4a4..a3a4164d4fcc2a0b33ba89b7b846dae587344619 100755 (executable)
@@ -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";