r5775: Remove some unused functions (unions are no longer as special as they used...
[samba.git] / source4 / librpc / ndr / libndr.h
index 4880df43bdfc9a94b944f03e28474b35e5ac70b2..4df3e7f248a37fc603ad481de582a0b6f7a66dae 100644 (file)
@@ -49,6 +49,7 @@ struct ndr_pull {
        struct ndr_token_list *relative_list;
        struct ndr_token_list *array_size_list;
        struct ndr_token_list *array_length_list;
+       struct ndr_token_list *switch_list;
 
        /* this is used to ensure we generate unique reference IDs
           between request and reply */
@@ -68,6 +69,7 @@ struct ndr_push {
        uint32_t alloc_size;
        uint32_t offset;
 
+       struct ndr_token_list *switch_list;
        struct ndr_token_list *relative_list;
 
        /* this is used to ensure we generate unique reference IDs */
@@ -130,9 +132,11 @@ struct ndr_print {
 /* set if an object uuid will be present */
 #define LIBNDR_FLAG_OBJECT_PRESENT    (1<<30)
 
+/* set to avoid recursion in ndr_size_*() calculation */
+#define LIBNDR_FLAG_NO_NDR_SIZE                (1<<31)
+
 /* useful macro for debugging */
 #define NDR_PRINT_DEBUG(type, p) ndr_print_debug((ndr_print_fn_t)ndr_print_ ##type, #p, p)
-#define NDR_PRINT_UNION_DEBUG(type, level, p) ndr_print_union_debug((ndr_print_union_fn_t)ndr_print_ ##type, #p, level, p)
 #define NDR_PRINT_FUNCTION_DEBUG(type, flags, p) ndr_print_function_debug((ndr_print_function_t)ndr_print_ ##type, #type, flags, p)
 #define NDR_PRINT_BOTH_DEBUG(type, p) NDR_PRINT_FUNCTION_DEBUG(type, NDR_BOTH, p)
 #define NDR_PRINT_OUT_DEBUG(type, p) NDR_PRINT_FUNCTION_DEBUG(type, NDR_OUT, p)
@@ -237,8 +241,6 @@ enum ndr_err_code {
 typedef NTSTATUS (*ndr_push_flags_fn_t)(struct ndr_push *, int ndr_flags, void *);
 typedef NTSTATUS (*ndr_push_const_fn_t)(struct ndr_push *, int ndr_flags, const void *);
 typedef NTSTATUS (*ndr_pull_flags_fn_t)(struct ndr_pull *, int ndr_flags, void *);
-typedef NTSTATUS (*ndr_push_union_fn_t)(struct ndr_push *, int ndr_flags, uint32_t, void *);
-typedef NTSTATUS (*ndr_pull_union_fn_t)(struct ndr_pull *, int ndr_flags, uint32_t, void *);
 typedef void (*ndr_print_fn_t)(struct ndr_print *, const char *, void *);
 typedef void (*ndr_print_function_t)(struct ndr_print *, const char *, int, void *);
 typedef void (*ndr_print_union_fn_t)(struct ndr_print *, const char *, uint32_t, void *);