1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include <string>
6 
7 #include "ipc/ipc_message_macros.h"
8 
9 #define IPC_MESSAGE_START TestMsgStart
10 
11 IPC_SYNC_MESSAGE_CONTROL0_0(SyncChannelTestMsg_NoArgs)
12 
13 IPC_SYNC_MESSAGE_CONTROL0_1(SyncChannelTestMsg_AnswerToLife,
14                             int /* answer */)
15 
16 IPC_SYNC_MESSAGE_CONTROL1_1(SyncChannelTestMsg_Double,
17                             int /* in */,
18                             int /* out */)
19 
20 IPC_SYNC_MESSAGE_CONTROL0_1(SyncChannelNestedTestMsg_String,
21                             std::string)
22 
23 // out1 is false
24 IPC_SYNC_MESSAGE_CONTROL0_1(Msg_C_0_1, bool)
25 
26 // out1 is true, out2 is 2
27 IPC_SYNC_MESSAGE_CONTROL0_2(Msg_C_0_2, bool, int)
28 
29 // out1 is false, out2 is 3, out3 is "0_3"
30 IPC_SYNC_MESSAGE_CONTROL0_3(Msg_C_0_3, bool, int, std::string)
31 
32 // in1 must be 1, out1 is true
33 IPC_SYNC_MESSAGE_CONTROL1_1(Msg_C_1_1, int, bool)
34 
35 // in1 must be false, out1 is true, out2 is 12
36 IPC_SYNC_MESSAGE_CONTROL1_2(Msg_C_1_2, bool, bool, int)
37 
38 // in1 must be 3, out1 is "1_3", out2 is 13, out3 is false
39 IPC_SYNC_MESSAGE_CONTROL1_3(Msg_C_1_3, int, std::string, int, bool)
40 
41 // in1 must be 1, in2 must be false, out1 is true
42 IPC_SYNC_MESSAGE_CONTROL2_1(Msg_C_2_1, int, bool, bool)
43 
44 // in1 must be false, in2 must be 2, out1 is true, out2 is 22
45 IPC_SYNC_MESSAGE_CONTROL2_2(Msg_C_2_2, bool, int, bool, int)
46 
47 // in1 must be 3, in2 must be true, out1 is "2_3", out2 is 23, out3 is false
48 IPC_SYNC_MESSAGE_CONTROL2_3(Msg_C_2_3, int, bool, std::string, int, bool)
49 
50 // in1 must be 1, in2 must be false, in3 must be "3_1", out1 is true
51 IPC_SYNC_MESSAGE_CONTROL3_1(Msg_C_3_1, int, bool, std::string, bool)
52 
53 // in1 must be "3_3", in2 must be false, in3 must be 2, out1 is true, out2 is
54 // 32
55 IPC_SYNC_MESSAGE_CONTROL3_2(Msg_C_3_2, std::string, bool, int, bool, int)
56 
57 // in1 must be 3, in2 must be "3_3", in3 must be true, out1 is "3_3", out2 is
58 // 33, out3 is false
59 IPC_SYNC_MESSAGE_CONTROL3_3(Msg_C_3_3, int, std::string, bool, std::string,
60                             int, bool)
61 
62 // in1 must be true, in2 must be 3, in3 must be "3_4", out1 is 34, out2 is
63 // true, out3 is "3_4", out3 is false
64 IPC_SYNC_MESSAGE_CONTROL3_4(Msg_C_3_4, bool, int, std::string, int, bool,
65                             std::string, bool)
66 
67 // NOTE: routed messages are just a copy of the above...
68 
69 // out1 is false
70 IPC_SYNC_MESSAGE_ROUTED0_1(Msg_R_0_1, bool)
71 
72 // out1 is true, out2 is 2
73 IPC_SYNC_MESSAGE_ROUTED0_2(Msg_R_0_2, bool, int)
74 
75 // out1 is false, out2 is 3, out3 is "0_3"
76 IPC_SYNC_MESSAGE_ROUTED0_3(Msg_R_0_3, bool, int, std::string)
77 
78 // in1 must be 1, out1 is true
79 IPC_SYNC_MESSAGE_ROUTED1_1(Msg_R_1_1, int, bool)
80 
81 // in1 must be false, out1 is true, out2 is 12
82 IPC_SYNC_MESSAGE_ROUTED1_2(Msg_R_1_2, bool, bool, int)
83 
84 // in1 must be 3, out1 is "1_3", out2 is 13, out3 is false
85 IPC_SYNC_MESSAGE_ROUTED1_3(Msg_R_1_3, int, std::string, int, bool)
86 
87 // in1 must be 1, in2 must be false, out1 is true
88 IPC_SYNC_MESSAGE_ROUTED2_1(Msg_R_2_1, int, bool, bool)
89 
90 // in1 must be false, in2 must be 2, out1 is true, out2 is 22
91 IPC_SYNC_MESSAGE_ROUTED2_2(Msg_R_2_2, bool, int, bool, int)
92 
93 // in1 must be 3, in2 must be true, out1 is "2_3", out2 is 23, out3 is false
94 IPC_SYNC_MESSAGE_ROUTED2_3(Msg_R_2_3, int, bool, std::string, int, bool)
95 
96 // in1 must be 1, in2 must be false, in3 must be "3_1", out1 is true
97 IPC_SYNC_MESSAGE_ROUTED3_1(Msg_R_3_1, int, bool, std::string, bool)
98 
99 // in1 must be "3_3", in2 must be false, in3 must be 2, out1 is true, out2
100 // is 32
101 IPC_SYNC_MESSAGE_ROUTED3_2(Msg_R_3_2, std::string, bool, int, bool, int)
102 
103 // in1 must be 3, in2 must be "3_3", in3 must be true, out1 is "3_3", out2 is
104 // 33, out3 is false
105 IPC_SYNC_MESSAGE_ROUTED3_3(Msg_R_3_3, int, std::string, bool, std::string,
106                            int, bool)
107 
108 // in1 must be true, in2 must be 3, in3 must be "3_4", out1 is 34, out2 is
109 // true, out3 is "3_4", out4 is false
110 IPC_SYNC_MESSAGE_ROUTED3_4(Msg_R_3_4, bool, int, std::string, int, bool,
111                            std::string, bool)
112 
113 IPC_MESSAGE_CONTROL1(SyncChannelTestMsg_Ping, int)
114 IPC_SYNC_MESSAGE_CONTROL1_1(SyncChannelTestMsg_PingTTL, int, int)
115 IPC_SYNC_MESSAGE_CONTROL0_0(SyncChannelTestMsg_Done)
116 
117 // Messages for ReentrantReply test.
118 IPC_SYNC_MESSAGE_CONTROL0_0(SyncChannelTestMsg_Reentrant1)
119 IPC_SYNC_MESSAGE_CONTROL0_0(SyncChannelTestMsg_Reentrant2)
120 IPC_SYNC_MESSAGE_CONTROL0_0(SyncChannelTestMsg_Reentrant3)
121