r25000: Fix some more C++ compatibility warnings.
[metze/samba/wip.git] / source4 / librpc / ndr / libndr.h
index 16d215e053d3c7abeb7492ae8c14ede4c0976b49..522031b8e419772413c8f049641f48b3f5b4da94 100644 (file)
 #ifndef __LIBNDR_H__
 #define __LIBNDR_H__
 
-#include "core.h"
-#include "lib/talloc/talloc.h"
+#include <talloc.h>
 #include "lib/util/util.h" /* for discard_const */
 #include "lib/charset/charset.h"
+#include "libcli/util/nt_status.h"
 
 /*
   this provides definitions for the libcli/rpc/ MSRPC library
@@ -269,7 +269,7 @@ enum ndr_compression_alg {
 
 
 #define NDR_PUSH_ALLOC_SIZE(ndr, s, size) do { \
-       (s) = talloc_size(ndr, size); \
+       (s) = talloc_array(ndr, uint8_t, size); \
        if (!(s)) return ndr_push_error(ndr, NDR_ERR_ALLOC, "push alloc %u failed: %s\n", (unsigned)size, __location__); \
 } while (0)
 
@@ -296,7 +296,27 @@ struct ndr_interface_call {
        ndr_push_flags_fn_t ndr_push;
        ndr_pull_flags_fn_t ndr_pull;
        ndr_print_function_t ndr_print;
-       BOOL async;
+       bool async;
+};
+
+struct ndr_interface_string_array {
+       uint32_t count;
+       const char * const *names;
+};
+
+struct ndr_interface_table {
+       const char *name;
+       struct ndr_syntax_id syntax_id;
+       const char *helpstring;
+       uint32_t num_calls;
+       const struct ndr_interface_call *calls;
+       const struct ndr_interface_string_array *endpoints;
+       const struct ndr_interface_string_array *authservices;
+};
+
+struct ndr_interface_list {
+       struct ndr_interface_list *prev, *next;
+       const struct ndr_interface_table *table;
 };
 
 /* FIXME: Use represent_as instead */