From ecf0dd6bafaa95692c3ece94b6f71446cd54ebdc Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 16 Mar 2006 20:02:31 +0000 Subject: r14488: Install more headers. Generate different #include lines in pidl depending on whether we're building inside or outside of the Samba tree (useful for 3rd-party projects). (This used to be commit 0c188833154c1fe565cb1735909e408a4a1a6049) --- source4/pidl/lib/Parse/Pidl/Samba4/COM/Header.pm | 17 ++++++++++------- source4/pidl/lib/Parse/Pidl/Samba4/COM/Proxy.pm | 18 +++++++++++------- 2 files changed, 21 insertions(+), 14 deletions(-) (limited to 'source4/pidl/lib/Parse/Pidl/Samba4/COM') diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/COM/Header.pm b/source4/pidl/lib/Parse/Pidl/Samba4/COM/Header.pm index 83df9afe88..85dab37246 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba4/COM/Header.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba4/COM/Header.pm @@ -117,19 +117,22 @@ sub ParseCoClass($) return $res; } -sub Parse($) +sub Parse($$) { - my $idl = shift; + my ($idl,$ndr_header) = @_; my $res = ""; - foreach my $x (@{$idl}) + $res .= "#include \"librpc/gen_ndr/orpc.h\"\n" . + "#include \"$ndr_header\"\n\n"; + + foreach (@{$idl}) { - if ($x->{TYPE} eq "INTERFACE" && has_property($x, "object")) { - $res.=ParseInterface($x); + if ($_->{TYPE} eq "INTERFACE" && has_property($_, "object")) { + $res.=ParseInterface($_); } - if ($x->{TYPE} eq "COCLASS") { - $res.=ParseCoClass($x); + if ($_->{TYPE} eq "COCLASS") { + $res.=ParseCoClass($_); } } diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/COM/Proxy.pm b/source4/pidl/lib/Parse/Pidl/Samba4/COM/Proxy.pm index c0d460fe09..e6366f0f3d 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba4/COM/Proxy.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba4/COM/Proxy.pm @@ -196,17 +196,21 @@ sub RegistrationFunction($$) return $res; } -sub Parse($) +sub Parse($$) { - my $pidl = shift; + my ($pidl,$comh_filename) = @_; my $res = ""; - foreach my $x (@{$pidl}) { - next if ($x->{TYPE} ne "INTERFACE"); - next if has_property($x, "local"); - next unless has_property($x, "object"); + $res .= "#include \"includes.h\"\n" . + "#include \"lib/com/dcom/dcom.h\"\n" . + "#include \"$comh_filename\"\n"; - $res .= ParseInterface($x); + foreach (@{$pidl}) { + next if ($_->{TYPE} ne "INTERFACE"); + next if has_property($_, "local"); + next unless has_property($_, "object"); + + $res .= ParseInterface($_); } return $res; -- cgit