blob: af62e63cdf2c44a118d4cc5ad28f9e2f0a297464 [file] [log] [blame]
initial.commit09911bf2008-07-26 23:55:291// Copyright 2008, Google Inc.
2// All rights reserved.
3//
4// Redistribution and use in source and binary forms, with or without
5// modification, are permitted provided that the following conditions are
6// met:
7//
8// * Redistributions of source code must retain the above copyright
9// notice, this list of conditions and the following disclaimer.
10// * Redistributions in binary form must reproduce the above
11// copyright notice, this list of conditions and the following disclaimer
12// in the documentation and/or other materials provided with the
13// distribution.
14// * Neither the name of Google Inc. nor the names of its
15// contributors may be used to endorse or promote products derived from
16// this software without specific prior written permission.
17//
18// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
30#include "chrome/common/ipc_message_macros.h"
31
32IPC_BEGIN_MESSAGES(TestMsg, 8)
33 // out1 is false
34 IPC_SYNC_MESSAGE_CONTROL0_1(Msg_C_0_1, bool)
35
36 // out1 is true, out2 is 2
37 IPC_SYNC_MESSAGE_CONTROL0_2(Msg_C_0_2, bool, int)
38
39 // out1 is false, out2 is 3, out3 is "0_3"
40 IPC_SYNC_MESSAGE_CONTROL0_3(Msg_C_0_3, bool, int, std::string)
41
42 // in1 must be 1, out1 is true
43 IPC_SYNC_MESSAGE_CONTROL1_1(Msg_C_1_1, int, bool)
44
45 // in1 must be false, out1 is true, out2 is 12
46 IPC_SYNC_MESSAGE_CONTROL1_2(Msg_C_1_2, bool, bool, int)
47
48 // in1 must be 3, out1 is "1_3", out2 is 13, out3 is false
49 IPC_SYNC_MESSAGE_CONTROL1_3(Msg_C_1_3, int, std::string, int, bool)
50
51 // in1 must be 1, in2 must be false, out1 is true
52 IPC_SYNC_MESSAGE_CONTROL2_1(Msg_C_2_1, int, bool, bool)
53
54 // in1 must be false, in2 must be 2, out1 is true, out2 is 22
55 IPC_SYNC_MESSAGE_CONTROL2_2(Msg_C_2_2, bool, int, bool, int)
56
57 // in1 must be 3, in2 must be true, out1 is "2_3", out2 is 23, out3 is false
58 IPC_SYNC_MESSAGE_CONTROL2_3(Msg_C_2_3, int, bool, std::string, int, bool)
59
60 // in1 must be 1, in2 must be false, in3 must be "3_1", out1 is true
61 IPC_SYNC_MESSAGE_CONTROL3_1(Msg_C_3_1, int, bool, std::string, bool)
62
63 // in1 must be "3_3", in2 must be false, in3 must be 2, out1 is true, out2 is 32
64 IPC_SYNC_MESSAGE_CONTROL3_2(Msg_C_3_2, std::string, bool, int, bool, int)
65
66 // in1 must be 3, in2 must be "3_3", in3 must be true, out1 is "3_3", out2 is 33, out3 is false
67 IPC_SYNC_MESSAGE_CONTROL3_3(Msg_C_3_3, int, std::string, bool, std::string, int, bool)
68
69
70 // NOTE: routed messages are just a copy of the above...
71
72 // out1 is false
73 IPC_SYNC_MESSAGE_ROUTED0_1(Msg_R_0_1, bool)
74
75 // out1 is true, out2 is 2
76 IPC_SYNC_MESSAGE_ROUTED0_2(Msg_R_0_2, bool, int)
77
78 // out1 is false, out2 is 3, out3 is "0_3"
79 IPC_SYNC_MESSAGE_ROUTED0_3(Msg_R_0_3, bool, int, std::string)
80
81 // in1 must be 1, out1 is true
82 IPC_SYNC_MESSAGE_ROUTED1_1(Msg_R_1_1, int, bool)
83
84 // in1 must be false, out1 is true, out2 is 12
85 IPC_SYNC_MESSAGE_ROUTED1_2(Msg_R_1_2, bool, bool, int)
86
87 // in1 must be 3, out1 is "1_3", out2 is 13, out3 is false
88 IPC_SYNC_MESSAGE_ROUTED1_3(Msg_R_1_3, int, std::string, int, bool)
89
90 // in1 must be 1, in2 must be false, out1 is true
91 IPC_SYNC_MESSAGE_ROUTED2_1(Msg_R_2_1, int, bool, bool)
92
93 // in1 must be false, in2 must be 2, out1 is true, out2 is 22
94 IPC_SYNC_MESSAGE_ROUTED2_2(Msg_R_2_2, bool, int, bool, int)
95
96 // in1 must be 3, in2 must be true, out1 is "2_3", out2 is 23, out3 is false
97 IPC_SYNC_MESSAGE_ROUTED2_3(Msg_R_2_3, int, bool, std::string, int, bool)
98
99 // in1 must be 1, in2 must be false, in3 must be "3_1", out1 is true
100 IPC_SYNC_MESSAGE_ROUTED3_1(Msg_R_3_1, int, bool, std::string, bool)
101
102 // in1 must be "3_3", in2 must be false, in3 must be 2, out1 is true, out2 is 32
103 IPC_SYNC_MESSAGE_ROUTED3_2(Msg_R_3_2, std::string, bool, int, bool, int)
104
105 // in1 must be 3, in2 must be "3_3", in3 must be true, out1 is "3_3", out2 is 33, out3 is false
106 IPC_SYNC_MESSAGE_ROUTED3_3(Msg_R_3_3, int, std::string, bool, std::string, int, bool)
107
108IPC_END_MESSAGES(TestMsg)