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