# released under the GNU GPL
package Parse::Pidl::Samba4::Header;
-
require Exporter;
@ISA = qw(Exporter);
$res = "";
%headerstructs = ();
pidl "/* header auto-generated by pidl */\n\n";
+
+ my $ifacename = "";
+
+ # work out a unique interface name
+ foreach (@{$ndr}) {
+ if ($_->{TYPE} eq "INTERFACE") {
+ $ifacename = $_->{NAME};
+ last;
+ }
+ }
+
+ pidl "#ifndef _PIDL_HEADER_$ifacename\n";
+ pidl "#define _PIDL_HEADER_$ifacename\n\n";
+
if (!is_intree()) {
pidl "#include <util/data_blob.h>\n";
}
($_->{TYPE} eq "INCLUDE") && HeaderInclude(@{$_->{PATHS}});
}
+ pidl "#endif /* _PIDL_HEADER_$ifacename */\n";
+
return $res;
}