1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00

r12463: Rename 'Samba' namespace to 'Samba4'

This commit is contained in:
Jelmer Vernooij 2005-12-24 22:11:44 +00:00 committed by Gerald (Jerry) Carter
parent 0c225d2978
commit f25358270d
15 changed files with 51 additions and 47 deletions

View File

@ -1,7 +1,7 @@
# COM Header generation
# (C) 2005 Jelmer Vernooij <jelmer@samba.org>
package Parse::Pidl::Samba::COM::Header;
package Parse::Pidl::Samba4::COM::Header;
use Parse::Pidl::Typelist;
use Parse::Pidl::Util qw(has_property);

View File

@ -4,9 +4,9 @@
# Copyright jelmer@samba.org 2003-2005
# released under the GNU GPL
package Parse::Pidl::Samba::COM::Proxy;
package Parse::Pidl::Samba4::COM::Proxy;
use Parse::Pidl::Samba::COM::Header;
use Parse::Pidl::Samba4::COM::Header;
use Parse::Pidl::Util qw(has_property);
use vars qw($VERSION);
@ -89,7 +89,7 @@ sub ParseFunction($$)
my $uname = uc $name;
$res.="
static $fn->{RETURN_TYPE} dcom_proxy_$interface->{NAME}_$name(struct $interface->{NAME} *d, TALLOC_CTX *mem_ctx" . Parse::Pidl::Samba::COM::Header::GetArgumentProtoList($fn) . ")
static $fn->{RETURN_TYPE} dcom_proxy_$interface->{NAME}_$name(struct $interface->{NAME} *d, TALLOC_CTX *mem_ctx" . Parse::Pidl::Samba4::COM::Header::GetArgumentProtoList($fn) . ")
{
struct dcerpc_pipe *p;
NTSTATUS status = dcom_get_pipe(d, &p);

View File

@ -5,7 +5,7 @@
# Copyright metze@samba.org 2004
# released under the GNU GPL
package Parse::Pidl::Samba::COM::Stub;
package Parse::Pidl::Samba4::COM::Stub;
use Parse::Pidl::Util qw(has_property);
use strict;

View File

@ -4,7 +4,7 @@
# Copyright Andrew Tridgell 2005
# released under the GNU GPL
package Parse::Pidl::Samba::EJS;
package Parse::Pidl::Samba4::EJS;
use strict;
use Parse::Pidl::Typelist;

View File

@ -3,7 +3,7 @@
# Copyright tridge@samba.org 2005
# released under the GNU GPL
package Parse::Pidl::Samba::EJSHeader;
package Parse::Pidl::Samba4::EJSHeader;
use strict;
use Parse::Pidl::Typelist;

View File

@ -4,7 +4,7 @@
# Copyright jelmer@samba.org 2005
# released under the GNU GPL
package Parse::Pidl::Samba::Header;
package Parse::Pidl::Samba4::Header;
use strict;
use Parse::Pidl::Typelist qw(mapType);

View File

@ -3,7 +3,7 @@
# Copyright tridge@samba.org 2003
# released under the GNU GPL
package Parse::Pidl::Samba::NDR::Client;
package Parse::Pidl::Samba4::NDR::Client;
use vars qw($VERSION);
$VERSION = '0.01';

View File

@ -4,13 +4,13 @@
# Copyright jelmer@samba.org 2005
# released under the GNU GPL
package Parse::Pidl::Samba::NDR::Header;
package Parse::Pidl::Samba4::NDR::Header;
use strict;
use Parse::Pidl::Typelist qw(mapType);
use Parse::Pidl::Util qw(has_property is_constant);
use Parse::Pidl::NDR qw(GetNextLevel GetPrevLevel);
use Parse::Pidl::Samba::NDR::Parser;
use Parse::Pidl::Samba4::NDR::Parser;
use vars qw($VERSION);
$VERSION = '0.01';
@ -36,7 +36,7 @@ sub HeaderTypedefProto($)
{
my($d) = shift;
my $tf = Parse::Pidl::Samba::NDR::Parser::get_typefamily($d->{DATA}{TYPE});
my $tf = Parse::Pidl::Samba4::NDR::Parser::get_typefamily($d->{DATA}{TYPE});
if (has_property($d, "gensize")) {
my $size_args = $tf->{SIZE_FN_ARGS}->($d);

View File

@ -5,7 +5,7 @@
# Copyright jelmer@samba.org 2004-2005
# released under the GNU GPL
package Parse::Pidl::Samba::NDR::Parser;
package Parse::Pidl::Samba4::NDR::Parser;
use strict;
use Parse::Pidl::Typelist qw(hasType getType mapType);

View File

@ -4,7 +4,7 @@
# Copyright metze@samba.org 2004
# released under the GNU GPL
package Parse::Pidl::Samba::NDR::Server;
package Parse::Pidl::Samba4::NDR::Server;
use strict;

View File

@ -3,7 +3,7 @@
# Copyright tpot@samba.org 2004,2005
# released under the GNU GPL
package Parse::Pidl::Samba::SWIG;
package Parse::Pidl::Samba4::SWIG;
use vars qw($VERSION);
$VERSION = '0.01';

View File

@ -3,7 +3,7 @@
# Copyright jelmer@samba.org 2005
# released under the GNU GPL
package Parse::Pidl::Samba::TDR;
package Parse::Pidl::Samba4::TDR;
use Parse::Pidl::Util qw(has_property ParseExpr is_constant);
use vars qw($VERSION);

View File

@ -3,7 +3,7 @@
# Copyright tridge@samba.org 2003
# released under the GNU GPL
package Parse::Pidl::Samba::Template;
package Parse::Pidl::Samba4::Template;
use vars qw($VERSION);
$VERSION = '0.01';

View File

@ -616,8 +616,8 @@ sub process_file($)
}
if (defined($opt_com_header)) {
require Parse::Pidl::Samba::COM::Header;
my $res = Parse::Pidl::Samba::COM::Header::Parse($pidl);
require Parse::Pidl::Samba4::COM::Header;
my $res = Parse::Pidl::Samba4::COM::Header::Parse($pidl);
if ($res) {
my $comh_filename = ($opt_com_header or "$outputdir/com_$basename.h");
FileSave($comh_filename,
@ -628,8 +628,8 @@ sub process_file($)
}
if (defined($opt_dcom_proxy)) {
require Parse::Pidl::Samba::COM::Proxy;
my $res = Parse::Pidl::Samba::COM::Proxy::Parse($pidl);
require Parse::Pidl::Samba4::COM::Proxy;
my $res = Parse::Pidl::Samba4::COM::Proxy::Parse($pidl);
if ($res) {
my ($client) = ($opt_dcom_proxy or "$outputdir/$basename\_p.c");
FileSave($client,
@ -664,51 +664,51 @@ sub process_file($)
if (defined($opt_header)) {
my $header = ($opt_header or "$outputdir/$basename.h");
require Parse::Pidl::Samba::Header;
FileSave($header, Parse::Pidl::Samba::Header::Parse($pidl));
require Parse::Pidl::Samba4::Header;
FileSave($header, Parse::Pidl::Samba4::Header::Parse($pidl));
}
if (defined($opt_ndr_header)) {
my $header = ($opt_ndr_header or "$outputdir/ndr_$basename.h");
require Parse::Pidl::Samba::NDR::Header;
FileSave($header, Parse::Pidl::Samba::NDR::Header::Parse($pidl, $basename));
require Parse::Pidl::Samba4::NDR::Header;
FileSave($header, Parse::Pidl::Samba4::NDR::Header::Parse($pidl, $basename));
if (defined($opt_swig)) {
require Parse::Pidl::Samba::SWIG;
require Parse::Pidl::Samba4::SWIG;
my($filename) = ($opt_swig or "$outputdir/$basename.i");
Parse::Pidl::Samba::SWIG::RewriteHeader($pidl, $header, $filename);
Parse::Pidl::Samba4::SWIG::RewriteHeader($pidl, $header, $filename);
}
}
my $h_filename = "$outputdir/ndr_$basename.h";
if (defined($opt_client)) {
require Parse::Pidl::Samba::NDR::Client;
require Parse::Pidl::Samba4::NDR::Client;
my ($client) = ($opt_client or "$outputdir/ndr_$basename\_c.c");
FileSave($client, Parse::Pidl::Samba::NDR::Client::Parse($ndr,$h_filename));
FileSave($client, Parse::Pidl::Samba4::NDR::Client::Parse($ndr,$h_filename));
}
if (defined($opt_ejs)) {
require Parse::Pidl::Samba::EJS;
require Parse::Pidl::Samba::EJSHeader;
FileSave("$outputdir/ndr_$basename\_ejs.c", Parse::Pidl::Samba::EJS::Parse($ndr, $h_filename));
require Parse::Pidl::Samba4::EJS;
require Parse::Pidl::Samba4::EJSHeader;
FileSave("$outputdir/ndr_$basename\_ejs.c", Parse::Pidl::Samba4::EJS::Parse($ndr, $h_filename));
FileSave("$outputdir/ndr_$basename\_ejs.h", Parse::Pidl::Samba::EJSHeader::Parse($ndr));
FileSave("$outputdir/ndr_$basename\_ejs.h", Parse::Pidl::Samba4::EJSHeader::Parse($ndr));
}
if (defined($opt_server)) {
require Parse::Pidl::Samba::NDR::Server;
require Parse::Pidl::Samba4::NDR::Server;
my $dcom = "";
foreach my $x (@{$pidl}) {
next if ($x->{TYPE} ne "INTERFACE");
if (Parse::Pidl::Util::has_property($x, "object")) {
require Parse::Pidl::Samba::COM::Stub;
$dcom .= Parse::Pidl::Samba::COM::Stub::ParseInterface($x);
require Parse::Pidl::Samba4::COM::Stub;
$dcom .= Parse::Pidl::Samba4::COM::Stub::ParseInterface($x);
}
}
FileSave(($opt_server or "$outputdir/ndr_$basename\_s.c"), Parse::Pidl::Samba::NDR::Server::Parse($ndr,$h_filename));
FileSave(($opt_server or "$outputdir/ndr_$basename\_s.c"), Parse::Pidl::Samba4::NDR::Server::Parse($ndr,$h_filename));
if ($dcom ne "") {
$dcom = "
@ -725,8 +725,8 @@ $dcom
if (defined($opt_ndr_parser)) {
my $parser = ($opt_ndr_parser or "$outputdir/ndr_$basename.c");
require Parse::Pidl::Samba::NDR::Parser;
FileSave($parser, Parse::Pidl::Samba::NDR::Parser::Parse($ndr, $parser));
require Parse::Pidl::Samba4::NDR::Parser;
FileSave($parser, Parse::Pidl::Samba4::NDR::Parser::Parse($ndr, $parser));
}
if (defined($opt_eth_parser)) {
@ -745,18 +745,18 @@ $dcom
my $tdr_parser = ($opt_tdr_parser or "$outputdir/tdr_$basename.c");
my $tdr_header = ($opt_tdr_header or "$outputdir/tdr_$basename.h");
if (defined($opt_tdr_parser)) {
require Parse::Pidl::Samba::TDR;
FileSave($tdr_parser, Parse::Pidl::Samba::TDR::Parser($pidl, $tdr_header));
require Parse::Pidl::Samba4::TDR;
FileSave($tdr_parser, Parse::Pidl::Samba4::TDR::Parser($pidl, $tdr_header));
}
if (defined($opt_tdr_header)) {
require Parse::Pidl::Samba::TDR;
FileSave($tdr_header, Parse::Pidl::Samba::TDR::Header($pidl, $outputdir,$basename));
require Parse::Pidl::Samba4::TDR;
FileSave($tdr_header, Parse::Pidl::Samba4::TDR::Header($pidl, $outputdir,$basename));
}
if ($opt_template) {
require Parse::Pidl::Samba::Template;
print Parse::Pidl::Samba::Template::Parse($pidl);
require Parse::Pidl::Samba4::Template;
print Parse::Pidl::Samba4::Template::Parse($pidl);
}
if (defined($opt_samba3_header) or defined($opt_samba3_parser) or

View File

@ -5,12 +5,18 @@
use strict;
use Parse::Pidl::Test;
use Parse::Pidl::IDL;
use Parse::Pidl::NDR;
use Parse::Pidl::Samba::NDR;
my %settings = Parse::Pidl::Test::GetSettings(@ARGV);
$settings{'IDL-Arguments'} = ['--quiet', '--parse', '--parser=ndr_test.c', '--header=ndr_test.h'];
$settings{'IncludeFiles'} = ['ndr_test.h'];
$settings{'ExtraFiles'} = ['ndr_test.c'];
my $pidl = Parse::Pidl::IDL::parse_string('void Test();');
my $pndr = Parse::Pidl::NDR::Parse($pidl);
Parse::Pidl::Test::test_idl(
# Name
'UInt8',
@ -18,8 +24,6 @@ Parse::Pidl::Test::test_idl(
# Settings
\%settings,
# IDL
'void Test();',
# C Test
'