| 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 // This header is meant to be included in multiple passes, hence no traditional | 5 // This header is meant to be included in multiple passes, hence no traditional |
| 6 // header guard. | 6 // header guard. |
| 7 // | 7 // |
| 8 // In the first pass, IPC_MESSAGE_MACROS_ENUMS should be defined, which will | 8 // In your XXX_messages_internal.h file, before defining any messages do: |
| 9 // create enums for each of the messages defined with the IPC_MESSAGE_* macros. | 9 // #define IPC_MESSAGE_START XMsgStart |
| 10 // | 10 // XMstStart value is from the IPCMessageStart enum in ipc_message_utils.h, and |
| 11 // In the second pass, either IPC_MESSAGE_MACROS_DEBUGSTRINGS or | 11 // needs to be unique for each different file. |
| 12 // IPC_MESSAGE_MACROS_CLASSES should be defined (if both, DEBUGSTRINGS takes | 12 // In your XXX_messages.cc file, after all the includes for param types: |
| 13 // precedence). Only one .cc file should have DEBUGSTRINGS defined, as this | 13 // #define IPC_MESSAGE_IMPL |
| 14 // will create helper functions mapping message types to strings. Having | 14 // #include "X_messages.h" |
| 15 // CLASSES defined will create classes for each of the messages defined with | |
| 16 // the IPC_MESSAGE_* macros. | |
| 17 // | 15 // |
| 18 // "Sync" messages are just synchronous calls, the Send() call doesn't return | 16 // "Sync" messages are just synchronous calls, the Send() call doesn't return |
| 19 // until a reply comes back. Input parameters are first (const TYPE&), and | 17 // until a reply comes back. Input parameters are first (const TYPE&), and |
| 20 // To declare a sync message, use the IPC_SYNC_ macros. The numbers at the | 18 // To declare a sync message, use the IPC_SYNC_ macros. The numbers at the |
| 21 // end show how many input/output parameters there are (i.e. 1_2 is 1 in, 2 | 19 // end show how many input/output parameters there are (i.e. 1_2 is 1 in, 2 |
| 22 // out). The caller does a Send([route id, ], in1, &out1, &out2). | 20 // out). The caller does a Send([route id, ], in1, &out1, &out2). |
| 23 // The receiver's handler function will be | 21 // The receiver's handler function will be |
| 24 // void OnSyncMessageName(const type1& in1, type2* out1, type3* out2) | 22 // void OnSyncMessageName(const type1& in1, type2* out1, type3* out2) |
| 25 // | 23 // |
| 26 // | 24 // |
| 27 // A caller can also send a synchronous message, while the receiver can respond | 25 // A caller can also send a synchronous message, while the receiver can respond |
| 28 // at a later time. This is transparent from the sender's side. The receiver | 26 // at a later time. This is transparent from the sender's side. The receiver |
| 29 // needs to use a different handler that takes in a IPC::Message* as the output | 27 // needs to use a different handler that takes in a IPC::Message* as the output |
| 30 // type, stash the message, and when it has the data it can Send the message. | 28 // type, stash the message, and when it has the data it can Send the message. |
| 31 // | 29 // |
| 32 // Use the IPC_MESSAGE_HANDLER_DELAY_REPLY macro instead of IPC_MESSAGE_HANDLER | 30 // Use the IPC_MESSAGE_HANDLER_DELAY_REPLY macro instead of IPC_MESSAGE_HANDLER |
| 33 // IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_SyncMessageName, | 31 // IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_SyncMessageName, |
| 34 // OnSyncMessageName) | 32 // OnSyncMessageName) |
| 35 // | 33 // |
| 36 // The handler function will look like: | 34 // The handler function will look like: |
| 37 // void OnSyncMessageName(const type1& in1, IPC::Message* reply_msg); | 35 // void OnSyncMessageName(const type1& in1, IPC::Message* reply_msg); |
| 38 // | 36 // |
| 39 // Receiver stashes the IPC::Message* pointer, and when it's ready, it does: | 37 // Receiver stashes the IPC::Message* pointer, and when it's ready, it does: |
| 40 // ViewHostMsg_SyncMessageName::WriteReplyParams(reply_msg, out1, out2); | 38 // ViewHostMsg_SyncMessageName::WriteReplyParams(reply_msg, out1, out2); |
| 41 // Send(reply_msg); | 39 // Send(reply_msg); |
| 42 | 40 |
| 43 #include "ipc/ipc_message_utils.h" | 41 #include "ipc/ipc_message_utils.h" |
| 44 | 42 |
| 45 | 43 // In case a file includes several X_messages.h files, we don't want to get |
| 46 #ifndef MESSAGES_INTERNAL_FILE | 44 // errors because each X_messages_internal.h file will define this. |
| 47 #error This file should only be included by X_messages.h, which needs to define\ | 45 #undef IPC_MESSAGE_START |
| 48 MESSAGES_INTERNAL_FILE first. | 46 |
| 47 #if defined(IPC_MESSAGE_IMPL) |
| 48 #include "ipc/ipc_message_impl_macros.h" |
| 49 #elif defined(IPC_MESSAGE_MACROS_LOG_ENABLED) |
| 50 |
| 51 #ifndef IPC_LOG_TABLE_CREATED |
| 52 #define IPC_LOG_TABLE_CREATED |
| 53 |
| 54 #include "base/hash_tables.h" |
| 55 |
| 56 typedef void (*LogFunction)(std::string* name, |
| 57 const IPC::Message* msg, |
| 58 std::string* params); |
| 59 |
| 60 typedef base::hash_map<uint32, LogFunction > LogFunctionMap; |
| 61 LogFunctionMap g_log_function_mapping; |
| 62 |
| 49 #endif | 63 #endif |
| 50 | 64 |
| 51 // Trick xcode into seeing the possible real dependencies since they | 65 |
| 52 // don't understand #include MESSAGES_INTERNAL_FILE. See http://crbug.com/7828 | 66 #define IPC_MESSAGE_LOG(msg_class) \ |
| 53 #if 0 | 67 class LoggerRegisterHelper##msg_class { \ |
| 54 #include "ipc/ipc_sync_message_unittest.h" | 68 public: \ |
| 55 #include "chrome/common/automation_messages_internal.h" | 69 LoggerRegisterHelper##msg_class() { \ |
| 56 #include "chrome/common/devtools_messages_internal.h" | 70 g_log_function_mapping[msg_class::ID] = msg_class::Log; \ |
| 57 #include "chrome/common/plugin_messages_internal.h" | 71 } \ |
| 58 #include "chrome/common/render_messages_internal.h" | 72 }; \ |
| 59 #include "chrome/common/worker_messages_internal.h" | 73 LoggerRegisterHelper##msg_class g_LoggerRegisterHelper##msg_class; |
| 60 #include "ppapi/proxy/ppapi_messages_internal.h" | 74 |
| 75 #define IPC_MESSAGE_CONTROL0_EXTRA(msg_class) \ |
| 76 IPC_MESSAGE_LOG(msg_class) |
| 77 |
| 78 #define IPC_MESSAGE_CONTROL1_EXTRA(msg_class, type1) \ |
| 79 IPC_MESSAGE_LOG(msg_class) |
| 80 |
| 81 #define IPC_MESSAGE_CONTROL2_EXTRA(msg_class, type1, type2) \ |
| 82 IPC_MESSAGE_LOG(msg_class) |
| 83 |
| 84 #define IPC_MESSAGE_CONTROL3_EXTRA(msg_class, type1, type2, type3) \ |
| 85 IPC_MESSAGE_LOG(msg_class) |
| 86 |
| 87 #define IPC_MESSAGE_CONTROL4_EXTRA(msg_class, type1, type2, type3, type4) \ |
| 88 IPC_MESSAGE_LOG(msg_class) |
| 89 |
| 90 #define IPC_MESSAGE_CONTROL5_EXTRA(msg_class, type1, type2, type3, type4, type5)
\ |
| 91 IPC_MESSAGE_LOG(msg_class) |
| 92 |
| 93 #define IPC_MESSAGE_ROUTED0_EXTRA(msg_class) \ |
| 94 IPC_MESSAGE_LOG(msg_class) |
| 95 |
| 96 #define IPC_MESSAGE_ROUTED1_EXTRA(msg_class, type1) \ |
| 97 IPC_MESSAGE_LOG(msg_class) |
| 98 |
| 99 #define IPC_MESSAGE_ROUTED2_EXTRA(msg_class, type1, type2) \ |
| 100 IPC_MESSAGE_LOG(msg_class) |
| 101 |
| 102 #define IPC_MESSAGE_ROUTED3_EXTRA(msg_class, type1, type2, type3) \ |
| 103 IPC_MESSAGE_LOG(msg_class) |
| 104 |
| 105 #define IPC_MESSAGE_ROUTED4_EXTRA(msg_class, type1, type2, type3, type4) \ |
| 106 IPC_MESSAGE_LOG(msg_class) |
| 107 |
| 108 #define IPC_MESSAGE_ROUTED5_EXTRA(msg_class, type1, type2, type3, type4, type5)
\ |
| 109 IPC_MESSAGE_LOG(msg_class) |
| 110 |
| 111 #define IPC_SYNC_MESSAGE_CONTROL0_0_EXTRA(msg_class) \ |
| 112 IPC_MESSAGE_LOG(msg_class) |
| 113 |
| 114 #define IPC_SYNC_MESSAGE_CONTROL0_1_EXTRA(msg_class, type1_out) \ |
| 115 IPC_MESSAGE_LOG(msg_class) |
| 116 |
| 117 #define IPC_SYNC_MESSAGE_CONTROL0_2_EXTRA(msg_class, type1_out, type2_out) \ |
| 118 IPC_MESSAGE_LOG(msg_class) |
| 119 |
| 120 #define IPC_SYNC_MESSAGE_CONTROL0_3_EXTRA(msg_class, type1_out, type2_out, type3
_out) \ |
| 121 IPC_MESSAGE_LOG(msg_class) |
| 122 |
| 123 #define IPC_SYNC_MESSAGE_CONTROL1_0_EXTRA(msg_class, type1_in) \ |
| 124 IPC_MESSAGE_LOG(msg_class) |
| 125 |
| 126 #define IPC_SYNC_MESSAGE_CONTROL1_1_EXTRA(msg_class, type1_in, type1_out) \ |
| 127 IPC_MESSAGE_LOG(msg_class) |
| 128 |
| 129 #define IPC_SYNC_MESSAGE_CONTROL1_2_EXTRA(msg_class, type1_in, type1_out, type2_
out) \ |
| 130 IPC_MESSAGE_LOG(msg_class) |
| 131 |
| 132 #define IPC_SYNC_MESSAGE_CONTROL1_3_EXTRA(msg_class, type1_in, type1_out, type2_
out, type3_out) \ |
| 133 IPC_MESSAGE_LOG(msg_class) |
| 134 |
| 135 #define IPC_SYNC_MESSAGE_CONTROL2_0_EXTRA(msg_class, type1_in, type2_in) \ |
| 136 IPC_MESSAGE_LOG(msg_class) |
| 137 |
| 138 #define IPC_SYNC_MESSAGE_CONTROL2_1_EXTRA(msg_class, type1_in, type2_in, type1_o
ut) \ |
| 139 IPC_MESSAGE_LOG(msg_class) |
| 140 |
| 141 #define IPC_SYNC_MESSAGE_CONTROL2_2_EXTRA(msg_class, type1_in, type2_in, type1_o
ut, type2_out) \ |
| 142 IPC_MESSAGE_LOG(msg_class) |
| 143 |
| 144 #define IPC_SYNC_MESSAGE_CONTROL2_3_EXTRA(msg_class, type1_in, type2_in, type1_o
ut, type2_out, type3_out) \ |
| 145 IPC_MESSAGE_LOG(msg_class) |
| 146 |
| 147 #define IPC_SYNC_MESSAGE_CONTROL3_1_EXTRA(msg_class, type1_in, type2_in, type3_i
n, type1_out) \ |
| 148 IPC_MESSAGE_LOG(msg_class) |
| 149 |
| 150 #define IPC_SYNC_MESSAGE_CONTROL3_2_EXTRA(msg_class, type1_in, type2_in, type3_i
n, type1_out, type2_out) \ |
| 151 IPC_MESSAGE_LOG(msg_class) |
| 152 |
| 153 #define IPC_SYNC_MESSAGE_CONTROL3_3_EXTRA(msg_class, type1_in, type2_in, type3_i
n, type1_out, type2_out, type3_out) \ |
| 154 IPC_MESSAGE_LOG(msg_class) |
| 155 |
| 156 #define IPC_SYNC_MESSAGE_CONTROL3_4_EXTRA(msg_class, type1_in, type2_in, type3_i
n, type1_out, type2_out, type3_out, type4_out) \ |
| 157 IPC_MESSAGE_LOG(msg_class) |
| 158 |
| 159 #define IPC_SYNC_MESSAGE_CONTROL4_1_EXTRA(msg_class, type1_in, type2_in, type3_i
n, type4_in, type1_out) \ |
| 160 IPC_MESSAGE_LOG(msg_class) |
| 161 |
| 162 #define IPC_SYNC_MESSAGE_CONTROL4_2_EXTRA(msg_class, type1_in, type2_in, type3_i
n, type4_in, type1_out, type2_out) \ |
| 163 IPC_MESSAGE_LOG(msg_class) |
| 164 |
| 165 #define IPC_SYNC_MESSAGE_ROUTED0_0_EXTRA(msg_class) \ |
| 166 IPC_MESSAGE_LOG(msg_class) |
| 167 |
| 168 #define IPC_SYNC_MESSAGE_ROUTED0_1_EXTRA(msg_class, type1_out) \ |
| 169 IPC_MESSAGE_LOG(msg_class) |
| 170 |
| 171 #define IPC_SYNC_MESSAGE_ROUTED0_2_EXTRA(msg_class, type1_out, type2_out) \ |
| 172 IPC_MESSAGE_LOG(msg_class) |
| 173 |
| 174 #define IPC_SYNC_MESSAGE_ROUTED0_3_EXTRA(msg_class, type1_out, type2_out, type3_
out) \ |
| 175 IPC_MESSAGE_LOG(msg_class) |
| 176 |
| 177 #define IPC_SYNC_MESSAGE_ROUTED1_0_EXTRA(msg_class, type1_in) \ |
| 178 IPC_MESSAGE_LOG(msg_class) |
| 179 |
| 180 #define IPC_SYNC_MESSAGE_ROUTED1_1_EXTRA(msg_class, type1_in, type1_out) \ |
| 181 IPC_MESSAGE_LOG(msg_class) |
| 182 |
| 183 #define IPC_SYNC_MESSAGE_ROUTED1_2_EXTRA(msg_class, type1_in, type1_out, type2_o
ut) \ |
| 184 IPC_MESSAGE_LOG(msg_class) |
| 185 |
| 186 #define IPC_SYNC_MESSAGE_ROUTED1_3_EXTRA(msg_class, type1_in, type1_out, type2_o
ut, type3_out) \ |
| 187 IPC_MESSAGE_LOG(msg_class) |
| 188 |
| 189 #define IPC_SYNC_MESSAGE_ROUTED1_4_EXTRA(msg_class, type1_in, type1_out, type2_o
ut, type3_out, type4_out) \ |
| 190 IPC_MESSAGE_LOG(msg_class) |
| 191 |
| 192 #define IPC_SYNC_MESSAGE_ROUTED2_0_EXTRA(msg_class, type1_in, type2_in) \ |
| 193 IPC_MESSAGE_LOG(msg_class) |
| 194 |
| 195 #define IPC_SYNC_MESSAGE_ROUTED2_1_EXTRA(msg_class, type1_in, type2_in, type1_ou
t) \ |
| 196 IPC_MESSAGE_LOG(msg_class) |
| 197 |
| 198 #define IPC_SYNC_MESSAGE_ROUTED2_2_EXTRA(msg_class, type1_in, type2_in, type1_ou
t, type2_out) \ |
| 199 IPC_MESSAGE_LOG(msg_class) |
| 200 |
| 201 #define IPC_SYNC_MESSAGE_ROUTED2_3_EXTRA(msg_class, type1_in, type2_in, type1_ou
t, type2_out, type3_out) \ |
| 202 IPC_MESSAGE_LOG(msg_class) |
| 203 |
| 204 #define IPC_SYNC_MESSAGE_ROUTED3_0_EXTRA(msg_class, type1_in, type2_in, type3_in
) \ |
| 205 IPC_MESSAGE_LOG(msg_class) |
| 206 |
| 207 #define IPC_SYNC_MESSAGE_ROUTED3_1_EXTRA(msg_class, type1_in, type2_in, type3_in
, type1_out) \ |
| 208 IPC_MESSAGE_LOG(msg_class) |
| 209 |
| 210 #define IPC_SYNC_MESSAGE_ROUTED3_2_EXTRA(msg_class, type1_in, type2_in, type3_in
, type1_out, type2_out) \ |
| 211 IPC_MESSAGE_LOG(msg_class) |
| 212 |
| 213 #define IPC_SYNC_MESSAGE_ROUTED3_3_EXTRA(msg_class, type1_in, type2_in, type3_in
, type1_out, type2_out, type3_out) \ |
| 214 IPC_MESSAGE_LOG(msg_class) |
| 215 |
| 216 #define IPC_SYNC_MESSAGE_ROUTED3_4_EXTRA(msg_class, type1_in, type2_in, type3_in
, type1_out, type2_out, type3_out, type4_out) \ |
| 217 IPC_MESSAGE_LOG(msg_class) |
| 218 |
| 219 #define IPC_SYNC_MESSAGE_ROUTED4_0_EXTRA(msg_class, type1_in, type2_in, type3_in
, type4_in) \ |
| 220 IPC_MESSAGE_LOG(msg_class) |
| 221 |
| 222 #define IPC_SYNC_MESSAGE_ROUTED4_1_EXTRA(msg_class, type1_in, type2_in, type3_in
, type4_in, type1_out) \ |
| 223 IPC_MESSAGE_LOG(msg_class) |
| 224 |
| 225 #define IPC_SYNC_MESSAGE_ROUTED4_2_EXTRA(msg_class, type1_in, type2_in, type3_in
, type4_in, type1_out, type2_out) \ |
| 226 IPC_MESSAGE_LOG(msg_class) |
| 227 |
| 228 #define IPC_SYNC_MESSAGE_ROUTED4_3_EXTRA(msg_class, type1_in, type2_in, type3_in
, type4_in, type1_out, type2_out, type3_out) \ |
| 229 IPC_MESSAGE_LOG(msg_class) |
| 230 |
| 231 #define IPC_SYNC_MESSAGE_ROUTED5_0_EXTRA(msg_class, type1_in, type2_in, type3_in
, type4_in, type5_in) \ |
| 232 IPC_MESSAGE_LOG(msg_class) |
| 233 |
| 234 #define IPC_SYNC_MESSAGE_ROUTED5_1_EXTRA(msg_class, type1_in, type2_in, type3_in
, type4_in, type5_in, type1_out) \ |
| 235 IPC_MESSAGE_LOG(msg_class) |
| 236 |
| 237 #define IPC_SYNC_MESSAGE_ROUTED5_2_EXTRA(msg_class, type1_in, type2_in, type3_in
, type4_in, type5_in, type1_out, type2_out) \ |
| 238 IPC_MESSAGE_LOG(msg_class) |
| 239 |
| 240 #define IPC_SYNC_MESSAGE_ROUTED5_3_EXTRA(msg_class, type1_in, type2_in, type3_in
, type4_in, type5_in, type1_out, type2_out, type3_out) \ |
| 241 IPC_MESSAGE_LOG(msg_class) |
| 242 |
| 243 #else |
| 244 |
| 245 #define IPC_MESSAGE_CONTROL0_EXTRA(msg_class) |
| 246 #define IPC_MESSAGE_CONTROL1_EXTRA(msg_class, type1) |
| 247 #define IPC_MESSAGE_CONTROL2_EXTRA(msg_class, type1, type2) |
| 248 #define IPC_MESSAGE_CONTROL3_EXTRA(msg_class, type1, type2, type3) |
| 249 #define IPC_MESSAGE_CONTROL4_EXTRA(msg_class, type1, type2, type3, type4) |
| 250 #define IPC_MESSAGE_CONTROL5_EXTRA(msg_class, type1, type2, type3, type4, type5) |
| 251 #define IPC_MESSAGE_ROUTED0_EXTRA(msg_class) |
| 252 #define IPC_MESSAGE_ROUTED1_EXTRA(msg_class, type1) |
| 253 #define IPC_MESSAGE_ROUTED2_EXTRA(msg_class, type1, type2) |
| 254 #define IPC_MESSAGE_ROUTED3_EXTRA(msg_class, type1, type2, type3) |
| 255 #define IPC_MESSAGE_ROUTED4_EXTRA(msg_class, type1, type2, type3, type4) |
| 256 #define IPC_MESSAGE_ROUTED5_EXTRA(msg_class, type1, type2, type3, type4, type5) |
| 257 #define IPC_SYNC_MESSAGE_CONTROL0_0_EXTRA(msg_class) |
| 258 #define IPC_SYNC_MESSAGE_CONTROL0_1_EXTRA(msg_class, type1_out) |
| 259 #define IPC_SYNC_MESSAGE_CONTROL0_2_EXTRA(msg_class, type1_out, type2_out) |
| 260 #define IPC_SYNC_MESSAGE_CONTROL0_3_EXTRA(msg_class, type1_out, type2_out, type3
_out) |
| 261 #define IPC_SYNC_MESSAGE_CONTROL1_0_EXTRA(msg_class, type1_in) |
| 262 #define IPC_SYNC_MESSAGE_CONTROL1_1_EXTRA(msg_class, type1_in, type1_out) |
| 263 #define IPC_SYNC_MESSAGE_CONTROL1_2_EXTRA(msg_class, type1_in, type1_out, type2_
out) |
| 264 #define IPC_SYNC_MESSAGE_CONTROL1_3_EXTRA(msg_class, type1_in, type1_out, type2_
out, type3_out) |
| 265 #define IPC_SYNC_MESSAGE_CONTROL2_0_EXTRA(msg_class, type1_in, type2_in) |
| 266 #define IPC_SYNC_MESSAGE_CONTROL2_1_EXTRA(msg_class, type1_in, type2_in, type1_o
ut) |
| 267 #define IPC_SYNC_MESSAGE_CONTROL2_2_EXTRA(msg_class, type1_in, type2_in, type1_o
ut, type2_out) |
| 268 #define IPC_SYNC_MESSAGE_CONTROL2_3_EXTRA(msg_class, type1_in, type2_in, type1_o
ut, type2_out, type3_out) |
| 269 #define IPC_SYNC_MESSAGE_CONTROL3_1_EXTRA(msg_class, type1_in, type2_in, type3_i
n, type1_out) |
| 270 #define IPC_SYNC_MESSAGE_CONTROL3_2_EXTRA(msg_class, type1_in, type2_in, type3_i
n, type1_out, type2_out) |
| 271 #define IPC_SYNC_MESSAGE_CONTROL3_3_EXTRA(msg_class, type1_in, type2_in, type3_i
n, type1_out, type2_out, type3_out) |
| 272 #define IPC_SYNC_MESSAGE_CONTROL3_4_EXTRA(msg_class, type1_in, type2_in, type3_i
n, type1_out, type2_out, type3_out, type4_out) |
| 273 #define IPC_SYNC_MESSAGE_CONTROL4_1_EXTRA(msg_class, type1_in, type2_in, type3_i
n, type4_in, type1_out) |
| 274 #define IPC_SYNC_MESSAGE_CONTROL4_2_EXTRA(msg_class, type1_in, type2_in, type3_i
n, type4_in, type1_out, type2_out) |
| 275 #define IPC_SYNC_MESSAGE_ROUTED0_0_EXTRA(msg_class) |
| 276 #define IPC_SYNC_MESSAGE_ROUTED0_1_EXTRA(msg_class, type1_out) |
| 277 #define IPC_SYNC_MESSAGE_ROUTED0_2_EXTRA(msg_class, type1_out, type2_out) |
| 278 #define IPC_SYNC_MESSAGE_ROUTED0_3_EXTRA(msg_class, type1_out, type2_out, type3_
out) |
| 279 #define IPC_SYNC_MESSAGE_ROUTED1_0_EXTRA(msg_class, type1_in) |
| 280 #define IPC_SYNC_MESSAGE_ROUTED1_1_EXTRA(msg_class, type1_in, type1_out) |
| 281 #define IPC_SYNC_MESSAGE_ROUTED1_2_EXTRA(msg_class, type1_in, type1_out, type2_o
ut) |
| 282 #define IPC_SYNC_MESSAGE_ROUTED1_3_EXTRA(msg_class, type1_in, type1_out, type2_o
ut, type3_out) |
| 283 #define IPC_SYNC_MESSAGE_ROUTED1_4_EXTRA(msg_class, type1_in, type1_out, type2_o
ut, type3_out, type4_out) |
| 284 #define IPC_SYNC_MESSAGE_ROUTED2_0_EXTRA(msg_class, type1_in, type2_in) |
| 285 #define IPC_SYNC_MESSAGE_ROUTED2_1_EXTRA(msg_class, type1_in, type2_in, type1_ou
t) |
| 286 #define IPC_SYNC_MESSAGE_ROUTED2_2_EXTRA(msg_class, type1_in, type2_in, type1_ou
t, type2_out) |
| 287 #define IPC_SYNC_MESSAGE_ROUTED2_3_EXTRA(msg_class, type1_in, type2_in, type1_ou
t, type2_out, type3_out) |
| 288 #define IPC_SYNC_MESSAGE_ROUTED3_0_EXTRA(msg_class, type1_in, type2_in, type3_in
) |
| 289 #define IPC_SYNC_MESSAGE_ROUTED3_1_EXTRA(msg_class, type1_in, type2_in, type3_in
, type1_out) |
| 290 #define IPC_SYNC_MESSAGE_ROUTED3_2_EXTRA(msg_class, type1_in, type2_in, type3_in
, type1_out, type2_out) |
| 291 #define IPC_SYNC_MESSAGE_ROUTED3_3_EXTRA(msg_class, type1_in, type2_in, type3_in
, type1_out, type2_out, type3_out) |
| 292 #define IPC_SYNC_MESSAGE_ROUTED3_4_EXTRA(msg_class, type1_in, type2_in, type3_in
, type1_out, type2_out, type3_out, type4_out) |
| 293 #define IPC_SYNC_MESSAGE_ROUTED4_0_EXTRA(msg_class, type1_in, type2_in, type3_in
, type4_in) |
| 294 #define IPC_SYNC_MESSAGE_ROUTED4_1_EXTRA(msg_class, type1_in, type2_in, type3_in
, type4_in, type1_out) |
| 295 #define IPC_SYNC_MESSAGE_ROUTED4_2_EXTRA(msg_class, type1_in, type2_in, type3_in
, type4_in, type1_out, type2_out) |
| 296 #define IPC_SYNC_MESSAGE_ROUTED4_3_EXTRA(msg_class, type1_in, type2_in, type3_in
, type4_in, type1_out, type2_out, type3_out) |
| 297 #define IPC_SYNC_MESSAGE_ROUTED5_0_EXTRA(msg_class, type1_in, type2_in, type3_in
, type4_in, type5_in) |
| 298 #define IPC_SYNC_MESSAGE_ROUTED5_1_EXTRA(msg_class, type1_in, type2_in, type3_in
, type4_in, type5_in, type1_out) |
| 299 #define IPC_SYNC_MESSAGE_ROUTED5_2_EXTRA(msg_class, type1_in, type2_in, type3_in
, type4_in, type5_in, type1_out, type2_out) |
| 300 #define IPC_SYNC_MESSAGE_ROUTED5_3_EXTRA(msg_class, type1_in, type2_in, type3_in
, type4_in, type5_in, type1_out, type2_out, type3_out) |
| 301 |
| 61 #endif | 302 #endif |
| 62 | 303 |
| 63 #ifndef IPC_MESSAGE_MACROS_INCLUDE_BLOCK | 304 // Note: we currently use __LINE__ to give unique IDs to messages within a file. |
| 64 #define IPC_MESSAGE_MACROS_INCLUDE_BLOCK | 305 // They're globally unique since each file defines its own IPC_MESSAGE_START. |
| 65 | 306 // Ideally, we wouldn't use line numbers, but instead use the __COUNTER__ macro, |
| 66 // Multi-pass include of X_messages_internal.h. Preprocessor magic allows | 307 // but it needs gcc 4.3 and xcode doesn't use it yet. When that happens, switch |
| 67 // us to use 1 header to define the enums and classes for our render messages. | 308 // to it. |
| 68 #define IPC_MESSAGE_MACROS_ENUMS | |
| 69 #include MESSAGES_INTERNAL_FILE | |
| 70 | |
| 71 #define IPC_MESSAGE_MACROS_CLASSES | |
| 72 #include MESSAGES_INTERNAL_FILE | |
| 73 | |
| 74 #ifdef IPC_MESSAGE_MACROS_LOG_ENABLED | |
| 75 #define IPC_MESSAGE_MACROS_LOG | |
| 76 #include MESSAGES_INTERNAL_FILE | |
| 77 #endif | |
| 78 | |
| 79 #undef MESSAGES_INTERNAL_FILE | |
| 80 #undef IPC_MESSAGE_MACROS_INCLUDE_BLOCK | |
| 81 | |
| 82 #endif | |
| 83 | |
| 84 #if defined(IPC_MESSAGE_MACROS_ENUMS) | |
| 85 #undef IPC_MESSAGE_MACROS_ENUMS | |
| 86 | |
| 87 | |
| 88 // Undefine the macros from the previous pass (if any). | |
| 89 #undef IPC_BEGIN_MESSAGES | |
| 90 #undef IPC_END_MESSAGES | |
| 91 #undef IPC_MESSAGE_CONTROL0 | |
| 92 #undef IPC_MESSAGE_CONTROL1 | |
| 93 #undef IPC_MESSAGE_CONTROL2 | |
| 94 #undef IPC_MESSAGE_CONTROL3 | |
| 95 #undef IPC_MESSAGE_CONTROL4 | |
| 96 #undef IPC_MESSAGE_CONTROL5 | |
| 97 #undef IPC_MESSAGE_ROUTED0 | |
| 98 #undef IPC_MESSAGE_ROUTED1 | |
| 99 #undef IPC_MESSAGE_ROUTED2 | |
| 100 #undef IPC_MESSAGE_ROUTED3 | |
| 101 #undef IPC_MESSAGE_ROUTED4 | |
| 102 #undef IPC_MESSAGE_ROUTED5 | |
| 103 #undef IPC_SYNC_MESSAGE_CONTROL0_0 | |
| 104 #undef IPC_SYNC_MESSAGE_CONTROL0_1 | |
| 105 #undef IPC_SYNC_MESSAGE_CONTROL0_2 | |
| 106 #undef IPC_SYNC_MESSAGE_CONTROL0_3 | |
| 107 #undef IPC_SYNC_MESSAGE_CONTROL1_0 | |
| 108 #undef IPC_SYNC_MESSAGE_CONTROL1_1 | |
| 109 #undef IPC_SYNC_MESSAGE_CONTROL1_2 | |
| 110 #undef IPC_SYNC_MESSAGE_CONTROL1_3 | |
| 111 #undef IPC_SYNC_MESSAGE_CONTROL2_0 | |
| 112 #undef IPC_SYNC_MESSAGE_CONTROL2_1 | |
| 113 #undef IPC_SYNC_MESSAGE_CONTROL2_2 | |
| 114 #undef IPC_SYNC_MESSAGE_CONTROL2_3 | |
| 115 #undef IPC_SYNC_MESSAGE_CONTROL3_1 | |
| 116 #undef IPC_SYNC_MESSAGE_CONTROL3_2 | |
| 117 #undef IPC_SYNC_MESSAGE_CONTROL3_3 | |
| 118 #undef IPC_SYNC_MESSAGE_CONTROL3_4 | |
| 119 #undef IPC_SYNC_MESSAGE_CONTROL4_1 | |
| 120 #undef IPC_SYNC_MESSAGE_CONTROL4_2 | |
| 121 #undef IPC_SYNC_MESSAGE_ROUTED0_0 | |
| 122 #undef IPC_SYNC_MESSAGE_ROUTED0_1 | |
| 123 #undef IPC_SYNC_MESSAGE_ROUTED0_2 | |
| 124 #undef IPC_SYNC_MESSAGE_ROUTED0_3 | |
| 125 #undef IPC_SYNC_MESSAGE_ROUTED1_0 | |
| 126 #undef IPC_SYNC_MESSAGE_ROUTED1_1 | |
| 127 #undef IPC_SYNC_MESSAGE_ROUTED1_2 | |
| 128 #undef IPC_SYNC_MESSAGE_ROUTED1_3 | |
| 129 #undef IPC_SYNC_MESSAGE_ROUTED1_4 | |
| 130 #undef IPC_SYNC_MESSAGE_ROUTED2_0 | |
| 131 #undef IPC_SYNC_MESSAGE_ROUTED2_1 | |
| 132 #undef IPC_SYNC_MESSAGE_ROUTED2_2 | |
| 133 #undef IPC_SYNC_MESSAGE_ROUTED2_3 | |
| 134 #undef IPC_SYNC_MESSAGE_ROUTED3_0 | |
| 135 #undef IPC_SYNC_MESSAGE_ROUTED3_1 | |
| 136 #undef IPC_SYNC_MESSAGE_ROUTED3_2 | |
| 137 #undef IPC_SYNC_MESSAGE_ROUTED3_3 | |
| 138 #undef IPC_SYNC_MESSAGE_ROUTED3_4 | |
| 139 #undef IPC_SYNC_MESSAGE_ROUTED4_0 | |
| 140 #undef IPC_SYNC_MESSAGE_ROUTED4_1 | |
| 141 #undef IPC_SYNC_MESSAGE_ROUTED4_2 | |
| 142 #undef IPC_SYNC_MESSAGE_ROUTED4_3 | |
| 143 #undef IPC_SYNC_MESSAGE_ROUTED5_0 | |
| 144 #undef IPC_SYNC_MESSAGE_ROUTED5_1 | |
| 145 #undef IPC_SYNC_MESSAGE_ROUTED5_2 | |
| 146 #undef IPC_SYNC_MESSAGE_ROUTED5_3 | |
| 147 | |
| 148 // We're using the lowest 16 bits of type for the message id, and the highest | |
| 149 // 16 bits for the channel type. | |
| 150 // | |
| 151 // Do label##PreStart so that automation messages keep the same id as before. | |
| 152 #define IPC_BEGIN_MESSAGES(label) \ | |
| 153 enum label##MsgType { \ | |
| 154 label##Start = label##MsgStart << 16, \ | |
| 155 label##PreStart = (label##MsgStart << 16) - 1, | |
| 156 | |
| 157 #define IPC_END_MESSAGES(label) \ | |
| 158 label##End \ | |
| 159 }; | |
| 160 | 309 |
| 161 #define IPC_MESSAGE_CONTROL0(msg_class) \ | 310 #define IPC_MESSAGE_CONTROL0(msg_class) \ |
| 162 msg_class##__ID, | 311 class msg_class : public IPC::Message { \ |
| 312 public: \ |
| 313 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 314 msg_class() \ |
| 315 : IPC::Message(MSG_ROUTING_CONTROL, \ |
| 316 ID, \ |
| 317 PRIORITY_NORMAL) {} \ |
| 318 }; \ |
| 319 IPC_MESSAGE_CONTROL0_EXTRA(msg_class) |
| 163 | 320 |
| 164 #define IPC_MESSAGE_CONTROL1(msg_class, type1) \ | 321 #define IPC_MESSAGE_CONTROL1(msg_class, type1) \ |
| 165 msg_class##__ID, | 322 class msg_class : public IPC::MessageWithTuple< Tuple1<type1> > { \ |
| 166 | 323 public: \ |
| 167 #define IPC_MESSAGE_CONTROL2(msg_class, type1, type2) \ | 324 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 168 msg_class##__ID, | 325 msg_class(const type1& arg1); \ |
| 169 | 326 ~msg_class(); \ |
| 170 #define IPC_MESSAGE_CONTROL3(msg_class, type1, type2, type3) \ | 327 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 171 msg_class##__ID, | 328 }; \ |
| 172 | 329 IPC_MESSAGE_CONTROL1_EXTRA(msg_class, type1) |
| 173 #define IPC_MESSAGE_CONTROL4(msg_class, type1, type2, type3, type4) \ | 330 |
| 174 msg_class##__ID, | 331 #define IPC_MESSAGE_CONTROL2(msg_class, type1, type2) \ |
| 332 class msg_class : public IPC::MessageWithTuple< Tuple2<type1, type2> > { \ |
| 333 public: \ |
| 334 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 335 msg_class(const type1& arg1, const type2& arg2); \ |
| 336 ~msg_class(); \ |
| 337 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 338 }; \ |
| 339 IPC_MESSAGE_CONTROL2_EXTRA(msg_class, type1, type2) |
| 340 |
| 341 #define IPC_MESSAGE_CONTROL3(msg_class, type1, type2, type3) \ |
| 342 class msg_class : \ |
| 343 public IPC::MessageWithTuple< Tuple3<type1, type2, type3> > { \ |
| 344 public: \ |
| 345 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 346 msg_class(const type1& arg1, const type2& arg2, const type3& arg3); \ |
| 347 ~msg_class(); \ |
| 348 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 349 }; \ |
| 350 IPC_MESSAGE_CONTROL3_EXTRA(msg_class, type1, type2, type3) |
| 351 |
| 352 #define IPC_MESSAGE_CONTROL4(msg_class, type1, type2, type3, type4) \ |
| 353 class msg_class : \ |
| 354 public IPC::MessageWithTuple< Tuple4<type1, type2, type3, type4> > { \ |
| 355 public: \ |
| 356 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 357 msg_class(const type1& arg1, const type2& arg2, const type3& arg3, \ |
| 358 const type4& arg4); \ |
| 359 ~msg_class(); \ |
| 360 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 361 }; \ |
| 362 IPC_MESSAGE_CONTROL4_EXTRA(msg_class, type1, type2, type3, type4) |
| 175 | 363 |
| 176 #define IPC_MESSAGE_CONTROL5(msg_class, type1, type2, type3, type4, type5) \ | 364 #define IPC_MESSAGE_CONTROL5(msg_class, type1, type2, type3, type4, type5) \ |
| 177 msg_class##__ID, | 365 class msg_class : \ |
| 366 public IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, \ |
| 367 type5> > { \ |
| 368 public: \ |
| 369 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 370 msg_class(const type1& arg1, const type2& arg2, \ |
| 371 const type3& arg3, const type4& arg4, const type5& arg5); \ |
| 372 ~msg_class(); \ |
| 373 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 374 }; \ |
| 375 IPC_MESSAGE_CONTROL5_EXTRA(msg_class, type1, type2, type3, type4, type5) |
| 178 | 376 |
| 179 #define IPC_MESSAGE_ROUTED0(msg_class) \ | 377 #define IPC_MESSAGE_ROUTED0(msg_class) \ |
| 180 msg_class##__ID, | 378 class msg_class : public IPC::Message { \ |
| 379 public: \ |
| 380 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 381 msg_class(int32 routing_id) \ |
| 382 : IPC::Message(routing_id, ID, PRIORITY_NORMAL) {} \ |
| 383 }; \ |
| 384 IPC_MESSAGE_ROUTED0_EXTRA(msg_class) |
| 181 | 385 |
| 182 #define IPC_MESSAGE_ROUTED1(msg_class, type1) \ | 386 #define IPC_MESSAGE_ROUTED1(msg_class, type1) \ |
| 183 msg_class##__ID, | 387 class msg_class : public IPC::MessageWithTuple< Tuple1<type1> > { \ |
| 184 | 388 public: \ |
| 185 #define IPC_MESSAGE_ROUTED2(msg_class, type1, type2) \ | 389 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 186 msg_class##__ID, | 390 msg_class(int32 routing_id, const type1& arg1); \ |
| 187 | 391 ~msg_class(); \ |
| 188 #define IPC_MESSAGE_ROUTED3(msg_class, type1, type2, type3) \ | 392 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 189 msg_class##__ID, | 393 }; \ |
| 190 | 394 IPC_MESSAGE_ROUTED1_EXTRA(msg_class, type1) |
| 191 #define IPC_MESSAGE_ROUTED4(msg_class, type1, type2, type3, type4) \ | 395 |
| 192 msg_class##__ID, | 396 #define IPC_MESSAGE_ROUTED2(msg_class, type1, type2) \ |
| 397 class msg_class \ |
| 398 : public IPC::MessageWithTuple< Tuple2<type1, type2> > { \ |
| 399 public: \ |
| 400 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 401 msg_class(int32 routing_id, const type1& arg1, const type2& arg2); \ |
| 402 ~msg_class(); \ |
| 403 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 404 }; \ |
| 405 IPC_MESSAGE_ROUTED2_EXTRA(msg_class, type1, type2) |
| 406 |
| 407 #define IPC_MESSAGE_ROUTED3(msg_class, type1, type2, type3) \ |
| 408 class msg_class \ |
| 409 : public IPC::MessageWithTuple< Tuple3<type1, type2, type3> > { \ |
| 410 public: \ |
| 411 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 412 msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \ |
| 413 const type3& arg3); \ |
| 414 ~msg_class(); \ |
| 415 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 416 }; \ |
| 417 IPC_MESSAGE_ROUTED3_EXTRA(msg_class, type1, type2, type3) |
| 418 |
| 419 #define IPC_MESSAGE_ROUTED4(msg_class, type1, type2, type3, type4) \ |
| 420 class msg_class \ |
| 421 : public IPC::MessageWithTuple< Tuple4<type1, type2, type3, type4> > { \ |
| 422 public: \ |
| 423 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 424 msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \ |
| 425 const type3& arg3, const type4& arg4); \ |
| 426 ~msg_class(); \ |
| 427 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 428 }; \ |
| 429 IPC_MESSAGE_ROUTED4_EXTRA(msg_class, type1, type2, type3, type4) |
| 193 | 430 |
| 194 #define IPC_MESSAGE_ROUTED5(msg_class, type1, type2, type3, type4, type5) \ | 431 #define IPC_MESSAGE_ROUTED5(msg_class, type1, type2, type3, type4, type5) \ |
| 195 msg_class##__ID, | 432 class msg_class \ |
| 433 : public IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, \ |
| 434 type5> > { \ |
| 435 public: \ |
| 436 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 437 msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \ |
| 438 const type3& arg3, const type4& arg4, const type5& arg5); \ |
| 439 ~msg_class(); \ |
| 440 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 441 }; \ |
| 442 IPC_MESSAGE_ROUTED5_EXTRA(msg_class, type1, type2, type3, type4, type5) |
| 196 | 443 |
| 197 #define IPC_SYNC_MESSAGE_CONTROL0_0(msg_class) \ | 444 #define IPC_SYNC_MESSAGE_CONTROL0_0(msg_class) \ |
| 198 msg_class##__ID, | 445 class msg_class : public IPC::MessageWithReply<Tuple0, Tuple0 > { \ |
| 199 | 446 public: \ |
| 200 #define IPC_SYNC_MESSAGE_CONTROL0_1(msg_class, type1_out) \ | 447 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 201 msg_class##__ID, | 448 msg_class(); \ |
| 449 ~msg_class(); \ |
| 450 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 451 }; \ |
| 452 IPC_SYNC_MESSAGE_CONTROL0_0_EXTRA(msg_class) |
| 453 |
| 454 #define IPC_SYNC_MESSAGE_CONTROL0_1(msg_class, type1_out) \ |
| 455 class msg_class : public IPC::MessageWithReply<Tuple0, Tuple1<type1_out&> > {\ |
| 456 public: \ |
| 457 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 458 msg_class(type1_out* arg1); \ |
| 459 ~msg_class(); \ |
| 460 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 461 }; \ |
| 462 IPC_SYNC_MESSAGE_CONTROL0_1_EXTRA(msg_class, type1_out) |
| 202 | 463 |
| 203 #define IPC_SYNC_MESSAGE_CONTROL0_2(msg_class, type1_out, type2_out) \ | 464 #define IPC_SYNC_MESSAGE_CONTROL0_2(msg_class, type1_out, type2_out) \ |
| 204 msg_class##__ID, | 465 class msg_class : \ |
| 466 public IPC::MessageWithReply<Tuple0, Tuple2<type1_out&, type2_out&> > { \ |
| 467 public: \ |
| 468 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 469 msg_class(type1_out* arg1, type2_out* arg2); \ |
| 470 ~msg_class(); \ |
| 471 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 472 }; \ |
| 473 IPC_SYNC_MESSAGE_CONTROL0_2_EXTRA(msg_class, type1_out, type2_out) |
| 205 | 474 |
| 206 #define IPC_SYNC_MESSAGE_CONTROL0_3(msg_class, type1_out, type2_out, type3_out)
\ | 475 #define IPC_SYNC_MESSAGE_CONTROL0_3(msg_class, type1_out, type2_out, type3_out)
\ |
| 207 msg_class##__ID, | 476 class msg_class : \ |
| 208 | 477 public IPC::MessageWithReply<Tuple0, \ |
| 209 #define IPC_SYNC_MESSAGE_CONTROL1_0(msg_class, type1_in) \ | 478 Tuple3<type1_out&, type2_out&, type3_out&> >{ \ |
| 210 msg_class##__ID, | 479 public: \ |
| 211 | 480 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 212 #define IPC_SYNC_MESSAGE_CONTROL1_1(msg_class, type1_in, type1_out) \ | 481 msg_class(type1_out* arg1, type2_out* arg2, type3_out* arg3); \ |
| 213 msg_class##__ID, | 482 ~msg_class(); \ |
| 483 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 484 }; \ |
| 485 IPC_SYNC_MESSAGE_CONTROL0_3_EXTRA(msg_class, type1_out, type2_out, type3_out) |
| 486 |
| 487 #define IPC_SYNC_MESSAGE_CONTROL1_0(msg_class, type1_in) \ |
| 488 class msg_class : \ |
| 489 public IPC::MessageWithReply<Tuple1<type1_in>, Tuple0 > { \ |
| 490 public: \ |
| 491 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 492 msg_class(const type1_in& arg1); \ |
| 493 ~msg_class(); \ |
| 494 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 495 }; \ |
| 496 IPC_SYNC_MESSAGE_CONTROL1_0_EXTRA(msg_class, type1_in) |
| 497 |
| 498 #define IPC_SYNC_MESSAGE_CONTROL1_1(msg_class, type1_in, type1_out) \ |
| 499 class msg_class : \ |
| 500 public IPC::MessageWithReply<Tuple1<type1_in>, Tuple1<type1_out&> > { \ |
| 501 public: \ |
| 502 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 503 msg_class(const type1_in& arg1, type1_out* arg2); \ |
| 504 ~msg_class(); \ |
| 505 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 506 }; \ |
| 507 IPC_SYNC_MESSAGE_CONTROL1_1_EXTRA(msg_class, type1_in, type1_out) |
| 214 | 508 |
| 215 #define IPC_SYNC_MESSAGE_CONTROL1_2(msg_class, type1_in, type1_out, type2_out) \ | 509 #define IPC_SYNC_MESSAGE_CONTROL1_2(msg_class, type1_in, type1_out, type2_out) \ |
| 216 msg_class##__ID, | 510 class msg_class : \ |
| 511 public IPC::MessageWithReply<Tuple1<type1_in>, Tuple2<type1_out&, type2_ou
t&> > { \ |
| 512 public: \ |
| 513 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 514 msg_class(const type1_in& arg1, type1_out* arg2, type2_out* arg3); \ |
| 515 ~msg_class(); \ |
| 516 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 517 }; \ |
| 518 IPC_SYNC_MESSAGE_CONTROL1_2_EXTRA(msg_class, type1_in, type1_out, type2_out) |
| 217 | 519 |
| 218 #define IPC_SYNC_MESSAGE_CONTROL1_3(msg_class, type1_in, type1_out, type2_out, t
ype3_out) \ | 520 #define IPC_SYNC_MESSAGE_CONTROL1_3(msg_class, type1_in, type1_out, type2_out, t
ype3_out) \ |
| 219 msg_class##__ID, | 521 class msg_class : \ |
| 220 | 522 public IPC::MessageWithReply<Tuple1<type1_in>, \ |
| 221 #define IPC_SYNC_MESSAGE_CONTROL2_0(msg_class, type1_in, type2_in) \ | 523 Tuple3<type1_out&, type2_out&, type3_out&> >{ \ |
| 222 msg_class##__ID, | 524 public: \ |
| 525 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 526 msg_class(const type1_in& arg1, type1_out* arg2, type2_out* arg3, type3_out*
arg4); \ |
| 527 ~msg_class(); \ |
| 528 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 529 }; \ |
| 530 IPC_SYNC_MESSAGE_CONTROL1_3_EXTRA(msg_class, type1_in, type1_out, type2_out, t
ype3_out) |
| 531 |
| 532 #define IPC_SYNC_MESSAGE_CONTROL2_0(msg_class, type1_in, type2_in) \ |
| 533 class msg_class : \ |
| 534 public IPC::MessageWithReply<Tuple2<type1_in, type2_in>, Tuple0 > { \ |
| 535 public: \ |
| 536 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 537 msg_class(const type1_in& arg1, const type2_in& arg2); \ |
| 538 ~msg_class(); \ |
| 539 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 540 }; \ |
| 541 IPC_SYNC_MESSAGE_CONTROL2_0_EXTRA(msg_class, type1_in, type2_in) |
| 223 | 542 |
| 224 #define IPC_SYNC_MESSAGE_CONTROL2_1(msg_class, type1_in, type2_in, type1_out) \ | 543 #define IPC_SYNC_MESSAGE_CONTROL2_1(msg_class, type1_in, type2_in, type1_out) \ |
| 225 msg_class##__ID, | 544 class msg_class : \ |
| 545 public IPC::MessageWithReply<Tuple2<type1_in, type2_in>, Tuple1<type1_out&
> > { \ |
| 546 public: \ |
| 547 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 548 msg_class(const type1_in& arg1, const type2_in& arg2, type1_out* arg3); \ |
| 549 ~msg_class(); \ |
| 550 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 551 }; \ |
| 552 IPC_SYNC_MESSAGE_CONTROL2_1_EXTRA(msg_class, type1_in, type2_in, type1_out) |
| 226 | 553 |
| 227 #define IPC_SYNC_MESSAGE_CONTROL2_2(msg_class, type1_in, type2_in, type1_out, ty
pe2_out) \ | 554 #define IPC_SYNC_MESSAGE_CONTROL2_2(msg_class, type1_in, type2_in, type1_out, ty
pe2_out) \ |
| 228 msg_class##__ID, | 555 class msg_class : \ |
| 556 public IPC::MessageWithReply<Tuple2<type1_in, type2_in>, \ |
| 557 Tuple2<type1_out&, type2_out&> > { \ |
| 558 public: \ |
| 559 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 560 msg_class(const type1_in& arg1, const type2_in& arg2, type1_out* arg3, type2
_out* arg4); \ |
| 561 ~msg_class(); \ |
| 562 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 563 }; \ |
| 564 IPC_SYNC_MESSAGE_CONTROL2_2_EXTRA(msg_class, type1_in, type2_in, type1_out, ty
pe2_out) |
| 229 | 565 |
| 230 #define IPC_SYNC_MESSAGE_CONTROL2_3(msg_class, type1_in, type2_in, type1_out, ty
pe2_out, type3_out) \ | 566 #define IPC_SYNC_MESSAGE_CONTROL2_3(msg_class, type1_in, type2_in, type1_out, ty
pe2_out, type3_out) \ |
| 231 msg_class##__ID, | 567 class msg_class : \ |
| 568 public IPC::MessageWithReply<Tuple2<type1_in, type2_in>, \ |
| 569 Tuple3<type1_out&, type2_out&, type3_out&> > { \ |
| 570 public: \ |
| 571 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 572 msg_class(const type1_in& arg1, const type2_in& arg2, type1_out* arg3, type2
_out* arg4, type3_out* arg5); \ |
| 573 ~msg_class(); \ |
| 574 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 575 }; \ |
| 576 IPC_SYNC_MESSAGE_CONTROL2_3_EXTRA(msg_class, type1_in, type2_in, type1_out, ty
pe2_out, type3_out) |
| 232 | 577 |
| 233 #define IPC_SYNC_MESSAGE_CONTROL3_1(msg_class, type1_in, type2_in, type3_in, typ
e1_out) \ | 578 #define IPC_SYNC_MESSAGE_CONTROL3_1(msg_class, type1_in, type2_in, type3_in, typ
e1_out) \ |
| 234 msg_class##__ID, | 579 class msg_class : \ |
| 580 public IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \ |
| 581 Tuple1<type1_out&> > { \ |
| 582 public: \ |
| 583 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 584 msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3,
type1_out* arg4); \ |
| 585 ~msg_class(); \ |
| 586 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 587 }; \ |
| 588 IPC_SYNC_MESSAGE_CONTROL3_1_EXTRA(msg_class, type1_in, type2_in, type3_in, typ
e1_out) |
| 235 | 589 |
| 236 #define IPC_SYNC_MESSAGE_CONTROL3_2(msg_class, type1_in, type2_in, type3_in, typ
e1_out, type2_out) \ | 590 #define IPC_SYNC_MESSAGE_CONTROL3_2(msg_class, type1_in, type2_in, type3_in, typ
e1_out, type2_out) \ |
| 237 msg_class##__ID, | 591 class msg_class : \ |
| 592 public IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \ |
| 593 Tuple2<type1_out&, type2_out&> > { \ |
| 594 public: \ |
| 595 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 596 msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3,
type1_out* arg4, type2_out* arg5); \ |
| 597 ~msg_class(); \ |
| 598 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 599 }; \ |
| 600 IPC_SYNC_MESSAGE_CONTROL3_2_EXTRA(msg_class, type1_in, type2_in, type3_in, typ
e1_out, type2_out) |
| 238 | 601 |
| 239 #define IPC_SYNC_MESSAGE_CONTROL3_3(msg_class, type1_in, type2_in, type3_in, typ
e1_out, type2_out, type3_out) \ | 602 #define IPC_SYNC_MESSAGE_CONTROL3_3(msg_class, type1_in, type2_in, type3_in, typ
e1_out, type2_out, type3_out) \ |
| 240 msg_class##__ID, | 603 class msg_class : \ |
| 604 public IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \ |
| 605 Tuple3<type1_out&, type2_out&, type3_out&> > { \ |
| 606 public: \ |
| 607 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 608 msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3,
type1_out* arg4, type2_out* arg5, type3_out* arg6); \ |
| 609 ~msg_class(); \ |
| 610 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 611 }; \ |
| 612 IPC_SYNC_MESSAGE_CONTROL3_3_EXTRA(msg_class, type1_in, type2_in, type3_in, typ
e1_out, type2_out, type3_out) |
| 241 | 613 |
| 242 #define IPC_SYNC_MESSAGE_CONTROL3_4(msg_class, type1_in, type2_in, type3_in, typ
e1_out, type2_out, type3_out, type4_out) \ | 614 #define IPC_SYNC_MESSAGE_CONTROL3_4(msg_class, type1_in, type2_in, type3_in, typ
e1_out, type2_out, type3_out, type4_out) \ |
| 243 msg_class##__ID, | 615 class msg_class : \ |
| 616 public IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \ |
| 617 Tuple4<type1_out&, type2_out&, type3_out&, type4_out&> > { \ |
| 618 public: \ |
| 619 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 620 msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3,
type1_out* arg4, type2_out* arg5, type3_out* arg6, type4_out* arg7); \ |
| 621 ~msg_class(); \ |
| 622 static void Log(std::string* name, const Message* msg, std::string* l);
\ |
| 623 }; \ |
| 624 IPC_SYNC_MESSAGE_CONTROL3_4_EXTRA(msg_class, type1_in, type2_in, type3_in, typ
e1_out, type2_out, type3_out, type4_out) |
| 244 | 625 |
| 245 #define IPC_SYNC_MESSAGE_CONTROL4_1(msg_class, type1_in, type2_in, type3_in, typ
e4_in, type1_out) \ | 626 #define IPC_SYNC_MESSAGE_CONTROL4_1(msg_class, type1_in, type2_in, type3_in, typ
e4_in, type1_out) \ |
| 246 msg_class##__ID, | 627 class msg_class : \ |
| 628 public IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in
>, \ |
| 629 Tuple1<type1_out&> > { \ |
| 630 public: \ |
| 631 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 632 msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3,
const type4_in& arg4, type1_out* arg6); \ |
| 633 ~msg_class(); \ |
| 634 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 635 }; \ |
| 636 IPC_SYNC_MESSAGE_CONTROL4_1_EXTRA(msg_class, type1_in, type2_in, type3_in, typ
e4_in, type1_out) |
| 247 | 637 |
| 248 #define IPC_SYNC_MESSAGE_CONTROL4_2(msg_class, type1_in, type2_in, type3_in, typ
e4_in, type1_out, type2_out) \ | 638 #define IPC_SYNC_MESSAGE_CONTROL4_2(msg_class, type1_in, type2_in, type3_in, typ
e4_in, type1_out, type2_out) \ |
| 249 msg_class##__ID, | 639 class msg_class : \ |
| 640 public IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in
>, \ |
| 641 Tuple2<type1_out&, type2_out&> > { \ |
| 642 public: \ |
| 643 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 644 msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3,
const type4_in& arg4, type1_out* arg5, type2_out* arg6); \ |
| 645 ~msg_class(); \ |
| 646 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 647 }; \ |
| 648 IPC_SYNC_MESSAGE_CONTROL4_2_EXTRA(msg_class, type1_in, type2_in, type3_in, typ
e4_in, type1_out, type2_out) |
| 250 | 649 |
| 251 #define IPC_SYNC_MESSAGE_ROUTED0_0(msg_class) \ | 650 #define IPC_SYNC_MESSAGE_ROUTED0_0(msg_class) \ |
| 252 msg_class##__ID, | 651 class msg_class : public IPC::MessageWithReply<Tuple0, Tuple0 > { \ |
| 652 public: \ |
| 653 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 654 msg_class(int routing_id); \ |
| 655 ~msg_class(); \ |
| 656 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 657 }; \ |
| 658 IPC_SYNC_MESSAGE_ROUTED0_0_EXTRA(msg_class) |
| 253 | 659 |
| 254 #define IPC_SYNC_MESSAGE_ROUTED0_1(msg_class, type1_out) \ | 660 #define IPC_SYNC_MESSAGE_ROUTED0_1(msg_class, type1_out) \ |
| 255 msg_class##__ID, | 661 class msg_class : public IPC::MessageWithReply<Tuple0, Tuple1<type1_out&> > {
\ |
| 662 public: \ |
| 663 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 664 msg_class(int routing_id, type1_out* arg1); \ |
| 665 ~msg_class(); \ |
| 666 static void Log(std::string* name, const Message* msg, std::string* l);
\ |
| 667 }; \ |
| 668 IPC_SYNC_MESSAGE_ROUTED0_1_EXTRA(msg_class, type1_out) |
| 256 | 669 |
| 257 #define IPC_SYNC_MESSAGE_ROUTED0_2(msg_class, type1_out, type2_out) \ | 670 #define IPC_SYNC_MESSAGE_ROUTED0_2(msg_class, type1_out, type2_out) \ |
| 258 msg_class##__ID, | 671 class msg_class : \ |
| 672 public IPC::MessageWithReply<Tuple0, Tuple2<type1_out&, type2_out&> > { \ |
| 673 public: \ |
| 674 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 675 msg_class(int routing_id, type1_out* arg1, type2_out* arg2); \ |
| 676 ~msg_class(); \ |
| 677 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 678 }; \ |
| 679 IPC_SYNC_MESSAGE_ROUTED0_2_EXTRA(msg_class, type1_out, type2_out) |
| 259 | 680 |
| 260 #define IPC_SYNC_MESSAGE_ROUTED0_3(msg_class, type1_out, type2_out, type3_out) \ | 681 #define IPC_SYNC_MESSAGE_ROUTED0_3(msg_class, type1_out, type2_out, type3_out) \ |
| 261 msg_class##__ID, | 682 class msg_class : \ |
| 683 public IPC::MessageWithReply<Tuple0, \ |
| 684 Tuple3<type1_out&, type2_out&, type3_out&> >{ \ |
| 685 public: \ |
| 686 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 687 msg_class(int routing_id, type1_out* arg1, type2_out* arg2, type3_out* arg3)
; \ |
| 688 ~msg_class(); \ |
| 689 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 690 }; \ |
| 691 IPC_SYNC_MESSAGE_ROUTED0_3_EXTRA(msg_class, type1_out, type2_out, type3_out) |
| 262 | 692 |
| 263 #define IPC_SYNC_MESSAGE_ROUTED1_0(msg_class, type1_in) \ | 693 #define IPC_SYNC_MESSAGE_ROUTED1_0(msg_class, type1_in) \ |
| 264 msg_class##__ID, | 694 class msg_class : \ |
| 695 public IPC::MessageWithReply<Tuple1<type1_in>, Tuple0 > { \ |
| 696 public: \ |
| 697 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 698 msg_class(int routing_id, const type1_in& arg1); \ |
| 699 ~msg_class(); \ |
| 700 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 701 }; \ |
| 702 IPC_SYNC_MESSAGE_ROUTED1_0_EXTRA(msg_class, type1_in) |
| 265 | 703 |
| 266 #define IPC_SYNC_MESSAGE_ROUTED1_1(msg_class, type1_in, type1_out) \ | 704 #define IPC_SYNC_MESSAGE_ROUTED1_1(msg_class, type1_in, type1_out) \ |
| 267 msg_class##__ID, | 705 class msg_class : \ |
| 706 public IPC::MessageWithReply<Tuple1<type1_in>, Tuple1<type1_out&> > { \ |
| 707 public: \ |
| 708 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 709 msg_class(int routing_id, const type1_in& arg1, type1_out* arg2); \ |
| 710 ~msg_class(); \ |
| 711 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 712 }; \ |
| 713 IPC_SYNC_MESSAGE_ROUTED1_1_EXTRA(msg_class, type1_in, type1_out) |
| 268 | 714 |
| 269 #define IPC_SYNC_MESSAGE_ROUTED1_2(msg_class, type1_in, type1_out, type2_out) \ | 715 #define IPC_SYNC_MESSAGE_ROUTED1_2(msg_class, type1_in, type1_out, type2_out) \ |
| 270 msg_class##__ID, | 716 class msg_class : \ |
| 717 public IPC::MessageWithReply<Tuple1<type1_in>, Tuple2<type1_out&, type2_ou
t&> > { \ |
| 718 public: \ |
| 719 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 720 msg_class(int routing_id, const type1_in& arg1, type1_out* arg2, type2_out*
arg3); \ |
| 721 ~msg_class(); \ |
| 722 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 723 }; \ |
| 724 IPC_SYNC_MESSAGE_ROUTED1_2_EXTRA(msg_class, type1_in, type1_out, type2_out) |
| 271 | 725 |
| 272 #define IPC_SYNC_MESSAGE_ROUTED1_3(msg_class, type1_in, type1_out, type2_out, ty
pe3_out) \ | 726 #define IPC_SYNC_MESSAGE_ROUTED1_3(msg_class, type1_in, type1_out, type2_out, ty
pe3_out) \ |
| 273 msg_class##__ID, | 727 class msg_class : \ |
| 728 public IPC::MessageWithReply<Tuple1<type1_in>, \ |
| 729 Tuple3<type1_out&, type2_out&, type3_out&> >{ \ |
| 730 public: \ |
| 731 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 732 msg_class(int routing_id, const type1_in& arg1, type1_out* arg2, type2_out*
arg3, type3_out* arg4); \ |
| 733 ~msg_class(); \ |
| 734 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 735 }; \ |
| 736 IPC_SYNC_MESSAGE_ROUTED1_3_EXTRA(msg_class, type1_in, type1_out, type2_out, ty
pe3_out) |
| 274 | 737 |
| 275 #define IPC_SYNC_MESSAGE_ROUTED1_4(msg_class, type1_in, type1_out, type2_out, ty
pe3_out, type4_out) \ | 738 #define IPC_SYNC_MESSAGE_ROUTED1_4(msg_class, type1_in, type1_out, type2_out, ty
pe3_out, type4_out) \ |
| 276 msg_class##__ID, | 739 class msg_class : \ |
| 740 public IPC::MessageWithReply<Tuple1<type1_in>, \ |
| 741 Tuple4<type1_out&, type2_out&, type3_out&, type4_out&> >{ \ |
| 742 public: \ |
| 743 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 744 msg_class(int routing_id, const type1_in& arg1, type1_out* arg2, type2_out*
arg3, type3_out* arg4, type4_out* arg5); \ |
| 745 ~msg_class(); \ |
| 746 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 747 }; \ |
| 748 IPC_SYNC_MESSAGE_ROUTED1_4_EXTRA(msg_class, type1_in, type1_out, type2_out, ty
pe3_out, type4_out) |
| 277 | 749 |
| 278 #define IPC_SYNC_MESSAGE_ROUTED2_0(msg_class, type1_in, type2_in) \ | 750 #define IPC_SYNC_MESSAGE_ROUTED2_0(msg_class, type1_in, type2_in) \ |
| 279 msg_class##__ID, | 751 class msg_class : \ |
| 752 public IPC::MessageWithReply<Tuple2<type1_in, type2_in>, Tuple0 > { \ |
| 753 public: \ |
| 754 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 755 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2); \ |
| 756 ~msg_class(); \ |
| 757 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 758 }; \ |
| 759 IPC_SYNC_MESSAGE_ROUTED2_0_EXTRA(msg_class, type1_in, type2_in) |
| 280 | 760 |
| 281 #define IPC_SYNC_MESSAGE_ROUTED2_1(msg_class, type1_in, type2_in, type1_out) \ | 761 #define IPC_SYNC_MESSAGE_ROUTED2_1(msg_class, type1_in, type2_in, type1_out) \ |
| 282 msg_class##__ID, | 762 class msg_class : \ |
| 763 public IPC::MessageWithReply<Tuple2<type1_in, type2_in>, Tuple1<type1_out&
> > { \ |
| 764 public: \ |
| 765 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 766 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, type1_
out* arg3); \ |
| 767 ~msg_class(); \ |
| 768 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 769 }; \ |
| 770 IPC_SYNC_MESSAGE_ROUTED2_1_EXTRA(msg_class, type1_in, type2_in, type1_out) |
| 283 | 771 |
| 284 #define IPC_SYNC_MESSAGE_ROUTED2_2(msg_class, type1_in, type2_in, type1_out, typ
e2_out) \ | 772 #define IPC_SYNC_MESSAGE_ROUTED2_2(msg_class, type1_in, type2_in, type1_out, typ
e2_out) \ |
| 285 msg_class##__ID, | 773 class msg_class : \ |
| 774 public IPC::MessageWithReply<Tuple2<type1_in, type2_in>, \ |
| 775 Tuple2<type1_out&, type2_out&> > { \ |
| 776 public: \ |
| 777 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 778 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, type1_
out* arg3, type2_out* arg4); \ |
| 779 ~msg_class(); \ |
| 780 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 781 }; \ |
| 782 IPC_SYNC_MESSAGE_ROUTED2_2_EXTRA(msg_class, type1_in, type2_in, type1_out, typ
e2_out) |
| 286 | 783 |
| 287 #define IPC_SYNC_MESSAGE_ROUTED2_3(msg_class, type1_in, type2_in, type1_out, typ
e2_out, type3_out) \ | 784 #define IPC_SYNC_MESSAGE_ROUTED2_3(msg_class, type1_in, type2_in, type1_out, typ
e2_out, type3_out) \ |
| 288 msg_class##__ID, | 785 class msg_class : \ |
| 786 public IPC::MessageWithReply<Tuple2<type1_in, type2_in>, \ |
| 787 Tuple3<type1_out&, type2_out&, type3_out&> > { \ |
| 788 public: \ |
| 789 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 790 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, type1_
out* arg3, type2_out* arg4, type3_out* arg5); \ |
| 791 ~msg_class(); \ |
| 792 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 793 }; \ |
| 794 IPC_SYNC_MESSAGE_ROUTED2_3_EXTRA(msg_class, type1_in, type2_in, type1_out, typ
e2_out, type3_out) |
| 289 | 795 |
| 290 #define IPC_SYNC_MESSAGE_ROUTED3_0(msg_class, type1_in, type2_in, type3_in) \ | 796 #define IPC_SYNC_MESSAGE_ROUTED3_0(msg_class, type1_in, type2_in, type3_in) \ |
| 291 msg_class##__ID, | 797 class msg_class : \ |
| 798 public IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, Tuple0
> { \ |
| 799 public: \ |
| 800 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 801 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const
type3_in& arg3); \ |
| 802 ~msg_class(); \ |
| 803 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 804 }; \ |
| 805 IPC_SYNC_MESSAGE_ROUTED3_0_EXTRA(msg_class, type1_in, type2_in, type3_in) |
| 292 | 806 |
| 293 #define IPC_SYNC_MESSAGE_ROUTED3_1(msg_class, type1_in, type2_in, type3_in, type
1_out) \ | 807 #define IPC_SYNC_MESSAGE_ROUTED3_1(msg_class, type1_in, type2_in, type3_in, type
1_out) \ |
| 294 msg_class##__ID, | 808 class msg_class : \ |
| 809 public IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \ |
| 810 Tuple1<type1_out&> > { \ |
| 811 public: \ |
| 812 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 813 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const
type3_in& arg3, type1_out* arg4); \ |
| 814 ~msg_class(); \ |
| 815 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 816 }; \ |
| 817 IPC_SYNC_MESSAGE_ROUTED3_1_EXTRA(msg_class, type1_in, type2_in, type3_in, type
1_out) |
| 295 | 818 |
| 296 #define IPC_SYNC_MESSAGE_ROUTED3_2(msg_class, type1_in, type2_in, type3_in, type
1_out, type2_out) \ | 819 #define IPC_SYNC_MESSAGE_ROUTED3_2(msg_class, type1_in, type2_in, type3_in, type
1_out, type2_out) \ |
| 297 msg_class##__ID, | 820 class msg_class : \ |
| 821 public IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \ |
| 822 Tuple2<type1_out&, type2_out&> > { \ |
| 823 public: \ |
| 824 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 825 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const
type3_in& arg3, type1_out* arg4, type2_out* arg5); \ |
| 826 ~msg_class(); \ |
| 827 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 828 }; \ |
| 829 IPC_SYNC_MESSAGE_ROUTED3_2_EXTRA(msg_class, type1_in, type2_in, type3_in, type
1_out, type2_out) |
| 298 | 830 |
| 299 #define IPC_SYNC_MESSAGE_ROUTED3_3(msg_class, type1_in, type2_in, type3_in, type
1_out, type2_out, type3_out) \ | 831 #define IPC_SYNC_MESSAGE_ROUTED3_3(msg_class, type1_in, type2_in, type3_in, type
1_out, type2_out, type3_out) \ |
| 300 msg_class##__ID, | 832 class msg_class : \ |
| 833 public IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \ |
| 834 Tuple3<type1_out&, type2_out&, type3_out&> > { \ |
| 835 public: \ |
| 836 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 837 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const
type3_in& arg3, type1_out* arg4, type2_out* arg5, type3_out* arg6); \ |
| 838 ~msg_class(); \ |
| 839 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 840 }; \ |
| 841 IPC_SYNC_MESSAGE_ROUTED3_3_EXTRA(msg_class, type1_in, type2_in, type3_in, type
1_out, type2_out, type3_out) |
| 301 | 842 |
| 302 #define IPC_SYNC_MESSAGE_ROUTED3_4(msg_class, type1_in, type2_in, type3_in, type
1_out, type2_out, type3_out, type4_out) \ | 843 #define IPC_SYNC_MESSAGE_ROUTED3_4(msg_class, type1_in, type2_in, type3_in, type
1_out, type2_out, type3_out, type4_out) \ |
| 303 msg_class##__ID, | 844 class msg_class : \ |
| 845 public IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \ |
| 846 Tuple4<type1_out&, type2_out&, type3_out&, type4_out&> > { \ |
| 847 public: \ |
| 848 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 849 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const
type3_in& arg3, type1_out* arg4, type2_out* arg5, type3_out* arg6, type4_out* ar
g7); \ |
| 850 ~msg_class(); \ |
| 851 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 852 }; \ |
| 853 IPC_SYNC_MESSAGE_ROUTED3_4_EXTRA(msg_class, type1_in, type2_in, type3_in, type
1_out, type2_out, type3_out, type4_out) |
| 304 | 854 |
| 305 #define IPC_SYNC_MESSAGE_ROUTED4_0(msg_class, type1_in, type2_in, type3_in, type
4_in) \ | 855 #define IPC_SYNC_MESSAGE_ROUTED4_0(msg_class, type1_in, type2_in, type3_in, type
4_in) \ |
| 306 msg_class##__ID, | 856 class msg_class : \ |
| 857 public IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in
>, \ |
| 858 Tuple0 > { \ |
| 859 public: \ |
| 860 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 861 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const
type3_in& arg3, const type4_in& arg4); \ |
| 862 ~msg_class(); \ |
| 863 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 864 }; \ |
| 865 IPC_SYNC_MESSAGE_ROUTED4_0_EXTRA(msg_class, type1_in, type2_in, type3_in, type
4_in) |
| 307 | 866 |
| 308 #define IPC_SYNC_MESSAGE_ROUTED4_1(msg_class, type1_in, type2_in, type3_in, type
4_in, type1_out) \ | 867 #define IPC_SYNC_MESSAGE_ROUTED4_1(msg_class, type1_in, type2_in, type3_in, type
4_in, type1_out) \ |
| 309 msg_class##__ID, | 868 class msg_class : \ |
| 869 public IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in
>, \ |
| 870 Tuple1<type1_out&> > { \ |
| 871 public: \ |
| 872 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 873 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const
type3_in& arg3, const type4_in& arg4, type1_out* arg6); \ |
| 874 ~msg_class(); \ |
| 875 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 876 }; \ |
| 877 IPC_SYNC_MESSAGE_ROUTED4_1_EXTRA(msg_class, type1_in, type2_in, type3_in, type
4_in, type1_out) |
| 310 | 878 |
| 311 #define IPC_SYNC_MESSAGE_ROUTED4_2(msg_class, type1_in, type2_in, type3_in, type
4_in, type1_out, type2_out) \ | 879 #define IPC_SYNC_MESSAGE_ROUTED4_2(msg_class, type1_in, type2_in, type3_in, type
4_in, type1_out, type2_out) \ |
| 312 msg_class##__ID, | 880 class msg_class : \ |
| 881 public IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in
>, \ |
| 882 Tuple2<type1_out&, type2_out&> > { \ |
| 883 public: \ |
| 884 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 885 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const
type3_in& arg3, const type4_in& arg4, type1_out* arg5, type2_out* arg6); \ |
| 886 ~msg_class(); \ |
| 887 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 888 }; \ |
| 889 IPC_SYNC_MESSAGE_ROUTED4_2_EXTRA(msg_class, type1_in, type2_in, type3_in, type
4_in, type1_out, type2_out) |
| 313 | 890 |
| 314 #define IPC_SYNC_MESSAGE_ROUTED4_3(msg_class, type1_in, type2_in, type3_in, type
4_in, type1_out, type2_out, type3_out) \ | 891 #define IPC_SYNC_MESSAGE_ROUTED4_3(msg_class, type1_in, type2_in, type3_in, type
4_in, type1_out, type2_out, type3_out) \ |
| 315 msg_class##__ID, | 892 class msg_class : \ |
| 893 public IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in
>, \ |
| 894 Tuple3<type1_out&, type2_out&, type3_out&> > { \ |
| 895 public: \ |
| 896 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 897 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const
type3_in& arg3, const type4_in& arg4, type1_out* arg5, type2_out* arg6, type3_ou
t* arg7); \ |
| 898 ~msg_class(); \ |
| 899 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 900 }; \ |
| 901 IPC_SYNC_MESSAGE_ROUTED4_3_EXTRA(msg_class, type1_in, type2_in, type3_in, type
4_in, type1_out, type2_out, type3_out) |
| 316 | 902 |
| 317 #define IPC_SYNC_MESSAGE_ROUTED5_0(msg_class, type1_in, type2_in, type3_in, type
4_in, type5_in) \ | 903 #define IPC_SYNC_MESSAGE_ROUTED5_0(msg_class, type1_in, type2_in, type3_in, type
4_in, type5_in) \ |
| 318 msg_class##__ID, | 904 class msg_class : \ |
| 905 public IPC::MessageWithReply<Tuple5<type1_in, type2_in, type3_in, type4_in
, type5_in>, \ |
| 906 Tuple0 > { \ |
| 907 public: \ |
| 908 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 909 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const
type3_in& arg3, const type4_in& arg4, const type5_in& arg5); \ |
| 910 ~msg_class(); \ |
| 911 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 912 }; \ |
| 913 IPC_SYNC_MESSAGE_ROUTED5_0_EXTRA(msg_class, type1_in, type2_in, type3_in, type
4_in, type5_in) |
| 319 | 914 |
| 320 #define IPC_SYNC_MESSAGE_ROUTED5_1(msg_class, type1_in, type2_in, type3_in, type
4_in, type5_in, type1_out) \ | 915 #define IPC_SYNC_MESSAGE_ROUTED5_1(msg_class, type1_in, type2_in, type3_in, type
4_in, type5_in, type1_out) \ |
| 321 msg_class##__ID, | 916 class msg_class : \ |
| 917 public IPC::MessageWithReply<Tuple5<type1_in, type2_in, type3_in, type4_in
, type5_in>, \ |
| 918 Tuple1<type1_out&> > { \ |
| 919 public: \ |
| 920 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 921 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const
type3_in& arg3, const type4_in& arg4, const type5_in& arg5, type1_out* arg6); \ |
| 922 ~msg_class(); \ |
| 923 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 924 }; \ |
| 925 IPC_SYNC_MESSAGE_ROUTED5_1_EXTRA(msg_class, type1_in, type2_in, type3_in, type
4_in, type5_in, type1_out) |
| 322 | 926 |
| 323 #define IPC_SYNC_MESSAGE_ROUTED5_2(msg_class, type1_in, type2_in, type3_in, type
4_in, type5_in, type1_out, type2_out) \ | 927 #define IPC_SYNC_MESSAGE_ROUTED5_2(msg_class, type1_in, type2_in, type3_in, type
4_in, type5_in, type1_out, type2_out) \ |
| 324 msg_class##__ID, | 928 class msg_class : \ |
| 929 public IPC::MessageWithReply<Tuple5<type1_in, type2_in, type3_in, type4_in
, type5_in>, \ |
| 930 Tuple2<type1_out&, type2_out&> > { \ |
| 931 public: \ |
| 932 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 933 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const
type3_in& arg3, const type4_in& arg4, const type4_in& arg5, type1_out* arg6, typ
e2_out* arg7); \ |
| 934 ~msg_class(); \ |
| 935 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 936 }; \ |
| 937 IPC_SYNC_MESSAGE_ROUTED5_2_EXTRA(msg_class, type1_in, type2_in, type3_in, type
4_in, type5_in, type1_out, type2_out) |
| 325 | 938 |
| 326 #define IPC_SYNC_MESSAGE_ROUTED5_3(msg_class, type1_in, type2_in, type3_in, type
4_in, type5_in, type1_out, type2_out, type3_out) \ | 939 #define IPC_SYNC_MESSAGE_ROUTED5_3(msg_class, type1_in, type2_in, type3_in, type
4_in, type5_in, type1_out, type2_out, type3_out) \ |
| 327 msg_class##__ID, | 940 class msg_class : \ |
| 941 public IPC::MessageWithReply<Tuple5<type1_in, type2_in, type3_in, type4_in
, type5_in>, \ |
| 942 Tuple3<type1_out&, type2_out&, type3_out&> > { \ |
| 943 public: \ |
| 944 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ |
| 945 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const
type3_in& arg3, const type4_in& arg4, const type4_in& arg5, type1_out* arg6, typ
e2_out* arg7, type3_out* arg8); \ |
| 946 ~msg_class(); \ |
| 947 static void Log(std::string* name, const Message* msg, std::string* l); \ |
| 948 }; \ |
| 949 IPC_SYNC_MESSAGE_ROUTED5_3_EXTRA(msg_class, type1_in, type2_in, type3_in, type
4_in, type5_in, type1_out, type2_out, type3_out) |
| 950 |
| 951 |
| 328 | 952 |
| 329 // Message crackers and handlers. | 953 // Message crackers and handlers. |
| 330 // Prefer to use the IPC_BEGIN_MESSAGE_MAP_EX to the older macros since they | 954 // Prefer to use the IPC_BEGIN_MESSAGE_MAP_EX to the older macros since they |
| 331 // allow you to detect when a message could not be de-serialized. Usage: | 955 // allow you to detect when a message could not be de-serialized. Usage: |
| 332 // | 956 // |
| 333 // void MyClass::OnMessageReceived(const IPC::Message& msg) { | 957 // void MyClass::OnMessageReceived(const IPC::Message& msg) { |
| 334 // bool msg_is_good = false; | 958 // bool msg_is_good = false; |
| 335 // IPC_BEGIN_MESSAGE_MAP_EX(MyClass, msg, msg_is_good) | 959 // IPC_BEGIN_MESSAGE_MAP_EX(MyClass, msg, msg_is_good) |
| 336 // IPC_MESSAGE_HANDLER(MsgClassOne, OnMsgClassOne) | 960 // IPC_MESSAGE_HANDLER(MsgClassOne, OnMsgClassOne) |
| 337 // ...more handlers here ... | 961 // ...more handlers here ... |
| 338 // IPC_MESSAGE_HANDLER(MsgClassTen, OnMsgClassTen) | 962 // IPC_MESSAGE_HANDLER(MsgClassTen, OnMsgClassTen) |
| 339 // IPC_END_MESSAGE_MAP_EX() | 963 // IPC_END_MESSAGE_MAP_EX() |
| 340 // if (!msg_is_good) { | 964 // if (!msg_is_good) { |
| 341 // // Signal error here or terminate offending process. | 965 // // Signal error here or terminate offending process. |
| 342 // } | 966 // } |
| 343 // } | 967 // } |
| 344 | 968 |
| 969 |
| 345 #define IPC_DEFINE_MESSAGE_MAP(class_name) \ | 970 #define IPC_DEFINE_MESSAGE_MAP(class_name) \ |
| 346 void class_name::OnMessageReceived(const IPC::Message& msg) \ | 971 void class_name::OnMessageReceived(const IPC::Message& msg) \ |
| 347 IPC_BEGIN_MESSAGE_MAP(class_name, msg) | 972 IPC_BEGIN_MESSAGE_MAP(class_name, msg) |
| 348 | 973 |
| 349 #define IPC_BEGIN_MESSAGE_MAP_EX(class_name, msg, msg_is_ok) \ | 974 #define IPC_BEGIN_MESSAGE_MAP_EX(class_name, msg, msg_is_ok) \ |
| 350 { \ | 975 { \ |
| 351 typedef class_name _IpcMessageHandlerClass; \ | 976 typedef class_name _IpcMessageHandlerClass; \ |
| 352 const IPC::Message& ipc_message__ = msg; \ | 977 const IPC::Message& ipc_message__ = msg; \ |
| 353 bool& msg_is_ok__ = msg_is_ok; \ | 978 bool& msg_is_ok__ = msg_is_ok; \ |
| 354 switch (ipc_message__.type()) { \ | 979 switch (ipc_message__.type()) { \ |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 "Invalid message with type = " << \ | 1023 "Invalid message with type = " << \ |
| 399 ipc_message__.type()) | 1024 ipc_message__.type()) |
| 400 | 1025 |
| 401 #define IPC_END_MESSAGE_MAP() \ | 1026 #define IPC_END_MESSAGE_MAP() \ |
| 402 DCHECK(msg_is_ok__); \ | 1027 DCHECK(msg_is_ok__); \ |
| 403 } \ | 1028 } \ |
| 404 } | 1029 } |
| 405 | 1030 |
| 406 #define IPC_END_MESSAGE_MAP_EX() \ | 1031 #define IPC_END_MESSAGE_MAP_EX() \ |
| 407 } \ | 1032 } \ |
| 408 } | 1033 } |
| 409 | |
| 410 #elif defined(IPC_MESSAGE_MACROS_LOG) | |
| 411 #undef IPC_MESSAGE_MACROS_LOG | |
| 412 | |
| 413 | |
| 414 // Undefine the macros from the previous pass (if any). | |
| 415 #undef IPC_BEGIN_MESSAGES | |
| 416 #undef IPC_END_MESSAGES | |
| 417 #undef IPC_MESSAGE_CONTROL0 | |
| 418 #undef IPC_MESSAGE_CONTROL1 | |
| 419 #undef IPC_MESSAGE_CONTROL2 | |
| 420 #undef IPC_MESSAGE_CONTROL3 | |
| 421 #undef IPC_MESSAGE_CONTROL4 | |
| 422 #undef IPC_MESSAGE_CONTROL5 | |
| 423 #undef IPC_MESSAGE_ROUTED0 | |
| 424 #undef IPC_MESSAGE_ROUTED1 | |
| 425 #undef IPC_MESSAGE_ROUTED2 | |
| 426 #undef IPC_MESSAGE_ROUTED3 | |
| 427 #undef IPC_MESSAGE_ROUTED4 | |
| 428 #undef IPC_MESSAGE_ROUTED5 | |
| 429 #undef IPC_SYNC_MESSAGE_CONTROL0_0 | |
| 430 #undef IPC_SYNC_MESSAGE_CONTROL0_1 | |
| 431 #undef IPC_SYNC_MESSAGE_CONTROL0_2 | |
| 432 #undef IPC_SYNC_MESSAGE_CONTROL0_3 | |
| 433 #undef IPC_SYNC_MESSAGE_CONTROL1_0 | |
| 434 #undef IPC_SYNC_MESSAGE_CONTROL1_1 | |
| 435 #undef IPC_SYNC_MESSAGE_CONTROL1_2 | |
| 436 #undef IPC_SYNC_MESSAGE_CONTROL1_3 | |
| 437 #undef IPC_SYNC_MESSAGE_CONTROL2_0 | |
| 438 #undef IPC_SYNC_MESSAGE_CONTROL2_1 | |
| 439 #undef IPC_SYNC_MESSAGE_CONTROL2_2 | |
| 440 #undef IPC_SYNC_MESSAGE_CONTROL2_3 | |
| 441 #undef IPC_SYNC_MESSAGE_CONTROL3_1 | |
| 442 #undef IPC_SYNC_MESSAGE_CONTROL3_2 | |
| 443 #undef IPC_SYNC_MESSAGE_CONTROL3_3 | |
| 444 #undef IPC_SYNC_MESSAGE_CONTROL3_4 | |
| 445 #undef IPC_SYNC_MESSAGE_CONTROL4_1 | |
| 446 #undef IPC_SYNC_MESSAGE_CONTROL4_2 | |
| 447 #undef IPC_SYNC_MESSAGE_ROUTED0_0 | |
| 448 #undef IPC_SYNC_MESSAGE_ROUTED0_1 | |
| 449 #undef IPC_SYNC_MESSAGE_ROUTED0_2 | |
| 450 #undef IPC_SYNC_MESSAGE_ROUTED0_3 | |
| 451 #undef IPC_SYNC_MESSAGE_ROUTED1_0 | |
| 452 #undef IPC_SYNC_MESSAGE_ROUTED1_1 | |
| 453 #undef IPC_SYNC_MESSAGE_ROUTED1_2 | |
| 454 #undef IPC_SYNC_MESSAGE_ROUTED1_3 | |
| 455 #undef IPC_SYNC_MESSAGE_ROUTED1_4 | |
| 456 #undef IPC_SYNC_MESSAGE_ROUTED2_0 | |
| 457 #undef IPC_SYNC_MESSAGE_ROUTED2_1 | |
| 458 #undef IPC_SYNC_MESSAGE_ROUTED2_2 | |
| 459 #undef IPC_SYNC_MESSAGE_ROUTED2_3 | |
| 460 #undef IPC_SYNC_MESSAGE_ROUTED3_0 | |
| 461 #undef IPC_SYNC_MESSAGE_ROUTED3_1 | |
| 462 #undef IPC_SYNC_MESSAGE_ROUTED3_2 | |
| 463 #undef IPC_SYNC_MESSAGE_ROUTED3_3 | |
| 464 #undef IPC_SYNC_MESSAGE_ROUTED3_4 | |
| 465 #undef IPC_SYNC_MESSAGE_ROUTED4_0 | |
| 466 #undef IPC_SYNC_MESSAGE_ROUTED4_1 | |
| 467 #undef IPC_SYNC_MESSAGE_ROUTED4_2 | |
| 468 #undef IPC_SYNC_MESSAGE_ROUTED4_3 | |
| 469 #undef IPC_SYNC_MESSAGE_ROUTED5_0 | |
| 470 #undef IPC_SYNC_MESSAGE_ROUTED5_1 | |
| 471 #undef IPC_SYNC_MESSAGE_ROUTED5_2 | |
| 472 #undef IPC_SYNC_MESSAGE_ROUTED5_3 | |
| 473 | |
| 474 #ifndef IPC_LOG_TABLE_CREATED | |
| 475 #define IPC_LOG_TABLE_CREATED | |
| 476 typedef void (*LogFunction)(uint32 type, | |
| 477 std::string* name, | |
| 478 const IPC::Message* msg, | |
| 479 std::string* params); | |
| 480 | |
| 481 LogFunction g_log_function_mapping[LastMsgIndex]; | |
| 482 #endif | |
| 483 | |
| 484 | |
| 485 #define IPC_BEGIN_MESSAGES(label) \ | |
| 486 void label##MsgLog(uint32 type, std::string* name, const IPC::Message* msg, \ | |
| 487 std::string* params) { \ | |
| 488 switch (type) { | |
| 489 | |
| 490 #define IPC_END_MESSAGES(label) \ | |
| 491 default: \ | |
| 492 if (name) \ | |
| 493 *name = "[UNKNOWN " #label " MSG]"; \ | |
| 494 } \ | |
| 495 } \ | |
| 496 class LoggerRegisterHelper##label { \ | |
| 497 public: \ | |
| 498 LoggerRegisterHelper##label() { \ | |
| 499 g_log_function_mapping[label##MsgStart] = label##MsgLog; \ | |
| 500 } \ | |
| 501 }; \ | |
| 502 LoggerRegisterHelper##label g_LoggerRegisterHelper##label; | |
| 503 | |
| 504 #define IPC_MESSAGE_LOG(msg_class) \ | |
| 505 case msg_class##__ID: \ | |
| 506 if (name) \ | |
| 507 *name = #msg_class; \ | |
| 508 if (msg && params) \ | |
| 509 msg_class::Log(msg, params); \ | |
| 510 break; | |
| 511 | |
| 512 #define IPC_MESSAGE_CONTROL0(msg_class) \ | |
| 513 IPC_MESSAGE_LOG(msg_class) | |
| 514 | |
| 515 #define IPC_MESSAGE_CONTROL1(msg_class, type1) \ | |
| 516 IPC_MESSAGE_LOG(msg_class) | |
| 517 | |
| 518 #define IPC_MESSAGE_CONTROL2(msg_class, type1, type2) \ | |
| 519 IPC_MESSAGE_LOG(msg_class) | |
| 520 | |
| 521 #define IPC_MESSAGE_CONTROL3(msg_class, type1, type2, type3) \ | |
| 522 IPC_MESSAGE_LOG(msg_class) | |
| 523 | |
| 524 #define IPC_MESSAGE_CONTROL4(msg_class, type1, type2, type3, type4) \ | |
| 525 IPC_MESSAGE_LOG(msg_class) | |
| 526 | |
| 527 #define IPC_MESSAGE_CONTROL5(msg_class, type1, type2, type3, type4, type5) \ | |
| 528 IPC_MESSAGE_LOG(msg_class) | |
| 529 | |
| 530 #define IPC_MESSAGE_ROUTED0(msg_class) \ | |
| 531 IPC_MESSAGE_LOG(msg_class) | |
| 532 | |
| 533 #define IPC_MESSAGE_ROUTED1(msg_class, type1) \ | |
| 534 IPC_MESSAGE_LOG(msg_class) | |
| 535 | |
| 536 #define IPC_MESSAGE_ROUTED2(msg_class, type1, type2) \ | |
| 537 IPC_MESSAGE_LOG(msg_class) | |
| 538 | |
| 539 #define IPC_MESSAGE_ROUTED3(msg_class, type1, type2, type3) \ | |
| 540 IPC_MESSAGE_LOG(msg_class) | |
| 541 | |
| 542 #define IPC_MESSAGE_ROUTED4(msg_class, type1, type2, type3, type4) \ | |
| 543 IPC_MESSAGE_LOG(msg_class) | |
| 544 | |
| 545 #define IPC_MESSAGE_ROUTED5(msg_class, type1, type2, type3, type4, type5) \ | |
| 546 IPC_MESSAGE_LOG(msg_class) | |
| 547 | |
| 548 #define IPC_SYNC_MESSAGE_CONTROL0_0(msg_class) \ | |
| 549 IPC_MESSAGE_LOG(msg_class) | |
| 550 | |
| 551 #define IPC_SYNC_MESSAGE_CONTROL0_1(msg_class, type1_out) \ | |
| 552 IPC_MESSAGE_LOG(msg_class) | |
| 553 | |
| 554 #define IPC_SYNC_MESSAGE_CONTROL0_2(msg_class, type1_out, type2_out) \ | |
| 555 IPC_MESSAGE_LOG(msg_class) | |
| 556 | |
| 557 #define IPC_SYNC_MESSAGE_CONTROL0_3(msg_class, type1_out, type2_out, type3_out)
\ | |
| 558 IPC_MESSAGE_LOG(msg_class) | |
| 559 | |
| 560 #define IPC_SYNC_MESSAGE_CONTROL1_0(msg_class, type1_in) \ | |
| 561 IPC_MESSAGE_LOG(msg_class) | |
| 562 | |
| 563 #define IPC_SYNC_MESSAGE_CONTROL1_1(msg_class, type1_in, type1_out) \ | |
| 564 IPC_MESSAGE_LOG(msg_class) | |
| 565 | |
| 566 #define IPC_SYNC_MESSAGE_CONTROL1_2(msg_class, type1_in, type1_out, type2_out) \ | |
| 567 IPC_MESSAGE_LOG(msg_class) | |
| 568 | |
| 569 #define IPC_SYNC_MESSAGE_CONTROL1_3(msg_class, type1_in, type1_out, type2_out, t
ype3_out) \ | |
| 570 IPC_MESSAGE_LOG(msg_class) | |
| 571 | |
| 572 #define IPC_SYNC_MESSAGE_CONTROL2_0(msg_class, type1_in, type2_in) \ | |
| 573 IPC_MESSAGE_LOG(msg_class) | |
| 574 | |
| 575 #define IPC_SYNC_MESSAGE_CONTROL2_1(msg_class, type1_in, type2_in, type1_out) \ | |
| 576 IPC_MESSAGE_LOG(msg_class) | |
| 577 | |
| 578 #define IPC_SYNC_MESSAGE_CONTROL2_2(msg_class, type1_in, type2_in, type1_out, ty
pe2_out) \ | |
| 579 IPC_MESSAGE_LOG(msg_class) | |
| 580 | |
| 581 #define IPC_SYNC_MESSAGE_CONTROL2_3(msg_class, type1_in, type2_in, type1_out, ty
pe2_out, type3_out) \ | |
| 582 IPC_MESSAGE_LOG(msg_class) | |
| 583 | |
| 584 #define IPC_SYNC_MESSAGE_CONTROL3_1(msg_class, type1_in, type2_in, type3_in, typ
e1_out) \ | |
| 585 IPC_MESSAGE_LOG(msg_class) | |
| 586 | |
| 587 #define IPC_SYNC_MESSAGE_CONTROL3_2(msg_class, type1_in, type2_in, type3_in, typ
e1_out, type2_out) \ | |
| 588 IPC_MESSAGE_LOG(msg_class) | |
| 589 | |
| 590 #define IPC_SYNC_MESSAGE_CONTROL3_3(msg_class, type1_in, type2_in, type3_in, typ
e1_out, type2_out, type3_out) \ | |
| 591 IPC_MESSAGE_LOG(msg_class) | |
| 592 | |
| 593 #define IPC_SYNC_MESSAGE_CONTROL3_4(msg_class, type1_in, type2_in, type3_in, typ
e1_out, type2_out, type3_out, type4_out) \ | |
| 594 IPC_MESSAGE_LOG(msg_class) | |
| 595 | |
| 596 #define IPC_SYNC_MESSAGE_CONTROL4_1(msg_class, type1_in, type2_in, type3_in, typ
e4_in, type1_out) \ | |
| 597 IPC_MESSAGE_LOG(msg_class) | |
| 598 | |
| 599 #define IPC_SYNC_MESSAGE_CONTROL4_2(msg_class, type1_in, type2_in, type3_in, typ
e4_in, type1_out, type2_out) \ | |
| 600 IPC_MESSAGE_LOG(msg_class) | |
| 601 | |
| 602 #define IPC_SYNC_MESSAGE_ROUTED0_0(msg_class) \ | |
| 603 IPC_MESSAGE_LOG(msg_class) | |
| 604 | |
| 605 #define IPC_SYNC_MESSAGE_ROUTED0_1(msg_class, type1_out) \ | |
| 606 IPC_MESSAGE_LOG(msg_class) | |
| 607 | |
| 608 #define IPC_SYNC_MESSAGE_ROUTED0_2(msg_class, type1_out, type2_out) \ | |
| 609 IPC_MESSAGE_LOG(msg_class) | |
| 610 | |
| 611 #define IPC_SYNC_MESSAGE_ROUTED0_3(msg_class, type1_out, type2_out, type3_out) \ | |
| 612 IPC_MESSAGE_LOG(msg_class) | |
| 613 | |
| 614 #define IPC_SYNC_MESSAGE_ROUTED1_0(msg_class, type1_in) \ | |
| 615 IPC_MESSAGE_LOG(msg_class) | |
| 616 | |
| 617 #define IPC_SYNC_MESSAGE_ROUTED1_1(msg_class, type1_in, type1_out) \ | |
| 618 IPC_MESSAGE_LOG(msg_class) | |
| 619 | |
| 620 #define IPC_SYNC_MESSAGE_ROUTED1_2(msg_class, type1_in, type1_out, type2_out) \ | |
| 621 IPC_MESSAGE_LOG(msg_class) | |
| 622 | |
| 623 #define IPC_SYNC_MESSAGE_ROUTED1_3(msg_class, type1_in, type1_out, type2_out, ty
pe3_out) \ | |
| 624 IPC_MESSAGE_LOG(msg_class) | |
| 625 | |
| 626 #define IPC_SYNC_MESSAGE_ROUTED1_4(msg_class, type1_in, type1_out, type2_out, ty
pe3_out, type4_out) \ | |
| 627 IPC_MESSAGE_LOG(msg_class) | |
| 628 | |
| 629 #define IPC_SYNC_MESSAGE_ROUTED2_0(msg_class, type1_in, type2_in) \ | |
| 630 IPC_MESSAGE_LOG(msg_class) | |
| 631 | |
| 632 #define IPC_SYNC_MESSAGE_ROUTED2_1(msg_class, type1_in, type2_in, type1_out) \ | |
| 633 IPC_MESSAGE_LOG(msg_class) | |
| 634 | |
| 635 #define IPC_SYNC_MESSAGE_ROUTED2_2(msg_class, type1_in, type2_in, type1_out, typ
e2_out) \ | |
| 636 IPC_MESSAGE_LOG(msg_class) | |
| 637 | |
| 638 #define IPC_SYNC_MESSAGE_ROUTED2_3(msg_class, type1_in, type2_in, type1_out, typ
e2_out, type3_out) \ | |
| 639 IPC_MESSAGE_LOG(msg_class) | |
| 640 | |
| 641 #define IPC_SYNC_MESSAGE_ROUTED3_0(msg_class, type1_in, type2_in, type3_in) \ | |
| 642 IPC_MESSAGE_LOG(msg_class) | |
| 643 | |
| 644 #define IPC_SYNC_MESSAGE_ROUTED3_1(msg_class, type1_in, type2_in, type3_in, type
1_out) \ | |
| 645 IPC_MESSAGE_LOG(msg_class) | |
| 646 | |
| 647 #define IPC_SYNC_MESSAGE_ROUTED3_2(msg_class, type1_in, type2_in, type3_in, type
1_out, type2_out) \ | |
| 648 IPC_MESSAGE_LOG(msg_class) | |
| 649 | |
| 650 #define IPC_SYNC_MESSAGE_ROUTED3_3(msg_class, type1_in, type2_in, type3_in, type
1_out, type2_out, type3_out) \ | |
| 651 IPC_MESSAGE_LOG(msg_class) | |
| 652 | |
| 653 #define IPC_SYNC_MESSAGE_ROUTED3_4(msg_class, type1_in, type2_in, type3_in, type
1_out, type2_out, type3_out, type4_out) \ | |
| 654 IPC_MESSAGE_LOG(msg_class) | |
| 655 | |
| 656 #define IPC_SYNC_MESSAGE_ROUTED4_0(msg_class, type1_in, type2_in, type3_in, type
4_in) \ | |
| 657 IPC_MESSAGE_LOG(msg_class) | |
| 658 | |
| 659 #define IPC_SYNC_MESSAGE_ROUTED4_1(msg_class, type1_in, type2_in, type3_in, type
4_in, type1_out) \ | |
| 660 IPC_MESSAGE_LOG(msg_class) | |
| 661 | |
| 662 #define IPC_SYNC_MESSAGE_ROUTED4_2(msg_class, type1_in, type2_in, type3_in, type
4_in, type1_out, type2_out) \ | |
| 663 IPC_MESSAGE_LOG(msg_class) | |
| 664 | |
| 665 #define IPC_SYNC_MESSAGE_ROUTED4_3(msg_class, type1_in, type2_in, type3_in, type
4_in, type1_out, type2_out, type3_out) \ | |
| 666 IPC_MESSAGE_LOG(msg_class) | |
| 667 | |
| 668 #define IPC_SYNC_MESSAGE_ROUTED5_0(msg_class, type1_in, type2_in, type3_in, type
4_in, type5_in) \ | |
| 669 IPC_MESSAGE_LOG(msg_class) | |
| 670 | |
| 671 #define IPC_SYNC_MESSAGE_ROUTED5_1(msg_class, type1_in, type2_in, type3_in, type
4_in, type5_in, type1_out) \ | |
| 672 IPC_MESSAGE_LOG(msg_class) | |
| 673 | |
| 674 #define IPC_SYNC_MESSAGE_ROUTED5_2(msg_class, type1_in, type2_in, type3_in, type
4_in, type5_in, type1_out, type2_out) \ | |
| 675 IPC_MESSAGE_LOG(msg_class) | |
| 676 | |
| 677 #define IPC_SYNC_MESSAGE_ROUTED5_3(msg_class, type1_in, type2_in, type3_in, type
4_in, type5_in, type1_out, type2_out, type3_out) \ | |
| 678 IPC_MESSAGE_LOG(msg_class) | |
| 679 | |
| 680 #elif defined(IPC_MESSAGE_MACROS_CLASSES) | |
| 681 #undef IPC_MESSAGE_MACROS_CLASSES | |
| 682 | |
| 683 | |
| 684 // Undefine the macros from the previous pass (if any). | |
| 685 #undef IPC_BEGIN_MESSAGES | |
| 686 #undef IPC_END_MESSAGES | |
| 687 #undef IPC_MESSAGE_CONTROL0 | |
| 688 #undef IPC_MESSAGE_CONTROL1 | |
| 689 #undef IPC_MESSAGE_CONTROL2 | |
| 690 #undef IPC_MESSAGE_CONTROL3 | |
| 691 #undef IPC_MESSAGE_CONTROL4 | |
| 692 #undef IPC_MESSAGE_CONTROL5 | |
| 693 #undef IPC_MESSAGE_ROUTED0 | |
| 694 #undef IPC_MESSAGE_ROUTED1 | |
| 695 #undef IPC_MESSAGE_ROUTED2 | |
| 696 #undef IPC_MESSAGE_ROUTED3 | |
| 697 #undef IPC_MESSAGE_ROUTED4 | |
| 698 #undef IPC_MESSAGE_ROUTED5 | |
| 699 #undef IPC_SYNC_MESSAGE_CONTROL0_0 | |
| 700 #undef IPC_SYNC_MESSAGE_CONTROL0_1 | |
| 701 #undef IPC_SYNC_MESSAGE_CONTROL0_2 | |
| 702 #undef IPC_SYNC_MESSAGE_CONTROL0_3 | |
| 703 #undef IPC_SYNC_MESSAGE_CONTROL1_0 | |
| 704 #undef IPC_SYNC_MESSAGE_CONTROL1_1 | |
| 705 #undef IPC_SYNC_MESSAGE_CONTROL1_2 | |
| 706 #undef IPC_SYNC_MESSAGE_CONTROL1_3 | |
| 707 #undef IPC_SYNC_MESSAGE_CONTROL2_0 | |
| 708 #undef IPC_SYNC_MESSAGE_CONTROL2_1 | |
| 709 #undef IPC_SYNC_MESSAGE_CONTROL2_2 | |
| 710 #undef IPC_SYNC_MESSAGE_CONTROL2_3 | |
| 711 #undef IPC_SYNC_MESSAGE_CONTROL3_1 | |
| 712 #undef IPC_SYNC_MESSAGE_CONTROL3_2 | |
| 713 #undef IPC_SYNC_MESSAGE_CONTROL3_3 | |
| 714 #undef IPC_SYNC_MESSAGE_CONTROL3_4 | |
| 715 #undef IPC_SYNC_MESSAGE_CONTROL4_1 | |
| 716 #undef IPC_SYNC_MESSAGE_CONTROL4_2 | |
| 717 #undef IPC_SYNC_MESSAGE_ROUTED0_0 | |
| 718 #undef IPC_SYNC_MESSAGE_ROUTED0_1 | |
| 719 #undef IPC_SYNC_MESSAGE_ROUTED0_2 | |
| 720 #undef IPC_SYNC_MESSAGE_ROUTED0_3 | |
| 721 #undef IPC_SYNC_MESSAGE_ROUTED1_0 | |
| 722 #undef IPC_SYNC_MESSAGE_ROUTED1_1 | |
| 723 #undef IPC_SYNC_MESSAGE_ROUTED1_2 | |
| 724 #undef IPC_SYNC_MESSAGE_ROUTED1_3 | |
| 725 #undef IPC_SYNC_MESSAGE_ROUTED1_4 | |
| 726 #undef IPC_SYNC_MESSAGE_ROUTED2_0 | |
| 727 #undef IPC_SYNC_MESSAGE_ROUTED2_1 | |
| 728 #undef IPC_SYNC_MESSAGE_ROUTED2_2 | |
| 729 #undef IPC_SYNC_MESSAGE_ROUTED2_3 | |
| 730 #undef IPC_SYNC_MESSAGE_ROUTED3_0 | |
| 731 #undef IPC_SYNC_MESSAGE_ROUTED3_1 | |
| 732 #undef IPC_SYNC_MESSAGE_ROUTED3_2 | |
| 733 #undef IPC_SYNC_MESSAGE_ROUTED3_3 | |
| 734 #undef IPC_SYNC_MESSAGE_ROUTED3_4 | |
| 735 #undef IPC_SYNC_MESSAGE_ROUTED4_0 | |
| 736 #undef IPC_SYNC_MESSAGE_ROUTED4_1 | |
| 737 #undef IPC_SYNC_MESSAGE_ROUTED4_2 | |
| 738 #undef IPC_SYNC_MESSAGE_ROUTED4_3 | |
| 739 #undef IPC_SYNC_MESSAGE_ROUTED5_0 | |
| 740 #undef IPC_SYNC_MESSAGE_ROUTED5_1 | |
| 741 #undef IPC_SYNC_MESSAGE_ROUTED5_2 | |
| 742 #undef IPC_SYNC_MESSAGE_ROUTED5_3 | |
| 743 | |
| 744 #define IPC_BEGIN_MESSAGES(label) | |
| 745 #define IPC_END_MESSAGES(label) | |
| 746 | |
| 747 #define IPC_MESSAGE_CONTROL0(msg_class) \ | |
| 748 class msg_class : public IPC::Message { \ | |
| 749 public: \ | |
| 750 enum { ID = msg_class##__ID }; \ | |
| 751 msg_class() \ | |
| 752 : IPC::Message(MSG_ROUTING_CONTROL, \ | |
| 753 ID, \ | |
| 754 PRIORITY_NORMAL) {} \ | |
| 755 }; | |
| 756 | |
| 757 #define IPC_MESSAGE_CONTROL1(msg_class, type1) \ | |
| 758 class msg_class : public IPC::MessageWithTuple< Tuple1<type1> > { \ | |
| 759 public: \ | |
| 760 enum { ID = msg_class##__ID }; \ | |
| 761 msg_class(const type1& arg1); \ | |
| 762 ~msg_class(); \ | |
| 763 static void Log(const Message* msg, std::string* l); \ | |
| 764 }; | |
| 765 | |
| 766 #define IPC_MESSAGE_CONTROL2(msg_class, type1, type2) \ | |
| 767 class msg_class : public IPC::MessageWithTuple< Tuple2<type1, type2> > { \ | |
| 768 public: \ | |
| 769 enum { ID = msg_class##__ID }; \ | |
| 770 msg_class(const type1& arg1, const type2& arg2); \ | |
| 771 ~msg_class(); \ | |
| 772 static void Log(const Message* msg, std::string* l); \ | |
| 773 }; | |
| 774 | |
| 775 #define IPC_MESSAGE_CONTROL3(msg_class, type1, type2, type3) \ | |
| 776 class msg_class : \ | |
| 777 public IPC::MessageWithTuple< Tuple3<type1, type2, type3> > { \ | |
| 778 public: \ | |
| 779 enum { ID = msg_class##__ID }; \ | |
| 780 msg_class(const type1& arg1, const type2& arg2, const type3& arg3); \ | |
| 781 ~msg_class(); \ | |
| 782 static void Log(const Message* msg, std::string* l); \ | |
| 783 }; | |
| 784 | |
| 785 #define IPC_MESSAGE_CONTROL4(msg_class, type1, type2, type3, type4) \ | |
| 786 class msg_class : \ | |
| 787 public IPC::MessageWithTuple< Tuple4<type1, type2, type3, type4> > { \ | |
| 788 public: \ | |
| 789 enum { ID = msg_class##__ID }; \ | |
| 790 msg_class(const type1& arg1, const type2& arg2, const type3& arg3, \ | |
| 791 const type4& arg4); \ | |
| 792 ~msg_class(); \ | |
| 793 static void Log(const Message* msg, std::string* l); \ | |
| 794 }; | |
| 795 | |
| 796 #define IPC_MESSAGE_CONTROL5(msg_class, type1, type2, type3, type4, type5) \ | |
| 797 class msg_class : \ | |
| 798 public IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, \ | |
| 799 type5> > { \ | |
| 800 public: \ | |
| 801 enum { ID = msg_class##__ID }; \ | |
| 802 msg_class(const type1& arg1, const type2& arg2, \ | |
| 803 const type3& arg3, const type4& arg4, const type5& arg5); \ | |
| 804 ~msg_class(); \ | |
| 805 static void Log(const Message* msg, std::string* l); \ | |
| 806 }; | |
| 807 | |
| 808 #define IPC_MESSAGE_ROUTED0(msg_class) \ | |
| 809 class msg_class : public IPC::Message { \ | |
| 810 public: \ | |
| 811 enum { ID = msg_class##__ID }; \ | |
| 812 msg_class(int32 routing_id) \ | |
| 813 : IPC::Message(routing_id, ID, PRIORITY_NORMAL) {} \ | |
| 814 }; | |
| 815 | |
| 816 #define IPC_MESSAGE_ROUTED1(msg_class, type1) \ | |
| 817 class msg_class : public IPC::MessageWithTuple< Tuple1<type1> > { \ | |
| 818 public: \ | |
| 819 enum { ID = msg_class##__ID }; \ | |
| 820 msg_class(int32 routing_id, const type1& arg1); \ | |
| 821 ~msg_class(); \ | |
| 822 static void Log(const Message* msg, std::string* l); \ | |
| 823 }; | |
| 824 | |
| 825 #define IPC_MESSAGE_ROUTED2(msg_class, type1, type2) \ | |
| 826 class msg_class \ | |
| 827 : public IPC::MessageWithTuple< Tuple2<type1, type2> > { \ | |
| 828 public: \ | |
| 829 enum { ID = msg_class##__ID }; \ | |
| 830 msg_class(int32 routing_id, const type1& arg1, const type2& arg2); \ | |
| 831 ~msg_class(); \ | |
| 832 static void Log(const Message* msg, std::string* l); \ | |
| 833 }; | |
| 834 | |
| 835 #define IPC_MESSAGE_ROUTED3(msg_class, type1, type2, type3) \ | |
| 836 class msg_class \ | |
| 837 : public IPC::MessageWithTuple< Tuple3<type1, type2, type3> > { \ | |
| 838 public: \ | |
| 839 enum { ID = msg_class##__ID }; \ | |
| 840 msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \ | |
| 841 const type3& arg3); \ | |
| 842 ~msg_class(); \ | |
| 843 static void Log(const Message* msg, std::string* l); \ | |
| 844 }; | |
| 845 | |
| 846 #define IPC_MESSAGE_ROUTED4(msg_class, type1, type2, type3, type4) \ | |
| 847 class msg_class \ | |
| 848 : public IPC::MessageWithTuple< Tuple4<type1, type2, type3, type4> > { \ | |
| 849 public: \ | |
| 850 enum { ID = msg_class##__ID }; \ | |
| 851 msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \ | |
| 852 const type3& arg3, const type4& arg4); \ | |
| 853 ~msg_class(); \ | |
| 854 static void Log(const Message* msg, std::string* l); \ | |
| 855 }; | |
| 856 | |
| 857 #define IPC_MESSAGE_ROUTED5(msg_class, type1, type2, type3, type4, type5) \ | |
| 858 class msg_class \ | |
| 859 : public IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, \ | |
| 860 type5> > { \ | |
| 861 public: \ | |
| 862 enum { ID = msg_class##__ID }; \ | |
| 863 msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \ | |
| 864 const type3& arg3, const type4& arg4, const type5& arg5); \ | |
| 865 ~msg_class(); \ | |
| 866 static void Log(const Message* msg, std::string* l); \ | |
| 867 }; | |
| 868 | |
| 869 #define IPC_SYNC_MESSAGE_CONTROL0_0(msg_class) \ | |
| 870 class msg_class : public IPC::MessageWithReply<Tuple0, Tuple0 > { \ | |
| 871 public: \ | |
| 872 enum { ID = msg_class##__ID }; \ | |
| 873 msg_class(); \ | |
| 874 ~msg_class(); \ | |
| 875 static void Log(const Message* msg, std::string* l); \ | |
| 876 }; | |
| 877 | |
| 878 #define IPC_SYNC_MESSAGE_CONTROL0_1(msg_class, type1_out) \ | |
| 879 class msg_class : public IPC::MessageWithReply<Tuple0, Tuple1<type1_out&> > {\ | |
| 880 public: \ | |
| 881 enum { ID = msg_class##__ID }; \ | |
| 882 msg_class(type1_out* arg1); \ | |
| 883 ~msg_class(); \ | |
| 884 static void Log(const Message* msg, std::string* l); \ | |
| 885 }; | |
| 886 | |
| 887 #define IPC_SYNC_MESSAGE_CONTROL0_2(msg_class, type1_out, type2_out) \ | |
| 888 class msg_class : \ | |
| 889 public IPC::MessageWithReply<Tuple0, Tuple2<type1_out&, type2_out&> > { \ | |
| 890 public: \ | |
| 891 enum { ID = msg_class##__ID }; \ | |
| 892 msg_class(type1_out* arg1, type2_out* arg2); \ | |
| 893 ~msg_class(); \ | |
| 894 static void Log(const Message* msg, std::string* l); \ | |
| 895 }; | |
| 896 | |
| 897 #define IPC_SYNC_MESSAGE_CONTROL0_3(msg_class, type1_out, type2_out, type3_out)
\ | |
| 898 class msg_class : \ | |
| 899 public IPC::MessageWithReply<Tuple0, \ | |
| 900 Tuple3<type1_out&, type2_out&, type3_out&> >{ \ | |
| 901 public: \ | |
| 902 enum { ID = msg_class##__ID }; \ | |
| 903 msg_class(type1_out* arg1, type2_out* arg2, type3_out* arg3); \ | |
| 904 ~msg_class(); \ | |
| 905 static void Log(const Message* msg, std::string* l); \ | |
| 906 }; | |
| 907 | |
| 908 #define IPC_SYNC_MESSAGE_CONTROL1_0(msg_class, type1_in) \ | |
| 909 class msg_class : \ | |
| 910 public IPC::MessageWithReply<Tuple1<type1_in>, Tuple0 > { \ | |
| 911 public: \ | |
| 912 enum { ID = msg_class##__ID }; \ | |
| 913 msg_class(const type1_in& arg1); \ | |
| 914 ~msg_class(); \ | |
| 915 static void Log(const Message* msg, std::string* l); \ | |
| 916 }; | |
| 917 | |
| 918 #define IPC_SYNC_MESSAGE_CONTROL1_1(msg_class, type1_in, type1_out) \ | |
| 919 class msg_class : \ | |
| 920 public IPC::MessageWithReply<Tuple1<type1_in>, Tuple1<type1_out&> > { \ | |
| 921 public: \ | |
| 922 enum { ID = msg_class##__ID }; \ | |
| 923 msg_class(const type1_in& arg1, type1_out* arg2); \ | |
| 924 ~msg_class(); \ | |
| 925 static void Log(const Message* msg, std::string* l); \ | |
| 926 }; | |
| 927 | |
| 928 #define IPC_SYNC_MESSAGE_CONTROL1_2(msg_class, type1_in, type1_out, type2_out) \ | |
| 929 class msg_class : \ | |
| 930 public IPC::MessageWithReply<Tuple1<type1_in>, Tuple2<type1_out&, type2_ou
t&> > { \ | |
| 931 public: \ | |
| 932 enum { ID = msg_class##__ID }; \ | |
| 933 msg_class(const type1_in& arg1, type1_out* arg2, type2_out* arg3); \ | |
| 934 ~msg_class(); \ | |
| 935 static void Log(const Message* msg, std::string* l); \ | |
| 936 }; | |
| 937 | |
| 938 #define IPC_SYNC_MESSAGE_CONTROL1_3(msg_class, type1_in, type1_out, type2_out, t
ype3_out) \ | |
| 939 class msg_class : \ | |
| 940 public IPC::MessageWithReply<Tuple1<type1_in>, \ | |
| 941 Tuple3<type1_out&, type2_out&, type3_out&> >{ \ | |
| 942 public: \ | |
| 943 enum { ID = msg_class##__ID }; \ | |
| 944 msg_class(const type1_in& arg1, type1_out* arg2, type2_out* arg3, type3_out*
arg4); \ | |
| 945 ~msg_class(); \ | |
| 946 static void Log(const Message* msg, std::string* l); \ | |
| 947 }; | |
| 948 | |
| 949 #define IPC_SYNC_MESSAGE_CONTROL2_0(msg_class, type1_in, type2_in) \ | |
| 950 class msg_class : \ | |
| 951 public IPC::MessageWithReply<Tuple2<type1_in, type2_in>, Tuple0 > { \ | |
| 952 public: \ | |
| 953 enum { ID = msg_class##__ID }; \ | |
| 954 msg_class(const type1_in& arg1, const type2_in& arg2); \ | |
| 955 ~msg_class(); \ | |
| 956 static void Log(const Message* msg, std::string* l); \ | |
| 957 }; | |
| 958 | |
| 959 #define IPC_SYNC_MESSAGE_CONTROL2_1(msg_class, type1_in, type2_in, type1_out) \ | |
| 960 class msg_class : \ | |
| 961 public IPC::MessageWithReply<Tuple2<type1_in, type2_in>, Tuple1<type1_out&
> > { \ | |
| 962 public: \ | |
| 963 enum { ID = msg_class##__ID }; \ | |
| 964 msg_class(const type1_in& arg1, const type2_in& arg2, type1_out* arg3); \ | |
| 965 ~msg_class(); \ | |
| 966 static void Log(const Message* msg, std::string* l); \ | |
| 967 }; | |
| 968 | |
| 969 #define IPC_SYNC_MESSAGE_CONTROL2_2(msg_class, type1_in, type2_in, type1_out, ty
pe2_out) \ | |
| 970 class msg_class : \ | |
| 971 public IPC::MessageWithReply<Tuple2<type1_in, type2_in>, \ | |
| 972 Tuple2<type1_out&, type2_out&> > { \ | |
| 973 public: \ | |
| 974 enum { ID = msg_class##__ID }; \ | |
| 975 msg_class(const type1_in& arg1, const type2_in& arg2, type1_out* arg3, type2_
out* arg4); \ | |
| 976 ~msg_class(); \ | |
| 977 static void Log(const Message* msg, std::string* l); \ | |
| 978 }; | |
| 979 | |
| 980 #define IPC_SYNC_MESSAGE_CONTROL2_3(msg_class, type1_in, type2_in, type1_out, ty
pe2_out, type3_out) \ | |
| 981 class msg_class : \ | |
| 982 public IPC::MessageWithReply<Tuple2<type1_in, type2_in>, \ | |
| 983 Tuple3<type1_out&, type2_out&, type3_out&> > { \ | |
| 984 public: \ | |
| 985 enum { ID = msg_class##__ID }; \ | |
| 986 msg_class(const type1_in& arg1, const type2_in& arg2, type1_out* arg3, type2_
out* arg4, type3_out* arg5); \ | |
| 987 ~msg_class(); \ | |
| 988 static void Log(const Message* msg, std::string* l); \ | |
| 989 }; | |
| 990 | |
| 991 #define IPC_SYNC_MESSAGE_CONTROL3_1(msg_class, type1_in, type2_in, type3_in, typ
e1_out) \ | |
| 992 class msg_class : \ | |
| 993 public IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \ | |
| 994 Tuple1<type1_out&> > { \ | |
| 995 public: \ | |
| 996 enum { ID = msg_class##__ID }; \ | |
| 997 msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, t
ype1_out* arg4); \ | |
| 998 ~msg_class(); \ | |
| 999 static void Log(const Message* msg, std::string* l); \ | |
| 1000 }; | |
| 1001 | |
| 1002 #define IPC_SYNC_MESSAGE_CONTROL3_2(msg_class, type1_in, type2_in, type3_in, typ
e1_out, type2_out) \ | |
| 1003 class msg_class : \ | |
| 1004 public IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \ | |
| 1005 Tuple2<type1_out&, type2_out&> > { \ | |
| 1006 public: \ | |
| 1007 enum { ID = msg_class##__ID }; \ | |
| 1008 msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, t
ype1_out* arg4, type2_out* arg5); \ | |
| 1009 ~msg_class(); \ | |
| 1010 static void Log(const Message* msg, std::string* l); \ | |
| 1011 }; | |
| 1012 | |
| 1013 #define IPC_SYNC_MESSAGE_CONTROL3_3(msg_class, type1_in, type2_in, type3_in, typ
e1_out, type2_out, type3_out) \ | |
| 1014 class msg_class : \ | |
| 1015 public IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \ | |
| 1016 Tuple3<type1_out&, type2_out&, type3_out&> > { \ | |
| 1017 public: \ | |
| 1018 enum { ID = msg_class##__ID }; \ | |
| 1019 msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, t
ype1_out* arg4, type2_out* arg5, type3_out* arg6); \ | |
| 1020 ~msg_class(); \ | |
| 1021 static void Log(const Message* msg, std::string* l); \ | |
| 1022 }; | |
| 1023 | |
| 1024 #define IPC_SYNC_MESSAGE_CONTROL3_4(msg_class, type1_in, type2_in, type3_in, typ
e1_out, type2_out, type3_out, type4_out) \ | |
| 1025 class msg_class : \ | |
| 1026 public IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \ | |
| 1027 Tuple4<type1_out&, type2_out&, type3_out&, type4_out&> > { \ | |
| 1028 public: \ | |
| 1029 enum { ID = msg_class##__ID }; \ | |
| 1030 msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, t
ype1_out* arg4, type2_out* arg5, type3_out* arg6, type4_out* arg7); \ | |
| 1031 ~msg_class(); \ | |
| 1032 static void Log(const Message* msg, std::string* l); \ | |
| 1033 }; | |
| 1034 | |
| 1035 #define IPC_SYNC_MESSAGE_CONTROL4_1(msg_class, type1_in, type2_in, type3_in, typ
e4_in, type1_out) \ | |
| 1036 class msg_class : \ | |
| 1037 public IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in
>, \ | |
| 1038 Tuple1<type1_out&> > { \ | |
| 1039 public: \ | |
| 1040 enum { ID = msg_class##__ID }; \ | |
| 1041 msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, c
onst type4_in& arg4, type1_out* arg6); \ | |
| 1042 ~msg_class(); \ | |
| 1043 static void Log(const Message* msg, std::string* l); \ | |
| 1044 }; | |
| 1045 | |
| 1046 #define IPC_SYNC_MESSAGE_CONTROL4_2(msg_class, type1_in, type2_in, type3_in, typ
e4_in, type1_out, type2_out) \ | |
| 1047 class msg_class : \ | |
| 1048 public IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in
>, \ | |
| 1049 Tuple2<type1_out&, type2_out&> > { \ | |
| 1050 public: \ | |
| 1051 enum { ID = msg_class##__ID }; \ | |
| 1052 msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, c
onst type4_in& arg4, type1_out* arg5, type2_out* arg6); \ | |
| 1053 ~msg_class(); \ | |
| 1054 static void Log(const Message* msg, std::string* l); \ | |
| 1055 }; | |
| 1056 | |
| 1057 #define IPC_SYNC_MESSAGE_ROUTED0_0(msg_class) \ | |
| 1058 class msg_class : public IPC::MessageWithReply<Tuple0, Tuple0 > { \ | |
| 1059 public: \ | |
| 1060 enum { ID = msg_class##__ID }; \ | |
| 1061 msg_class(int routing_id); \ | |
| 1062 ~msg_class(); \ | |
| 1063 static void Log(const Message* msg, std::string* l); \ | |
| 1064 }; | |
| 1065 | |
| 1066 #define IPC_SYNC_MESSAGE_ROUTED0_1(msg_class, type1_out) \ | |
| 1067 class msg_class : public IPC::MessageWithReply<Tuple0, Tuple1<type1_out&> > {
\ | |
| 1068 public: \ | |
| 1069 enum { ID = msg_class##__ID }; \ | |
| 1070 msg_class(int routing_id, type1_out* arg1); \ | |
| 1071 ~msg_class(); \ | |
| 1072 static void Log(const Message* msg, std::string* l); \ | |
| 1073 }; | |
| 1074 | |
| 1075 #define IPC_SYNC_MESSAGE_ROUTED0_2(msg_class, type1_out, type2_out) \ | |
| 1076 class msg_class : \ | |
| 1077 public IPC::MessageWithReply<Tuple0, Tuple2<type1_out&, type2_out&> > { \ | |
| 1078 public: \ | |
| 1079 enum { ID = msg_class##__ID }; \ | |
| 1080 msg_class(int routing_id, type1_out* arg1, type2_out* arg2); \ | |
| 1081 ~msg_class(); \ | |
| 1082 static void Log(const Message* msg, std::string* l); \ | |
| 1083 }; | |
| 1084 | |
| 1085 #define IPC_SYNC_MESSAGE_ROUTED0_3(msg_class, type1_out, type2_out, type3_out) \ | |
| 1086 class msg_class : \ | |
| 1087 public IPC::MessageWithReply<Tuple0, \ | |
| 1088 Tuple3<type1_out&, type2_out&, type3_out&> >{ \ | |
| 1089 public: \ | |
| 1090 enum { ID = msg_class##__ID }; \ | |
| 1091 msg_class(int routing_id, type1_out* arg1, type2_out* arg2, type3_out* arg3);
\ | |
| 1092 ~msg_class(); \ | |
| 1093 static void Log(const Message* msg, std::string* l); \ | |
| 1094 }; | |
| 1095 | |
| 1096 #define IPC_SYNC_MESSAGE_ROUTED1_0(msg_class, type1_in) \ | |
| 1097 class msg_class : \ | |
| 1098 public IPC::MessageWithReply<Tuple1<type1_in>, Tuple0 > { \ | |
| 1099 public: \ | |
| 1100 enum { ID = msg_class##__ID }; \ | |
| 1101 msg_class(int routing_id, const type1_in& arg1); \ | |
| 1102 ~msg_class(); \ | |
| 1103 static void Log(const Message* msg, std::string* l); \ | |
| 1104 }; | |
| 1105 | |
| 1106 #define IPC_SYNC_MESSAGE_ROUTED1_1(msg_class, type1_in, type1_out) \ | |
| 1107 class msg_class : \ | |
| 1108 public IPC::MessageWithReply<Tuple1<type1_in>, Tuple1<type1_out&> > { \ | |
| 1109 public: \ | |
| 1110 enum { ID = msg_class##__ID }; \ | |
| 1111 msg_class(int routing_id, const type1_in& arg1, type1_out* arg2); \ | |
| 1112 ~msg_class(); \ | |
| 1113 static void Log(const Message* msg, std::string* l); \ | |
| 1114 }; | |
| 1115 | |
| 1116 #define IPC_SYNC_MESSAGE_ROUTED1_2(msg_class, type1_in, type1_out, type2_out) \ | |
| 1117 class msg_class : \ | |
| 1118 public IPC::MessageWithReply<Tuple1<type1_in>, Tuple2<type1_out&, type2_ou
t&> > { \ | |
| 1119 public: \ | |
| 1120 enum { ID = msg_class##__ID }; \ | |
| 1121 msg_class(int routing_id, const type1_in& arg1, type1_out* arg2, type2_out* a
rg3); \ | |
| 1122 ~msg_class(); \ | |
| 1123 static void Log(const Message* msg, std::string* l); \ | |
| 1124 }; | |
| 1125 | |
| 1126 #define IPC_SYNC_MESSAGE_ROUTED1_3(msg_class, type1_in, type1_out, type2_out, ty
pe3_out) \ | |
| 1127 class msg_class : \ | |
| 1128 public IPC::MessageWithReply<Tuple1<type1_in>, \ | |
| 1129 Tuple3<type1_out&, type2_out&, type3_out&> >{ \ | |
| 1130 public: \ | |
| 1131 enum { ID = msg_class##__ID }; \ | |
| 1132 msg_class(int routing_id, const type1_in& arg1, type1_out* arg2, type2_out* a
rg3, type3_out* arg4); \ | |
| 1133 ~msg_class(); \ | |
| 1134 static void Log(const Message* msg, std::string* l); \ | |
| 1135 }; | |
| 1136 | |
| 1137 #define IPC_SYNC_MESSAGE_ROUTED1_4(msg_class, type1_in, type1_out, type2_out, ty
pe3_out, type4_out) \ | |
| 1138 class msg_class : \ | |
| 1139 public IPC::MessageWithReply<Tuple1<type1_in>, \ | |
| 1140 Tuple4<type1_out&, type2_out&, type3_out&, type4_out&> >{ \ | |
| 1141 public: \ | |
| 1142 enum { ID = msg_class##__ID }; \ | |
| 1143 msg_class(int routing_id, const type1_in& arg1, type1_out* arg2, type2_out* a
rg3, type3_out* arg4, type4_out* arg5); \ | |
| 1144 ~msg_class(); \ | |
| 1145 static void Log(const Message* msg, std::string* l); \ | |
| 1146 }; | |
| 1147 | |
| 1148 #define IPC_SYNC_MESSAGE_ROUTED2_0(msg_class, type1_in, type2_in) \ | |
| 1149 class msg_class : \ | |
| 1150 public IPC::MessageWithReply<Tuple2<type1_in, type2_in>, Tuple0 > { \ | |
| 1151 public: \ | |
| 1152 enum { ID = msg_class##__ID }; \ | |
| 1153 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2); \ | |
| 1154 ~msg_class(); \ | |
| 1155 static void Log(const Message* msg, std::string* l); \ | |
| 1156 }; | |
| 1157 | |
| 1158 #define IPC_SYNC_MESSAGE_ROUTED2_1(msg_class, type1_in, type2_in, type1_out) \ | |
| 1159 class msg_class : \ | |
| 1160 public IPC::MessageWithReply<Tuple2<type1_in, type2_in>, Tuple1<type1_out&
> > { \ | |
| 1161 public: \ | |
| 1162 enum { ID = msg_class##__ID }; \ | |
| 1163 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, type1_o
ut* arg3); \ | |
| 1164 ~msg_class(); \ | |
| 1165 static void Log(const Message* msg, std::string* l); \ | |
| 1166 }; | |
| 1167 | |
| 1168 #define IPC_SYNC_MESSAGE_ROUTED2_2(msg_class, type1_in, type2_in, type1_out, typ
e2_out) \ | |
| 1169 class msg_class : \ | |
| 1170 public IPC::MessageWithReply<Tuple2<type1_in, type2_in>, \ | |
| 1171 Tuple2<type1_out&, type2_out&> > { \ | |
| 1172 public: \ | |
| 1173 enum { ID = msg_class##__ID }; \ | |
| 1174 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, type1_o
ut* arg3, type2_out* arg4); \ | |
| 1175 ~msg_class(); \ | |
| 1176 static void Log(const Message* msg, std::string* l); \ | |
| 1177 }; | |
| 1178 | |
| 1179 #define IPC_SYNC_MESSAGE_ROUTED2_3(msg_class, type1_in, type2_in, type1_out, typ
e2_out, type3_out) \ | |
| 1180 class msg_class : \ | |
| 1181 public IPC::MessageWithReply<Tuple2<type1_in, type2_in>, \ | |
| 1182 Tuple3<type1_out&, type2_out&, type3_out&> > { \ | |
| 1183 public: \ | |
| 1184 enum { ID = msg_class##__ID }; \ | |
| 1185 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, type1_o
ut* arg3, type2_out* arg4, type3_out* arg5); \ | |
| 1186 ~msg_class(); \ | |
| 1187 static void Log(const Message* msg, std::string* l); \ | |
| 1188 }; | |
| 1189 | |
| 1190 #define IPC_SYNC_MESSAGE_ROUTED3_0(msg_class, type1_in, type2_in, type3_in) \ | |
| 1191 class msg_class : \ | |
| 1192 public IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, Tuple0
> { \ | |
| 1193 public: \ | |
| 1194 enum { ID = msg_class##__ID }; \ | |
| 1195 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const t
ype3_in& arg3); \ | |
| 1196 ~msg_class(); \ | |
| 1197 static void Log(const Message* msg, std::string* l); \ | |
| 1198 }; | |
| 1199 | |
| 1200 #define IPC_SYNC_MESSAGE_ROUTED3_1(msg_class, type1_in, type2_in, type3_in, type
1_out) \ | |
| 1201 class msg_class : \ | |
| 1202 public IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \ | |
| 1203 Tuple1<type1_out&> > { \ | |
| 1204 public: \ | |
| 1205 enum { ID = msg_class##__ID }; \ | |
| 1206 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const t
ype3_in& arg3, type1_out* arg4); \ | |
| 1207 ~msg_class(); \ | |
| 1208 static void Log(const Message* msg, std::string* l); \ | |
| 1209 }; | |
| 1210 | |
| 1211 #define IPC_SYNC_MESSAGE_ROUTED3_2(msg_class, type1_in, type2_in, type3_in, type
1_out, type2_out) \ | |
| 1212 class msg_class : \ | |
| 1213 public IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \ | |
| 1214 Tuple2<type1_out&, type2_out&> > { \ | |
| 1215 public: \ | |
| 1216 enum { ID = msg_class##__ID }; \ | |
| 1217 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const t
ype3_in& arg3, type1_out* arg4, type2_out* arg5); \ | |
| 1218 ~msg_class(); \ | |
| 1219 static void Log(const Message* msg, std::string* l); \ | |
| 1220 }; | |
| 1221 | |
| 1222 #define IPC_SYNC_MESSAGE_ROUTED3_3(msg_class, type1_in, type2_in, type3_in, type
1_out, type2_out, type3_out) \ | |
| 1223 class msg_class : \ | |
| 1224 public IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \ | |
| 1225 Tuple3<type1_out&, type2_out&, type3_out&> > { \ | |
| 1226 public: \ | |
| 1227 enum { ID = msg_class##__ID }; \ | |
| 1228 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const t
ype3_in& arg3, type1_out* arg4, type2_out* arg5, type3_out* arg6); \ | |
| 1229 ~msg_class(); \ | |
| 1230 static void Log(const Message* msg, std::string* l); \ | |
| 1231 }; | |
| 1232 | |
| 1233 #define IPC_SYNC_MESSAGE_ROUTED3_4(msg_class, type1_in, type2_in, type3_in, type
1_out, type2_out, type3_out, type4_out) \ | |
| 1234 class msg_class : \ | |
| 1235 public IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \ | |
| 1236 Tuple4<type1_out&, type2_out&, type3_out&, type4_out&> > { \ | |
| 1237 public: \ | |
| 1238 enum { ID = msg_class##__ID }; \ | |
| 1239 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const t
ype3_in& arg3, type1_out* arg4, type2_out* arg5, type3_out* arg6, type4_out* arg
7); \ | |
| 1240 ~msg_class(); \ | |
| 1241 static void Log(const Message* msg, std::string* l); \ | |
| 1242 }; | |
| 1243 | |
| 1244 #define IPC_SYNC_MESSAGE_ROUTED4_0(msg_class, type1_in, type2_in, type3_in, type
4_in) \ | |
| 1245 class msg_class : \ | |
| 1246 public IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in
>, \ | |
| 1247 Tuple0 > { \ | |
| 1248 public: \ | |
| 1249 enum { ID = msg_class##__ID }; \ | |
| 1250 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const t
ype3_in& arg3, const type4_in& arg4); \ | |
| 1251 ~msg_class(); \ | |
| 1252 static void Log(const Message* msg, std::string* l); \ | |
| 1253 }; | |
| 1254 | |
| 1255 #define IPC_SYNC_MESSAGE_ROUTED4_1(msg_class, type1_in, type2_in, type3_in, type
4_in, type1_out) \ | |
| 1256 class msg_class : \ | |
| 1257 public IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in
>, \ | |
| 1258 Tuple1<type1_out&> > { \ | |
| 1259 public: \ | |
| 1260 enum { ID = msg_class##__ID }; \ | |
| 1261 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const t
ype3_in& arg3, const type4_in& arg4, type1_out* arg6); \ | |
| 1262 ~msg_class(); \ | |
| 1263 static void Log(const Message* msg, std::string* l); \ | |
| 1264 }; | |
| 1265 | |
| 1266 #define IPC_SYNC_MESSAGE_ROUTED4_2(msg_class, type1_in, type2_in, type3_in, type
4_in, type1_out, type2_out) \ | |
| 1267 class msg_class : \ | |
| 1268 public IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in
>, \ | |
| 1269 Tuple2<type1_out&, type2_out&> > { \ | |
| 1270 public: \ | |
| 1271 enum { ID = msg_class##__ID }; \ | |
| 1272 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const t
ype3_in& arg3, const type4_in& arg4, type1_out* arg5, type2_out* arg6); \ | |
| 1273 ~msg_class(); \ | |
| 1274 static void Log(const Message* msg, std::string* l); \ | |
| 1275 }; | |
| 1276 | |
| 1277 #define IPC_SYNC_MESSAGE_ROUTED4_3(msg_class, type1_in, type2_in, type3_in, type
4_in, type1_out, type2_out, type3_out) \ | |
| 1278 class msg_class : \ | |
| 1279 public IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in
>, \ | |
| 1280 Tuple3<type1_out&, type2_out&, type3_out&> > { \ | |
| 1281 public: \ | |
| 1282 enum { ID = msg_class##__ID }; \ | |
| 1283 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const t
ype3_in& arg3, const type4_in& arg4, type1_out* arg5, type2_out* arg6, type3_out
* arg7); \ | |
| 1284 ~msg_class(); \ | |
| 1285 static void Log(const Message* msg, std::string* l); \ | |
| 1286 }; | |
| 1287 | |
| 1288 #define IPC_SYNC_MESSAGE_ROUTED5_0(msg_class, type1_in, type2_in, type3_in, type
4_in, type5_in) \ | |
| 1289 class msg_class : \ | |
| 1290 public IPC::MessageWithReply<Tuple5<type1_in, type2_in, type3_in, type4_in
, type5_in>, \ | |
| 1291 Tuple0 > { \ | |
| 1292 public: \ | |
| 1293 enum { ID = msg_class##__ID }; \ | |
| 1294 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const t
ype3_in& arg3, const type4_in& arg4, const type5_in& arg5); \ | |
| 1295 ~msg_class(); \ | |
| 1296 static void Log(const Message* msg, std::string* l); \ | |
| 1297 }; | |
| 1298 | |
| 1299 #define IPC_SYNC_MESSAGE_ROUTED5_1(msg_class, type1_in, type2_in, type3_in, type
4_in, type5_in, type1_out) \ | |
| 1300 class msg_class : \ | |
| 1301 public IPC::MessageWithReply<Tuple5<type1_in, type2_in, type3_in, type4_in
, type5_in>, \ | |
| 1302 Tuple1<type1_out&> > { \ | |
| 1303 public: \ | |
| 1304 enum { ID = msg_class##__ID }; \ | |
| 1305 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const t
ype3_in& arg3, const type4_in& arg4, const type5_in& arg5, type1_out* arg6); \ | |
| 1306 ~msg_class(); \ | |
| 1307 static void Log(const Message* msg, std::string* l); \ | |
| 1308 }; | |
| 1309 | |
| 1310 #define IPC_SYNC_MESSAGE_ROUTED5_2(msg_class, type1_in, type2_in, type3_in, type
4_in, type5_in, type1_out, type2_out) \ | |
| 1311 class msg_class : \ | |
| 1312 public IPC::MessageWithReply<Tuple5<type1_in, type2_in, type3_in, type4_in
, type5_in>, \ | |
| 1313 Tuple2<type1_out&, type2_out&> > { \ | |
| 1314 public: \ | |
| 1315 enum { ID = msg_class##__ID }; \ | |
| 1316 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const t
ype3_in& arg3, const type4_in& arg4, const type4_in& arg5, type1_out* arg6, type
2_out* arg7); \ | |
| 1317 ~msg_class(); \ | |
| 1318 static void Log(const Message* msg, std::string* l); \ | |
| 1319 }; | |
| 1320 | |
| 1321 #define IPC_SYNC_MESSAGE_ROUTED5_3(msg_class, type1_in, type2_in, type3_in, type
4_in, type5_in, type1_out, type2_out, type3_out) \ | |
| 1322 class msg_class : \ | |
| 1323 public IPC::MessageWithReply<Tuple5<type1_in, type2_in, type3_in, type4_in
, type5_in>, \ | |
| 1324 Tuple3<type1_out&, type2_out&, type3_out&> > { \ | |
| 1325 public: \ | |
| 1326 enum { ID = msg_class##__ID }; \ | |
| 1327 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const t
ype3_in& arg3, const type4_in& arg4, const type4_in& arg5, type1_out* arg6, type
2_out* arg7, type3_out* arg8); \ | |
| 1328 ~msg_class(); \ | |
| 1329 static void Log(const Message* msg, std::string* l); \ | |
| 1330 }; | |
| 1331 | |
| 1332 #endif // #if defined() | |
| OLD | NEW |