use Parse::Pidl qw(fatal warning error);
use Parse::Pidl::Util qw(has_property ParseExpr);
+use Parse::Pidl::NDR qw(ContainsPipe);
use Parse::Pidl::Typelist qw(mapTypeName);
use Parse::Pidl::Samba4 qw(choose_header is_intree DeclLong);
use Parse::Pidl::Samba4::Header qw(GenerateFunctionInEnv GenerateFunctionOutEnv);
bless($self, $class);
}
+sub ParseFunctionHasPipes($$)
+{
+ my ($self, $fn) = @_;
+
+ foreach my $e (@{$fn->{ELEMENTS}}) {
+ return 1 if ContainsPipe($e, $e->{LEVELS}[0]);
+ }
+
+ return 0;
+}
+
sub ParseFunction_r_State($$$$)
{
my ($self, $if, $fn, $name) = @_;
my ($self, $if, $fn, $name) = @_;
my $uname = uc $name;
+ if ($self->ParseFunctionHasPipes($fn)) {
+ $self->pidl_both("/*");
+ $self->pidl_both(" * The following function is skipped because");
+ $self->pidl_both(" * it uses pipes:");
+ $self->pidl_both(" *");
+ $self->pidl_both(" * dcerpc_$name\_r()");
+ $self->pidl_both(" */");
+ $self->pidl_both("");
+ return;
+ }
+
my $proto = "NTSTATUS dcerpc_$name\_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct $name *r)";
$self->fn_declare($proto);
{
my ($self, $if, $fn, $name) = @_;
+ if ($self->ParseFunctionHasPipes($fn)) {
+ $self->pidl_both("/*");
+ $self->pidl_both(" * The following function is skipped because");
+ $self->pidl_both(" * it uses pipes:");
+ $self->pidl_both(" *");
+ $self->pidl_both(" * dcerpc_$name()");
+ $self->pidl_both(" */");
+ $self->pidl_both("");
+ return;
+ }
+
my $uname = uc $name;
my $fn_args = "";
my $fn_str = "NTSTATUS dcerpc_$name";