summaryrefslogtreecommitdiff
path: root/source4/build/pidl/proxy.pm
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-11-18 20:53:23 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:58 -0500
commita0fa682faa309bda812008ea3a084cf54f65310b (patch)
tree5841de49e8c7c212a9ac97cd82c06e7b4d9591c3 /source4/build/pidl/proxy.pm
parentbe01250d1a5ef9611164e5ca741e07255f770b4d (diff)
downloadsamba-a0fa682faa309bda812008ea3a084cf54f65310b.tar.gz
samba-a0fa682faa309bda812008ea3a084cf54f65310b.tar.bz2
samba-a0fa682faa309bda812008ea3a084cf54f65310b.zip
r3861: - Put ndr and rpc client code in seperate files
- Add some const (This used to be commit a00bda88e1b6abdc36e5aa8c2a35f64855f67c96)
Diffstat (limited to 'source4/build/pidl/proxy.pm')
-rw-r--r--source4/build/pidl/proxy.pm36
1 files changed, 32 insertions, 4 deletions
diff --git a/source4/build/pidl/proxy.pm b/source4/build/pidl/proxy.pm
index f8991ce9fe..bf3990da47 100644
--- a/source4/build/pidl/proxy.pm
+++ b/source4/build/pidl/proxy.pm
@@ -105,10 +105,7 @@ static struct rpc_request *dcom_proxy_$interface->{NAME}_$name\_send(struct dcom
NDR_PRINT_IN_DEBUG($name, r);
}
- return dcerpc_ndr_request_send(p, &d->ipid, DCERPC_$uname, mem_ctx,
- (ndr_push_flags_fn_t) ndr_push_$name,
- (ndr_pull_flags_fn_t) ndr_pull_$name,
- r, sizeof(*r));
+ return dcerpc_ndr_request_table_send(p, &d->ipid, &dcerpc_table_$interface->{NAME}, DCERPC_$uname, mem_ctx, r);
}
static NTSTATUS dcom_proxy_$interface->{NAME}_$name(struct dcom_interface_p *d, TALLOC_CTX *mem_ctx, struct $name *r)
@@ -163,4 +160,35 @@ sub ParseInterface($)
ParseRegFunc($interface);
}
+sub RegistrationFunction($$)
+{
+ my $idl = shift;
+ my $basename = shift;
+
+ my $res = "NTSTATUS dcom_$basename\_init(void)\n";
+ $res .= "{\n";
+ $res .="\tNTSTATUS status = NT_STATUS_OK;\n";
+ foreach my $interface (@{$idl}) {
+ next if $interface->{TYPE} ne "INTERFACE";
+ next if not util::has_property($interface, "object");
+
+ my $data = $interface->{INHERITED_DATA};
+ my $count = 0;
+ foreach my $d (@{$data}) {
+ if ($d->{TYPE} eq "FUNCTION") { $count++; }
+ }
+
+ next if ($count == 0);
+
+ $res .= "\tstatus = dcom_$interface->{NAME}_init();\n";
+ $res .= "\tif (NT_STATUS_IS_ERR(status)) {\n";
+ $res .= "\t\treturn status;\n";
+ $res .= "\t}\n\n";
+ }
+ $res .= "\treturn status;\n";
+ $res .= "}\n\n";
+
+ return $res;
+}
+
1;