push 449d6a3aabb36101ab68dc5159ee54c4adc03034
[wine/hacks.git] / dlls / rpcrt4 / tests / server.idl
blobd8a1ca36d06e93d4aca6cf9c0348b525b745d6b6
1 /*
2 * A simple interface to test the RPC server.
4 * Copyright (C) Google 2007 (Dan Hipschman)
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "server_defines.h"
23 typedef struct tag_vector
25 int x;
26 int y;
27 int z;
28 } vector_t;
31 uuid(00000000-4114-0704-2301-000000000000),
32 implicit_handle(handle_t IServer_IfHandle)
34 interface IServer
36 cpp_quote("#if 0")
37 typedef wchar_t WCHAR;
38 cpp_quote("#endif")
40 typedef [string] char *str_t;
41 typedef [string] WCHAR *wstr_t;
43 typedef struct
45 int *pi;
46 int **ppi;
47 int ***pppi;
48 } pints_t;
50 typedef struct
52 char *pc;
53 short *ps;
54 long *pl;
55 float *pf;
56 double *pd;
57 } ptypes_t;
59 typedef struct
61 vector_t *pu;
62 vector_t **pv;
63 } pvectors_t;
65 typedef struct
67 [switch_is(s)] union
69 [case(SUN_I)] int i;
70 [case(SUN_F1, SUN_F2)] float f;
71 [case(SUN_PI)] int *pi;
72 } u;
74 int s;
75 } sun_t;
77 int int_return(void);
78 int square(int x);
79 int sum(int x, int y);
80 void square_out(int x, [out] int *y);
81 void square_ref([in, out] int *x);
82 int str_length([string] const char *s);
83 int cstr_length([string, size_is(n)] const char *s, int n);
84 int dot_self(vector_t *v);
85 double square_half(double x, [out] double *y);
86 float square_half_float(float x, [out] float *y);
87 long square_half_long(long x, [out] long *y);
88 int sum_fixed_array(int a[5]);
89 int pints_sum(pints_t *pints);
90 double ptypes_sum(ptypes_t *ptypes);
91 int dot_pvectors(pvectors_t *pvectors);
93 /* don't use this anywhere except in sp_t */
94 typedef struct
96 int x;
97 } sp_inner_t;
99 typedef struct
101 int x;
102 sp_inner_t *s;
103 } sp_t;
105 int sum_sp(sp_t *sp);
106 double square_sun(sun_t *su);
108 typedef struct test_list
110 int t;
111 [switch_is(t)] union
113 [case(TL_NULL)] int x; /* end of list */
114 [case(TL_LIST)] struct test_list *tail;
115 } u;
116 } test_list_t;
118 int test_list_length(test_list_t *ls);
119 int sum_fixed_int_3d(int m[2][3][4]);
120 int sum_conf_array([size_is(n)] int x[], int n);
121 int sum_unique_conf_array([size_is(n), unique] int x[], int n);
122 int sum_unique_conf_ptr([size_is(n), unique] int *x, int n);
123 int sum_var_array([length_is(n)] int x[20], int n);
124 int dot_two_vectors(vector_t vs[2]);
126 typedef struct
128 int n;
129 [size_is(n)] int ca[];
130 } cs_t;
132 typedef struct
134 int *pn;
135 [size_is(*pn)] int *ca1;
136 [size_is(n * 2)] int *ca2;
137 int n;
138 } cps_t;
140 typedef struct
142 [size_is(c ? a : b)] int *ca;
143 int a;
144 int b;
145 int c;
146 } cpsc_t;
148 int sum_cs(cs_t *cs);
149 int sum_cps(cps_t *cps);
150 int sum_cpsc(cpsc_t *cpsc);
152 typedef [wire_marshal(int)] void *puint_t;
153 int square_puint(puint_t p);
154 int dot_copy_vectors(vector_t u, vector_t v);
156 typedef struct wire_us *wire_us_t;
157 typedef [wire_marshal(wire_us_t)] struct us us_t;
158 struct us
160 void *x;
162 struct wire_us
164 int x;
166 typedef struct
168 us_t us;
169 } test_us_t;
171 int square_test_us(test_us_t *tus);
173 typedef union encu switch (int t)
175 case ENCU_I: int i;
176 case ENCU_F: float f;
177 } encu_t;
179 typedef enum
181 E1 = 23,
182 E2 = 4,
183 E3 = 0,
184 E4 = 64
185 } e_t;
187 typedef union encue switch (e_t t)
189 case E1: int i1;
190 case E2: float f2;
191 } encue_t;
193 double square_encu(encu_t *eu);
194 int sum_parr(int *a[3]);
195 int sum_pcarr([size_is(n)] int *a[], int n);
196 int enum_ord(e_t e);
197 double square_encue(encue_t *eue);
199 int sum_toplev_conf_2n([size_is(n * 2)] int *x, int n);
200 int sum_toplev_conf_cond([size_is(c ? a : b)] int *x, int a, int b, int c);
202 typedef struct
204 char c;
205 int i;
206 short s;
207 double d;
208 } aligns_t;
210 double sum_aligns(aligns_t *a);
212 typedef struct
214 int i;
215 char c;
216 } padded_t;
218 int sum_padded(padded_t *p);
219 int sum_padded2(padded_t ps[2]);
220 int sum_padded_conf([size_is(n)] padded_t *ps, int n);
222 typedef struct
224 int *p1;
225 } bogus_helper_t;
227 typedef struct
229 bogus_helper_t h;
230 int *p2;
231 int *p3;
232 char c;
233 } bogus_t;
235 int sum_bogus(bogus_t *b);
236 void check_null([unique] int *null);
238 typedef struct
240 str_t s;
241 } str_struct_t;
243 typedef struct
245 wstr_t s;
246 } wstr_struct_t;
248 int str_struct_len(str_struct_t *s);
249 int wstr_struct_len(wstr_struct_t *s);
251 void stop(void);