summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse/Pidl/Samba3/Util.pm
diff options
context:
space:
mode:
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/Samba3/Util.pm')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba3/Util.pm29
1 files changed, 29 insertions, 0 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba3/Util.pm b/source4/pidl/lib/Parse/Pidl/Samba3/Util.pm
new file mode 100644
index 0000000000..2d4179df76
--- /dev/null
+++ b/source4/pidl/lib/Parse/Pidl/Samba3/Util.pm
@@ -0,0 +1,29 @@
+###################################################
+# Samba3 common helper functions
+# Copyright jelmer@samba.org 2005
+# released under the GNU GPL
+
+package Parse::Pidl::Samba3::Util;
+
+require Exporter;
+@ISA = qw(Exporter);
+@EXPORT_OK = qw(MapSamba3Type);
+
+use strict;
+use Parse::Pidl::Typelist qw(hasType getType mapType);
+use Parse::Pidl::Util qw(has_property ParseExpr);
+use Parse::Pidl::NDR qw(GetPrevLevel GetNextLevel ContainsDeferred);
+
+use vars qw($VERSION);
+$VERSION = '0.01';
+
+sub MapSamba3Type($)
+{
+ my $e = shift;
+
+ return "UNISTR2 $e->{NAME}" if ($e->{TYPE} eq "string");
+
+ return "$e->{TYPE} $e->{NAME}";
+}
+
+1;