summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse/Pidl/Samba3/Util.pm
blob: 2d4179df76376e77c8c948290f863f5f51876b69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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;