r6572: add "string_array" as new scalar type for handling SPOOLSS string array's
[samba.git] / source / librpc / idl / idl_types.h
1 #define STR_ASCII       LIBNDR_FLAG_STR_ASCII
2 #define STR_LEN4        LIBNDR_FLAG_STR_LEN4
3 #define STR_SIZE4       LIBNDR_FLAG_STR_SIZE4
4 #define STR_SIZE2       LIBNDR_FLAG_STR_SIZE2
5 #define STR_NOTERM      LIBNDR_FLAG_STR_NOTERM
6 #define STR_NULLTERM    LIBNDR_FLAG_STR_NULLTERM
7 #define STR_BYTESIZE    LIBNDR_FLAG_STR_BYTESIZE
8 #define STR_FIXLEN32    LIBNDR_FLAG_STR_FIXLEN32
9 #define STR_FIXLEN15    LIBNDR_FLAG_STR_FIXLEN15
10 #define STR_CONFORMANT  LIBNDR_FLAG_STR_CONFORMANT
11 #define STR_CHARLEN     LIBNDR_FLAG_STR_CHARLEN
12 #define STR_UTF8        LIBNDR_FLAG_STR_UTF8
13
14 /*
15   a UCS2 string prefixed with [size] [offset] [length], all 32 bits
16   not null terminated
17 */
18 #define unistr_noterm   [flag(STR_NOTERM|STR_SIZE4|STR_LEN4)] string
19
20 /*
21   a UCS2 string prefixed with [size] [offset] [length], all 32 bits
22 */
23 #define unistr          [flag(STR_SIZE4|STR_LEN4)] string
24
25 /*
26   a UCS2 string prefixed with [size], 32 bits
27 */
28 #define lstring         [flag(STR_SIZE4)] string
29
30 /*
31   a null terminated UCS2 string
32 */
33 #define nstring         [flag(STR_NULLTERM)] string
34
35 /*
36   fixed length 32 character UCS-2 string
37 */
38 #define string32        [flag(STR_FIXLEN32)] string
39
40 /*
41   fixed length 16 character ascii string
42 */
43 #define astring15       [flag(STR_ASCII|STR_FIXLEN15)] string
44
45 /*
46   an ascii string prefixed with [size] [offset] [length], all 32 bits
47   null terminated
48 */
49 #define ascstr          [flag(STR_ASCII|STR_SIZE4|STR_LEN4)] string
50
51 /*
52   an ascii string prefixed with [offset] [length], both 32 bits
53   null terminated
54 */
55 #define ascstr2         [flag(STR_ASCII|STR_LEN4)] string
56
57 /*
58   an ascii string prefixed with [size], 32 bits
59 */
60 #define asclstr         [flag(STR_ASCII|STR_SIZE4)] string
61
62 /*
63   an ascii string prefixed with [size], 16 bits
64   null terminated
65 */
66 #define ascstr3         [flag(STR_ASCII|STR_SIZE2)] string
67
68 /*
69   an ascii string prefixed with [size] [offset] [length], all 32 bits
70   not null terminated
71 */
72 #define ascstr_noterm   [flag(STR_NOTERM|STR_ASCII|STR_SIZE4|STR_LEN4)] string
73
74 /*
75   a null terminated ascii string
76 */
77 #define astring         [flag(STR_ASCII|STR_NULLTERM)] string
78
79 /*
80   a null terminated UTF8 string
81 */
82 #define utf8string      [flag(STR_UTF8|STR_NULLTERM)] string
83
84 /*
85   a null terminated UCS2 string
86 */
87 #define nstring_array   [flag(STR_NULLTERM)] string_array
88
89 #define NDR_NOALIGN       LIBNDR_FLAG_NOALIGN
90 #define NDR_REMAINING     LIBNDR_FLAG_REMAINING
91 #define NDR_ALIGN2        LIBNDR_FLAG_ALIGN2
92 #define NDR_ALIGN4        LIBNDR_FLAG_ALIGN4
93 #define NDR_ALIGN8        LIBNDR_FLAG_ALIGN8
94
95 /* this flag is used to force a section of IDL as little endian. It is
96    needed for the epmapper IDL, which is defined as always being LE */
97 #define NDR_LITTLE_ENDIAN LIBNDR_FLAG_LITTLE_ENDIAN
98 #define NDR_BIG_ENDIAN LIBNDR_FLAG_BIGENDIAN
99
100
101 /*
102   these are used by the epmapper and mgmt interfaces
103 */
104 #define error_status_t uint32
105 #define boolean32 uint32
106 #define unsigned32 uint32
107
108 /*
109   this is used to control formatting of uint8 arrays
110 */
111 #define NDR_PAHEX LIBNDR_PRINT_ARRAY_HEX
112
113 /* this enables spoolss style relative ptrs */
114 #define RELATIVE_CURRENT LIBNDR_FLAG_RELATIVE_CURRENT
115
116 #define bool8 uint8