r14361: Support 'helper' attribute in pidl and use it.
authorJelmer Vernooij <jelmer@samba.org>
Tue, 14 Mar 2006 00:12:58 +0000 (00:12 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:57:14 +0000 (13:57 -0500)
Remove some headers from include/includes.h (they're now only included
in the file they are used)
(This used to be commit 7213b7498eacac2c2cd03cf6aace376ce153cc7c)

source4/include/includes.h
source4/librpc/idl/drsuapi.idl
source4/librpc/idl/krb5pac.idl
source4/librpc/idl/nbt.idl
source4/librpc/idl/security.idl
source4/librpc/idl/spoolss.idl
source4/main.mk
source4/pidl/lib/Parse/Pidl/NDR.pm
source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm

index 68d4d0e4a2483fd0293750b3eab630ca4f2a0902..b613a18633eb6b1f7fd0e731eabf50d12a2e28bf 100644 (file)
@@ -125,14 +125,7 @@ enum brl_type {
 #include "libcli/nbt/libnbt.h"
 #include "libcli/util/proto.h"
 
-/* These headers are used by the NDR parsers. They are globally 
- * included at the moment, but will be included by the autogenerated 
- * NDR parsers later on and removed from here. */
-#include "libcli/nbt/nbtname.h"
-#include "librpc/ndr/ndr_sec.h"
-#include "librpc/ndr/ndr_drsuapi.h"
-#include "librpc/ndr/ndr_spoolss_buf.h"
-#include "librpc/ndr/ndr_krb5pac.h"
+/* FIXME: This header should be included by pidl where necessary */
 #include "librpc/ndr/ndr_compression.h"
 
 #undef _PRINTF_ATTRIBUTE
index ff76e65e51f73e51353b4a444a8a9cfba57ee836..83ffbb4baa256ed0f35255cbbee5d079dbab7c3d 100644 (file)
@@ -7,7 +7,8 @@
   authservice("ldap"),
   helpstring("Active Directory Replication"),
   pointer_default(unique),
-  depends(security)
+  depends(security),
+  helper("librpc/ndr/ndr_drsuapi.h")
 ] 
 interface drsuapi
 {
index 0d614493ed0b729931629b77c188dcfc2168d55e..5ccfe56a611482c351831d6996b9f138b80ea0ef 100644 (file)
@@ -7,7 +7,8 @@
 [
   version(0.0),
   pointer_default(unique),
-  depends(security,netlogon)
+  depends(security,netlogon),
+  helper("librpc/ndr/ndr_krb5pac.h")
 ]
 interface krb5pac
 {
index d62273e8cf54421abe8e2f74325eb1a9881840d7..a948a79ff16fa28cffeb6c4ef742a882c2152587 100644 (file)
@@ -9,7 +9,8 @@
 */
 
 [
-  depends(security,svcctl)
+  depends(security,svcctl),
+  helper("libcli/nbt/nbtname.h")
 ] interface nbt
 {
        const int NBT_NAME_SERVICE_PORT  = 137;
index 6d3e79697a61337ab83afcbe270221ad48742130..f22e6b68360fe6d8540e24fb8051e2c98355ce71 100644 (file)
@@ -6,7 +6,8 @@
 
 [
        pointer_default(unique),
-       depends(misc)
+       depends(misc),
+       helper("librpc/ndr/ndr_sec.h")
 ]
 interface security
 {
index bb011854746015fe3dfbd6038953533051242ece..93ce3c3f36515b26c2da9184bcfa23910847a6ba 100644 (file)
@@ -10,7 +10,8 @@
   pointer_default(unique),
   pointer_default_top(unique),
   helpstring("Spooler SubSystem"),
-  depends(security)
+  depends(security),
+  helper("librpc/ndr/ndr_spoolss_buf.h")
 ] interface spoolss
 {
        typedef struct {
index e11e6e9038186f2f656c68e346b173116d4fbb09..f66c5e3c66f7f17f62585eb65a9d558f4f71c972 100644 (file)
@@ -236,11 +236,6 @@ include/includes.h: \
                param/param.h \
                libcli/util/proto.h \
                librpc/ndr/ndr_orpc_proto.h \
-               libcli/nbt/nbtname.h \
-               librpc/ndr/ndr_sec.h \
-               librpc/ndr/ndr_drsuapi.h \
-               librpc/ndr/ndr_spoolss_buf.h \
-               librpc/ndr/ndr_krb5pac.h \
                librpc/ndr/ndr_compression.h
 
 clean_pch: 
index 48d3ebf1705495498577624034bc223835bd3a65..b1aec5cc5d00ae6efbd902f49cfebafba97e6e2f 100644 (file)
@@ -750,6 +750,7 @@ my %property_list = (
        "pointer_default"       => ["INTERFACE"],
        "pointer_default_top"   => ["INTERFACE"],
        "depends"               => ["INTERFACE"],
+       "helper"                => ["INTERFACE"],
        "authservice"           => ["INTERFACE"],
 
        # dcom
index e89ce3268a599888848b4cd3174b06f30d319f94..0b2cef54b88e1b90ebf716d950ede9e21a035dd4 100644 (file)
@@ -2244,6 +2244,12 @@ sub HeaderInterface($)
                }
        }
 
+       if (defined $interface->{PROPERTIES}->{helper}) {
+               foreach (split / /, $interface->{PROPERTIES}->{helper}) {
+                       pidl_hdr "#include $_";
+               }
+       }
+
        if (defined $interface->{PROPERTIES}->{uuid}) {
                my $name = uc $interface->{NAME};
                pidl_hdr "#define DCERPC_$name\_UUID " .