Change URL used in http tests to be a #define so it can be changed
[wine.git] / tools / widl / widltypes.h
blob5bb503b5c93cc10056fd01b8e3d44db0f518c1ef
1 /*
2 * IDL Compiler
4 * Copyright 2002 Ove Kaaven
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef __WIDL_WIDLTYPES_H
22 #define __WIDL_WIDLTYPES_H
24 #include <stdarg.h>
25 #include "windef.h"
26 #include "winbase.h"
27 #include "guiddef.h"
28 #include "wine/rpcfc.h"
30 #ifndef UUID_DEFINED
31 #define UUID_DEFINED
32 typedef GUID UUID;
33 #endif
35 typedef struct _attr_t attr_t;
36 typedef struct _expr_t expr_t;
37 typedef struct _type_t type_t;
38 typedef struct _typeref_t typeref_t;
39 typedef struct _var_t var_t;
40 typedef struct _func_t func_t;
41 typedef struct _ifref_t ifref_t;
42 typedef struct _class_t class_t;
44 #define DECL_LINK(type) \
45 type *l_next; \
46 type *l_prev;
48 #define LINK(x,y) do { x->l_next = y; if (y) y->l_prev = x; } while (0)
50 #define INIT_LINK(x) do { x->l_next = NULL; x->l_prev = NULL; } while (0)
51 #define NEXT_LINK(x) ((x)->l_next)
52 #define PREV_LINK(x) ((x)->l_prev)
54 enum attr_type
56 ATTR_ASYNC,
57 ATTR_CALLAS,
58 ATTR_CASE,
59 ATTR_CONTEXTHANDLE,
60 ATTR_DEFAULT,
61 ATTR_DLLNAME,
62 ATTR_DUAL,
63 ATTR_ENTRY_STRING,
64 ATTR_ENTRY_ORDINAL,
65 ATTR_HELPSTRING,
66 ATTR_ID,
67 ATTR_IDEMPOTENT,
68 ATTR_IIDIS,
69 ATTR_IN,
70 ATTR_LENGTHIS,
71 ATTR_LOCAL,
72 ATTR_OBJECT,
73 ATTR_ODL,
74 ATTR_OLEAUTOMATION,
75 ATTR_OUT,
76 ATTR_POINTERDEFAULT,
77 ATTR_POINTERTYPE,
78 ATTR_PUBLIC,
79 ATTR_READONLY,
80 ATTR_RETVAL,
81 ATTR_SIZEIS,
82 ATTR_SOURCE,
83 ATTR_STRING,
84 ATTR_SWITCHIS,
85 ATTR_SWITCHTYPE,
86 ATTR_UUID,
87 ATTR_V1ENUM,
88 ATTR_VERSION,
89 ATTR_WIREMARSHAL,
92 enum expr_type
94 EXPR_VOID,
95 EXPR_NUM,
96 EXPR_HEXNUM,
97 EXPR_IDENTIFIER,
98 EXPR_NEG,
99 EXPR_NOT,
100 EXPR_PPTR,
101 EXPR_CAST,
102 EXPR_SIZEOF,
103 EXPR_SHL,
104 EXPR_SHR,
105 EXPR_MUL,
106 EXPR_DIV,
107 EXPR_ADD,
108 EXPR_SUB,
109 EXPR_AND,
110 EXPR_OR,
113 struct _attr_t {
114 enum attr_type type;
115 union {
116 DWORD ival;
117 void *pval;
118 } u;
119 /* parser-internal */
120 DECL_LINK(attr_t)
123 struct _expr_t {
124 enum expr_type type;
125 expr_t *ref;
126 union {
127 long lval;
128 char *sval;
129 expr_t *ext;
130 typeref_t *tref;
131 } u;
132 int is_const;
133 long cval;
134 /* parser-internal */
135 DECL_LINK(expr_t)
138 struct _type_t {
139 char *name;
140 BYTE type;
141 struct _type_t *ref;
142 char *rname;
143 attr_t *attrs;
144 func_t *funcs;
145 var_t *fields;
146 int ignore, is_const, sign;
147 int defined, written;
149 /* parser-internal */
150 DECL_LINK(type_t)
153 struct _typeref_t {
154 char *name;
155 type_t *ref;
156 int uniq;
159 struct _var_t {
160 char *name;
161 int ptr_level;
162 expr_t *array;
163 type_t *type;
164 var_t *args; /* for function pointers */
165 char *tname;
166 attr_t *attrs;
167 expr_t *eval;
168 long lval;
170 /* parser-internal */
171 DECL_LINK(var_t)
174 struct _func_t {
175 var_t *def;
176 var_t *args;
177 int ignore, idx;
179 /* parser-internal */
180 DECL_LINK(func_t)
183 struct _ifref_t {
184 type_t *iface;
185 attr_t *attrs;
187 /* parser-internal */
188 DECL_LINK(ifref_t)
191 struct _class_t {
192 char *name;
193 attr_t *attrs;
194 ifref_t *ifaces;
196 /* parser-internal */
197 DECL_LINK(class_t)
200 #endif