0b6c6fc791a2413b622ba56c2f54428633ead715
[ddiss/samba.git] / librpc / idl / idl_types.h
1 #ifndef __LIBRPC_IDL_IDL_TYPES_H__
2 #define __LIBRPC_IDL_IDL_TYPES_H__
3
4 /*
5    Unix SMB/CIFS implementation.
6
7    (C) 2011 Samba Team.
8
9    This program is free software; you can redistribute it and/or modify
10    it under the terms of the GNU General Public License as published by
11    the Free Software Foundation; either version 3 of the License, or
12    (at your option) any later version.
13
14    This program is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17    GNU General Public License for more details.
18
19    You should have received a copy of the GNU General Public License
20    along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 */
22
23 #define STR_ASCII       LIBNDR_FLAG_STR_ASCII
24 #define STR_LEN4        LIBNDR_FLAG_STR_LEN4
25 #define STR_SIZE4       LIBNDR_FLAG_STR_SIZE4
26 #define STR_SIZE2       LIBNDR_FLAG_STR_SIZE2
27 #define STR_NOTERM      LIBNDR_FLAG_STR_NOTERM
28 #define STR_NULLTERM    LIBNDR_FLAG_STR_NULLTERM
29 #define STR_BYTESIZE    LIBNDR_FLAG_STR_BYTESIZE
30 #define STR_CONFORMANT  LIBNDR_FLAG_STR_CONFORMANT
31 #define STR_CHARLEN     LIBNDR_FLAG_STR_CHARLEN
32 #define STR_UTF8        LIBNDR_FLAG_STR_UTF8
33
34 /*
35   a null terminated UCS2 string
36 */
37 #define nstring         [flag(STR_NULLTERM|NDR_ALIGN2)] string
38
39 /*
40   a null terminated ascii string
41 */
42 #define astring         [flag(STR_ASCII|STR_NULLTERM)] string
43
44 /*
45   a null terminated UTF8 string
46 */
47 #define utf8string      [flag(STR_UTF8|STR_NULLTERM)] string
48
49 /*
50   a null terminated UCS2 string
51 */
52 #define nstring_array   [flag(STR_NULLTERM|NDR_ALIGN2)] string_array
53
54 #define NDR_NOALIGN       LIBNDR_FLAG_NOALIGN
55 #define NDR_REMAINING     LIBNDR_FLAG_REMAINING
56 #define NDR_ALIGN2        LIBNDR_FLAG_ALIGN2
57 #define NDR_ALIGN4        LIBNDR_FLAG_ALIGN4
58 #define NDR_ALIGN8        LIBNDR_FLAG_ALIGN8
59
60 /* this flag is used to force a section of IDL as little endian. It is
61    needed for the epmapper IDL, which is defined as always being LE */
62 #define NDR_LITTLE_ENDIAN LIBNDR_FLAG_LITTLE_ENDIAN
63 #define NDR_BIG_ENDIAN LIBNDR_FLAG_BIGENDIAN
64
65 /*
66   this is used to control formatting of uint8 arrays
67 */
68 #define NDR_PAHEX LIBNDR_PRINT_ARRAY_HEX
69
70 #define NDR_RELATIVE_REVERSE LIBNDR_FLAG_RELATIVE_REVERSE
71 #define NDR_NO_RELATIVE_REVERSE LIBNDR_FLAG_NO_RELATIVE_REVERSE
72 #endif