46a4d89478c9d6d4de5fd5175287e788d3b0a1e0
[samba.git] / source4 / librpc / idl / echo.idl
1 #include "idl_types.h"
2
3
4 [
5   uuid("60a15ec5-4de8-11d7-a637-005056a20182"),
6   endpoint("ncacn_np:[\\pipe\\rpcecho]", "ncacn_ip_tcp:", "ncalrpc:"),
7   version(1.0),
8   helpstring("Simple echo pipe")
9 ]
10 interface rpcecho
11 {
12         /* Add one to an integer */
13         void echo_AddOne(
14                 [in,out,ref] uint32 *v
15         );
16         /* Echo an array of bytes back at the caller */
17         void echo_EchoData(
18                 [in] uint32 len,
19                 [in] [size_is(len)] uint8 in_data[],
20                 [out] [size_is(len)] uint8 out_data[]
21         );
22         /* Sink data to the server */
23         void echo_SinkData(
24                 [in] uint32 len,
25                 [in,ref,size_is(len)] uint8 *data
26         );
27         /* Source data from server */
28         void echo_SourceData(
29                 [in] uint32 len,
30                 [out,ref,size_is(len)] uint8 *data
31         );
32
33
34         /* test strings */
35         void echo_TestCall (
36                 [in]       unistr *s1,
37                 [out]      unistr *s2
38                 );
39
40
41         /* test some alignment issues */
42         typedef struct {
43                 uint8 v;
44         } echo_info1;
45
46         typedef struct {
47                 uint16 v;
48         } echo_info2;
49
50         typedef struct {
51                 uint32 v;
52         } echo_info3;
53
54         typedef struct {
55                 HYPER_T v;
56         } echo_info4;
57
58         typedef struct {
59                 uint8 v1;
60                 HYPER_T v2;
61         } echo_info5;
62
63         typedef struct {
64                 uint8 v1;
65                 echo_info1 info1;
66         } echo_info6;
67
68         typedef union {
69                 [case(1)]  echo_info1 info1;
70         } echo_XXX;
71
72         typedef struct {
73                 uint8 v1;
74                 echo_info4 info4;
75         } echo_info7;
76
77         typedef union {
78                 [case(1)]  echo_info1 info1;
79                 [case(2)]  echo_info2 info2;
80                 [case(3)]  echo_info3 info3;
81                 [case(4)]  echo_info4 info4;
82                 [case(5)]  echo_info5 info5;
83                 [case(6)]  echo_info6 info6;
84                 [case(7)]  echo_info7 info7;
85         } echo_Info;
86
87         NTSTATUS echo_TestCall2 (
88                      [in]                    uint16 level,
89                      [out,switch_is(level)]  echo_Info *info
90                 );
91
92         uint32 echo_TestSleep(
93                 [in] uint32 seconds
94                 );
95 }