summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse/Pidl/Samba4/NDR
diff options
context:
space:
mode:
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/Samba4/NDR')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm65
1 files changed, 2 insertions, 63 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
index 8eb2f9ad15..0800a19fab 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
@@ -9,7 +9,7 @@ package Parse::Pidl::Samba4::NDR::Parser;
require Exporter;
@ISA = qw(Exporter);
-@EXPORT_OK = qw(check_null_pointer GenerateFunctionInEnv GenerateFunctionOutEnv EnvSubstituteValue GenerateStructEnv NeededFunction NeededElement NeededType $res NeededInterface TypeFunctionName ParseElementPrint);
+@EXPORT_OK = qw(check_null_pointer NeededFunction NeededElement NeededType $res NeededInterface TypeFunctionName ParseElementPrint);
use strict;
use Parse::Pidl::Typelist qw(hasType getType mapTypeName typeHasBody);
@@ -17,6 +17,7 @@ use Parse::Pidl::Util qw(has_property ParseExpr ParseExprExt print_uuid);
use Parse::Pidl::CUtil qw(get_pointer_to get_value_of);
use Parse::Pidl::NDR qw(GetPrevLevel GetNextLevel ContainsDeferred);
use Parse::Pidl::Samba4 qw(is_intree choose_header);
+use Parse::Pidl::Samba4::Header qw(GenerateFunctionInEnv GenerateFunctionOutEnv EnvSubstituteValue GenerateStructEnv);
use Parse::Pidl qw(warning);
use vars qw($VERSION);
@@ -193,68 +194,6 @@ sub end_flags($$)
}
}
-sub GenerateStructEnv($$)
-{
- my ($x, $v) = @_;
- my %env;
-
- foreach my $e (@{$x->{ELEMENTS}}) {
- $env{$e->{NAME}} = "$v->$e->{NAME}";
- }
-
- $env{"this"} = $v;
-
- return \%env;
-}
-
-sub EnvSubstituteValue($$)
-{
- my ($env,$s) = @_;
-
- # Substitute the value() values in the env
- foreach my $e (@{$s->{ELEMENTS}}) {
- next unless (defined(my $v = has_property($e, "value")));
-
- $env->{$e->{NAME}} = ParseExpr($v, $env, $e);
- }
-
- return $env;
-}
-
-sub GenerateFunctionInEnv($;$)
-{
- my ($fn, $base) = @_;
- my %env;
-
- $base = "r->" unless defined($base);
-
- foreach my $e (@{$fn->{ELEMENTS}}) {
- if (grep (/in/, @{$e->{DIRECTION}})) {
- $env{$e->{NAME}} = $base."in.$e->{NAME}";
- }
- }
-
- return \%env;
-}
-
-sub GenerateFunctionOutEnv($;$)
-{
- my ($fn, $base) = @_;
- my %env;
-
- $base = "r->" unless defined($base);
-
- foreach my $e (@{$fn->{ELEMENTS}}) {
- if (grep (/out/, @{$e->{DIRECTION}})) {
- $env{$e->{NAME}} = $base."out.$e->{NAME}";
- } elsif (grep (/in/, @{$e->{DIRECTION}})) {
- $env{$e->{NAME}} = $base."in.$e->{NAME}";
- }
- }
-
- return \%env;
-}
-
#####################################################################
# parse the data of an array - push side
sub ParseArrayPushHeader($$$$$$)