s3:lib/afs fix the build
[Samba/gebeck_regimport.git] / testprogs / win32 / rpcecho / rpcecho.idl
blobb0ddb81a3829b8bc701dbea14f7c03844b00b631
1 /*
2 RPC echo IDL.
4 Copyright (C) Tim Potter 2003
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 This program 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
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef __PIDL__
21 #define unistr [string] wchar_t *
22 #endif
25 uuid(60a15ec5-4de8-11d7-a637-005056a20182),
26 version(1.0)
28 interface rpcecho
30 // Add one to an integer
31 void AddOne(
32 [in] int in_data,
33 [out] int *out_data
35 // Echo an array of bytes back at the caller
36 void EchoData(
37 [in] int len,
38 [in] [size_is(len)] char in_data[],
39 [out] [size_is(len)] char out_data[]
41 // Sink data to the server
42 void SinkData(
43 [in] int len,
44 [in] [size_is(len)] char in_data[]
46 // Source data from server
47 void SourceData(
48 [in] int len,
49 [out] [size_is(len)] char out_data[]
51 const long myconstant = 42;
53 /* test strings */
54 void TestCall (
55 [in] unistr *s1,
56 [out] unistr *s2
59 /* test some alignment issues */
60 typedef struct {
61 char v;
62 } echo_info1;
64 typedef struct {
65 short v;
66 } echo_info2;
68 typedef struct {
69 long v;
70 } echo_info3;
72 typedef struct {
73 hyper v;
74 } echo_info4;
76 typedef struct {
77 char v1;
78 hyper v2;
79 } echo_info5;
81 typedef struct {
82 char v1;
83 echo_info1 info1;
84 } echo_info6;
86 typedef struct {
87 char v1;
88 echo_info4 info4;
89 } echo_info7;
91 typedef union {
92 [case(1)] echo_info1 info1;
93 [case(2)] echo_info2 info2;
94 [case(3)] echo_info3 info3;
95 [case(4)] echo_info4 info4;
96 [case(5)] echo_info5 info5;
97 [case(6)] echo_info6 info6;
98 [case(7)] echo_info7 info7;
99 } echo_Info;
101 long TestCall2 (
102 [in] short level,
103 [out,switch_is(level)] echo_Info **info
106 long TestSleep(
107 [in] long seconds
110 typedef enum {
111 ECHO_ENUM1 = 1,
112 ECHO_ENUM2 = 2
113 } echo_Enum1;
115 typedef [v1_enum] enum {
116 ECHO_ENUM1_32 = 1,
117 ECHO_ENUM2_32 = 2
118 } echo_Enum1_32;
120 typedef struct {
121 echo_Enum1 e1;
122 echo_Enum1_32 e2;
123 } echo_Enum2;
125 typedef union {
126 [case(ECHO_ENUM1)] echo_Enum1 e1;
127 [case(ECHO_ENUM2)] echo_Enum2 e2;
128 } echo_Enum3;
130 void echo_TestEnum(
131 [in,out,ref] echo_Enum1 *foo1,
132 [in,out,ref] echo_Enum2 *foo2,
133 [in,out,ref,switch_is(*foo1)] echo_Enum3 *foo3
136 typedef struct {
137 long x;
138 [size_is(x)] short surrounding[*];
139 } echo_Surrounding;
141 void echo_TestSurrounding(
142 [in,out,ref] echo_Surrounding *data
145 short echo_TestDoublePointer([in] short ***data);