summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-03-26 15:42:43 +1100
committerAndrew Bartlett <abartlet@samba.org>2008-03-26 15:42:43 +1100
commit4bb658d5c8c8461169c827194139e599944a81ed (patch)
treee7d2ee616dd185b7498accdf10281c3ea47cdb46 /source4
parentd5a71ed633ab9086f56a9bf0812044d0cfa9df96 (diff)
parent07251792d4e020217ba23896dc65702853f31939 (diff)
downloadsamba-4bb658d5c8c8461169c827194139e599944a81ed.tar.gz
samba-4bb658d5c8c8461169c827194139e599944a81ed.tar.bz2
samba-4bb658d5c8c8461169c827194139e599944a81ed.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-local
(This used to be commit e1095673089d12e11a4e17a8d6c5b756cc9f427b)
Diffstat (limited to 'source4')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm34
1 files changed, 33 insertions, 1 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm b/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
index 86b8951026..7a2575b897 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
@@ -44,6 +44,36 @@ sub new($)
bless($self, $class);
}
+sub ElementDirection($)
+{
+ my ($e) = @_;
+
+ return "[in,out]" if (has_property($e, "in") and has_property($e, "out"));
+ return "[in]" if (has_property($e, "in"));
+ return "[out]" if (has_property($e, "out"));
+ return "[in,out]";
+}
+
+sub HeaderProperties($$)
+{
+ my($props,$ignores) = @_;
+ my $ret = "";
+
+ foreach my $d (keys %{$props}) {
+ next if (grep(/^$d$/, @$ignores));
+ if($props->{$d} ne "1") {
+ $ret.= "$d($props->{$d}),";
+ } else {
+ $ret.="$d,";
+ }
+ }
+
+ if ($ret) {
+ return "[" . substr($ret, 0, -1) . "]";
+ }
+}
+
+
sub ParseFunction($$$)
{
my ($self, $if, $fn) = @_;
@@ -57,7 +87,9 @@ sub ParseFunction($$$)
$fn_args .= "struct rpc_pipe_client *cli,\n" . $pad . "TALLOC_CTX *mem_ctx";
foreach (@{$fn->{ELEMENTS}}) {
- $fn_args .= ",\n" . $pad . DeclLong($_);
+ my $dir = ElementDirection($_);
+ my $prop = HeaderProperties($_->{PROPERTIES}, ["in", "out"]);
+ $fn_args .= ",\n" . $pad . DeclLong($_) . " /* $dir $prop */";
}
if (defined($fn->{RETURN_TYPE}) && ($fn->{RETURN_TYPE} eq "WERROR")) {