summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse/Pidl/Compat.pm
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-10-21 14:51:13 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-21 14:51:13 +0200
commit5209a846a9157e649fcdcb561f7eaf19c8c0e465 (patch)
treeb0a7e52b5646c8eec182dbc391e7934b6804488c /source4/pidl/lib/Parse/Pidl/Compat.pm
parent625359b2e266105022309df8985720108ecd6f67 (diff)
parent2ee8d29d22bcb1c350ab59d71b0aee548489bc9c (diff)
downloadsamba-5209a846a9157e649fcdcb561f7eaf19c8c0e465.tar.gz
samba-5209a846a9157e649fcdcb561f7eaf19c8c0e465.tar.bz2
samba-5209a846a9157e649fcdcb561f7eaf19c8c0e465.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba into regsrv
Conflicts: source4/lib/registry/ldb.c source4/rpc_server/winreg/rpc_winreg.c
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/Compat.pm')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Compat.pm163
1 files changed, 0 insertions, 163 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Compat.pm b/source4/pidl/lib/Parse/Pidl/Compat.pm
deleted file mode 100644
index 7519021144..0000000000
--- a/source4/pidl/lib/Parse/Pidl/Compat.pm
+++ /dev/null
@@ -1,163 +0,0 @@
-###################################################
-# IDL Compatibility checker
-# Copyright jelmer@samba.org 2005
-# released under the GNU GPL
-
-package Parse::Pidl::Compat;
-
-use Parse::Pidl qw(warning);
-use Parse::Pidl::Util qw(has_property);
-use strict;
-
-use vars qw($VERSION);
-$VERSION = '0.01';
-
-my %supported_properties = (
- # interface
- "helpstring" => ["INTERFACE", "FUNCTION"],
- "version" => ["INTERFACE"],
- "uuid" => ["INTERFACE"],
- "endpoint" => ["INTERFACE"],
- "pointer_default" => ["INTERFACE"],
-
- # dcom
- "object" => ["INTERFACE"],
- "local" => ["INTERFACE", "FUNCTION"],
- "iid_is" => ["ELEMENT"],
- "call_as" => ["FUNCTION"],
- "idempotent" => ["FUNCTION"],
-
- # function
- "in" => ["ELEMENT"],
- "out" => ["ELEMENT"],
-
- # pointer
- "ref" => ["ELEMENT"],
- "ptr" => ["ELEMENT"],
- "unique" => ["ELEMENT"],
- "ignore" => ["ELEMENT"],
-
- "value" => ["ELEMENT"],
-
- # generic
- "public" => ["FUNCTION", "TYPEDEF"],
- "nopush" => ["FUNCTION", "TYPEDEF"],
- "nopull" => ["FUNCTION", "TYPEDEF"],
- "noprint" => ["FUNCTION", "TYPEDEF"],
- "noejs" => ["FUNCTION", "TYPEDEF"],
-
- # union
- "switch_is" => ["ELEMENT"],
- "switch_type" => ["ELEMENT", "TYPEDEF"],
- "case" => ["ELEMENT"],
- "default" => ["ELEMENT"],
-
- # subcontext
- "subcontext" => ["ELEMENT"],
- "subcontext_size" => ["ELEMENT"],
-
- # enum
- "enum16bit" => ["TYPEDEF"],
- "v1_enum" => ["TYPEDEF"],
-
- # bitmap
- "bitmap8bit" => ["TYPEDEF"],
- "bitmap16bit" => ["TYPEDEF"],
- "bitmap32bit" => ["TYPEDEF"],
- "bitmap64bit" => ["TYPEDEF"],
-
- # array
- "range" => ["ELEMENT"],
- "size_is" => ["ELEMENT"],
- "string" => ["ELEMENT"],
- "noheader" => ["ELEMENT"],
- "charset" => ["ELEMENT"],
- "length_is" => ["ELEMENT"],
-);
-
-sub CheckTypedef($)
-{
- my ($td) = @_;
-
- if (has_property($td, "nodiscriminant")) {
- warning($td, "nodiscriminant property not supported");
- }
-
- if ($td->{TYPE} eq "BITMAP") {
- warning($td, "converting bitmap to scalar");
- #FIXME
- }
-
- if (has_property($td, "gensize")) {
- warning($td, "ignoring gensize() property. ");
- }
-
- if (has_property($td, "enum8bit") and has_property($td, "enum16bit")) {
- warning($td, "8 and 16 bit enums not supported, converting to scalar");
- #FIXME
- }
-
- StripProperties($td);
-}
-
-sub CheckElement($)
-{
- my $e = shift;
-
- if (has_property($e, "noheader")) {
- warning($e, "noheader property not supported");
- return;
- }
-
- if (has_property($e, "subcontext")) {
- warning($e, "converting subcontext to byte array");
- #FIXME
- }
-
- if (has_property($e, "compression")) {
- warning($e, "compression() property not supported");
- }
-
- if (has_property($e, "sptr")) {
- warning($e, "sptr() pointer property not supported");
- }
-
- if (has_property($e, "relative")) {
- warning($e, "relative() pointer property not supported");
- }
-
- if (has_property($e, "flag")) {
- warning($e, "ignoring flag() property");
- }
-
- if (has_property($e, "value")) {
- warning($e, "ignoring value() property");
- }
-}
-
-sub CheckFunction($)
-{
- my $fn = shift;
-
- if (has_property($fn, "noopnum")) {
- warning($fn, "noopnum not converted. Opcodes will be out of sync.");
- }
-}
-
-sub CheckInterface($)
-{
- my $if = shift;
-
-}
-
-sub Check($)
-{
- my $pidl = shift;
- my $nidl = [];
-
- foreach (@{$pidl}) {
- push (@$nidl, CheckInterface($_)) if ($_->{TYPE} eq "INTERFACE");
- }
-}
-
-1;