| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // This header is meant to be included in multiple passes, hence no traditional | |
| 6 // header guard. | |
| 7 // | |
| 8 // In the first pass, IPC_MESSAGE_MACROS_ENUMS should be defined, which will | |
| 9 // create enums for each of the messages defined with the IPC_MESSAGE_* macros. | |
| 10 // | |
| 11 // In the second pass, either IPC_MESSAGE_MACROS_DEBUGSTRINGS or | |
| 12 // IPC_MESSAGE_MACROS_CLASSES should be defined (if both, DEBUGSTRINGS takes | |
| 13 // precedence). Only one .cc file should have DEBUGSTRINGS defined, as this | |
| 14 // will create helper functions mapping message types to strings. Having | |
| 15 // CLASSES defined will create classes for each of the messages defined with | |
| 16 // the IPC_MESSAGE_* macros. | |
| 17 // | |
| 18 // "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 | |
| 20 // 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 | |
| 22 // out). The caller does a Send([route id, ], in1, &out1, &out2). | |
| 23 // The receiver's handler function will be | |
| 24 // void OnSyncMessageName(const type1& in1, type2* out1, type3* out2) | |
| 25 // | |
| 26 // | |
| 27 // 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 size. The receiver | |
| 29 // 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. | |
| 31 // | |
| 32 // Use the IPC_MESSAGE_HANDLER_DELAY_REPLY macro instead of IPC_MESSAGE_HANDLER | |
| 33 // IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_SyncMessageName, | |
| 34 // OnSyncMessageName) | |
| 35 // | |
| 36 // The handler function will look like: | |
| 37 // void OnSyncMessageName(const type1& in1, IPC::Message* reply_msg); | |
| 38 // | |
| 39 // Receiver stashes the IPC::Message* pointer, and when it's ready, it does: | |
| 40 // ViewHostMsg_SyncMessageName::WriteReplyParams(reply_msg, out1, out2); | |
| 41 // Send(reply_msg); | |
| 42 | |
| 43 #include "chrome/common/ipc_message_utils.h" | |
| 44 | |
| 45 | |
| 46 #ifndef MESSAGES_INTERNAL_FILE | |
| 47 #error This file should only be included by X_messages.h, which needs to define
MESSAGES_INTERNAL_FILE first. | |
| 48 #endif | |
| 49 | |
| 50 // Trick scons and xcode into seeing the possible real dependencies since they | |
| 51 // don't understand #include MESSAGES_INTERNAL_FILE. See http://crbug.com/7828 | |
| 52 #if 0 | |
| 53 #include "chrome/common/ipc_sync_message_unittest.h" | |
| 54 #include "chrome/common/plugin_messages_internal.h" | |
| 55 #include "chrome/common/render_messages_internal.h" | |
| 56 #include "chrome/common/devtools_messages_internal.h" | |
| 57 #include "chrome/test/automation/automation_messages_internal.h" | |
| 58 #include "chrome/common/worker_messages_internal.h" | |
| 59 #endif | |
| 60 | |
| 61 #ifndef IPC_MESSAGE_MACROS_INCLUDE_BLOCK | |
| 62 #define IPC_MESSAGE_MACROS_INCLUDE_BLOCK | |
| 63 | |
| 64 // Multi-pass include of X_messages_internal.h. Preprocessor magic allows | |
| 65 // us to use 1 header to define the enums and classes for our render messages. | |
| 66 #define IPC_MESSAGE_MACROS_ENUMS | |
| 67 #include MESSAGES_INTERNAL_FILE | |
| 68 | |
| 69 #define IPC_MESSAGE_MACROS_CLASSES | |
| 70 #include MESSAGES_INTERNAL_FILE | |
| 71 | |
| 72 #ifdef IPC_MESSAGE_MACROS_LOG_ENABLED | |
| 73 #define IPC_MESSAGE_MACROS_LOG | |
| 74 #include MESSAGES_INTERNAL_FILE | |
| 75 #endif | |
| 76 | |
| 77 #undef MESSAGES_INTERNAL_FILE | |
| 78 #undef IPC_MESSAGE_MACROS_INCLUDE_BLOCK | |
| 79 | |
| 80 #endif | |
| 81 | |
| 82 | |
| 83 // Undefine the macros from the previous pass (if any). | |
| 84 #undef IPC_BEGIN_MESSAGES | |
| 85 #undef IPC_END_MESSAGES | |
| 86 #undef IPC_MESSAGE_CONTROL0 | |
| 87 #undef IPC_MESSAGE_CONTROL1 | |
| 88 #undef IPC_MESSAGE_CONTROL2 | |
| 89 #undef IPC_MESSAGE_CONTROL3 | |
| 90 #undef IPC_MESSAGE_CONTROL4 | |
| 91 #undef IPC_MESSAGE_CONTROL5 | |
| 92 #undef IPC_MESSAGE_ROUTED0 | |
| 93 #undef IPC_MESSAGE_ROUTED1 | |
| 94 #undef IPC_MESSAGE_ROUTED2 | |
| 95 #undef IPC_MESSAGE_ROUTED3 | |
| 96 #undef IPC_MESSAGE_ROUTED4 | |
| 97 #undef IPC_MESSAGE_ROUTED5 | |
| 98 #undef IPC_SYNC_MESSAGE_CONTROL0_0 | |
| 99 #undef IPC_SYNC_MESSAGE_CONTROL0_1 | |
| 100 #undef IPC_SYNC_MESSAGE_CONTROL0_2 | |
| 101 #undef IPC_SYNC_MESSAGE_CONTROL0_3 | |
| 102 #undef IPC_SYNC_MESSAGE_CONTROL1_0 | |
| 103 #undef IPC_SYNC_MESSAGE_CONTROL1_1 | |
| 104 #undef IPC_SYNC_MESSAGE_CONTROL1_2 | |
| 105 #undef IPC_SYNC_MESSAGE_CONTROL1_3 | |
| 106 #undef IPC_SYNC_MESSAGE_CONTROL2_0 | |
| 107 #undef IPC_SYNC_MESSAGE_CONTROL2_1 | |
| 108 #undef IPC_SYNC_MESSAGE_CONTROL2_2 | |
| 109 #undef IPC_SYNC_MESSAGE_CONTROL2_3 | |
| 110 #undef IPC_SYNC_MESSAGE_CONTROL3_1 | |
| 111 #undef IPC_SYNC_MESSAGE_CONTROL3_2 | |
| 112 #undef IPC_SYNC_MESSAGE_CONTROL3_3 | |
| 113 #undef IPC_SYNC_MESSAGE_CONTROL4_1 | |
| 114 #undef IPC_SYNC_MESSAGE_CONTROL4_2 | |
| 115 #undef IPC_SYNC_MESSAGE_ROUTED0_0 | |
| 116 #undef IPC_SYNC_MESSAGE_ROUTED0_1 | |
| 117 #undef IPC_SYNC_MESSAGE_ROUTED0_2 | |
| 118 #undef IPC_SYNC_MESSAGE_ROUTED0_3 | |
| 119 #undef IPC_SYNC_MESSAGE_ROUTED1_0 | |
| 120 #undef IPC_SYNC_MESSAGE_ROUTED1_1 | |
| 121 #undef IPC_SYNC_MESSAGE_ROUTED1_2 | |
| 122 #undef IPC_SYNC_MESSAGE_ROUTED1_3 | |
| 123 #undef IPC_SYNC_MESSAGE_ROUTED1_4 | |
| 124 #undef IPC_SYNC_MESSAGE_ROUTED2_0 | |
| 125 #undef IPC_SYNC_MESSAGE_ROUTED2_1 | |
| 126 #undef IPC_SYNC_MESSAGE_ROUTED2_2 | |
| 127 #undef IPC_SYNC_MESSAGE_ROUTED2_3 | |
| 128 #undef IPC_SYNC_MESSAGE_ROUTED3_0 | |
| 129 #undef IPC_SYNC_MESSAGE_ROUTED3_1 | |
| 130 #undef IPC_SYNC_MESSAGE_ROUTED3_2 | |
| 131 #undef IPC_SYNC_MESSAGE_ROUTED3_3 | |
| 132 #undef IPC_SYNC_MESSAGE_ROUTED4_0 | |
| 133 #undef IPC_SYNC_MESSAGE_ROUTED4_1 | |
| 134 #undef IPC_SYNC_MESSAGE_ROUTED4_2 | |
| 135 #undef IPC_SYNC_MESSAGE_ROUTED4_3 | |
| 136 | |
| 137 #if defined(IPC_MESSAGE_MACROS_ENUMS) | |
| 138 #undef IPC_MESSAGE_MACROS_ENUMS | |
| 139 | |
| 140 // TODO(jabdelmalek): we're using the lowest 12 bits of type for the message | |
| 141 // id, and the highest 4 bits for the channel type. This constrains us to | |
| 142 // 16 channel types (currently using 8) and 4K messages per type. Should | |
| 143 // really make type be 32 bits, but then we break automation with older Chrome | |
| 144 // builds.. | |
| 145 // Do label##PreStart so that automation messages keep the same id as before. | |
| 146 #define IPC_BEGIN_MESSAGES(label) \ | |
| 147 enum label##MsgType { \ | |
| 148 label##Start = label##MsgStart << 12, \ | |
| 149 label##PreStart = (label##MsgStart << 12) - 1, | |
| 150 | |
| 151 #define IPC_END_MESSAGES(label) \ | |
| 152 label##End \ | |
| 153 }; | |
| 154 | |
| 155 #define IPC_MESSAGE_CONTROL0(msg_class) \ | |
| 156 msg_class##__ID, | |
| 157 | |
| 158 #define IPC_MESSAGE_CONTROL1(msg_class, type1) \ | |
| 159 msg_class##__ID, | |
| 160 | |
| 161 #define IPC_MESSAGE_CONTROL2(msg_class, type1, type2) \ | |
| 162 msg_class##__ID, | |
| 163 | |
| 164 #define IPC_MESSAGE_CONTROL3(msg_class, type1, type2, type3) \ | |
| 165 msg_class##__ID, | |
| 166 | |
| 167 #define IPC_MESSAGE_CONTROL4(msg_class, type1, type2, type3, type4) \ | |
| 168 msg_class##__ID, | |
| 169 | |
| 170 #define IPC_MESSAGE_CONTROL5(msg_class, type1, type2, type3, type4, type5) \ | |
| 171 msg_class##__ID, | |
| 172 | |
| 173 #define IPC_MESSAGE_ROUTED0(msg_class) \ | |
| 174 msg_class##__ID, | |
| 175 | |
| 176 #define IPC_MESSAGE_ROUTED1(msg_class, type1) \ | |
| 177 msg_class##__ID, | |
| 178 | |
| 179 #define IPC_MESSAGE_ROUTED2(msg_class, type1, type2) \ | |
| 180 msg_class##__ID, | |
| 181 | |
| 182 #define IPC_MESSAGE_ROUTED3(msg_class, type1, type2, type3) \ | |
| 183 msg_class##__ID, | |
| 184 | |
| 185 #define IPC_MESSAGE_ROUTED4(msg_class, type1, type2, type3, type4) \ | |
| 186 msg_class##__ID, | |
| 187 | |
| 188 #define IPC_MESSAGE_ROUTED5(msg_class, type1, type2, type3, type4, type5) \ | |
| 189 msg_class##__ID, | |
| 190 | |
| 191 #define IPC_SYNC_MESSAGE_CONTROL0_0(msg_class) \ | |
| 192 msg_class##__ID, | |
| 193 | |
| 194 #define IPC_SYNC_MESSAGE_CONTROL0_1(msg_class, type1_out) \ | |
| 195 msg_class##__ID, | |
| 196 | |
| 197 #define IPC_SYNC_MESSAGE_CONTROL0_2(msg_class, type1_out, type2_out) \ | |
| 198 msg_class##__ID, | |
| 199 | |
| 200 #define IPC_SYNC_MESSAGE_CONTROL0_3(msg_class, type1_out, type2_out, type3_out)
\ | |
| 201 msg_class##__ID, | |
| 202 | |
| 203 #define IPC_SYNC_MESSAGE_CONTROL1_0(msg_class, type1_in) \ | |
| 204 msg_class##__ID, | |
| 205 | |
| 206 #define IPC_SYNC_MESSAGE_CONTROL1_1(msg_class, type1_in, type1_out) \ | |
| 207 msg_class##__ID, | |
| 208 | |
| 209 #define IPC_SYNC_MESSAGE_CONTROL1_2(msg_class, type1_in, type1_out, type2_out) \ | |
| 210 msg_class##__ID, | |
| 211 | |
| 212 #define IPC_SYNC_MESSAGE_CONTROL1_3(msg_class, type1_in, type1_out, type2_out, t
ype3_out) \ | |
| 213 msg_class##__ID, | |
| 214 | |
| 215 #define IPC_SYNC_MESSAGE_CONTROL2_0(msg_class, type1_in, type2_in) \ | |
| 216 msg_class##__ID, | |
| 217 | |
| 218 #define IPC_SYNC_MESSAGE_CONTROL2_1(msg_class, type1_in, type2_in, type1_out) \ | |
| 219 msg_class##__ID, | |
| 220 | |
| 221 #define IPC_SYNC_MESSAGE_CONTROL2_2(msg_class, type1_in, type2_in, type1_out, ty
pe2_out) \ | |
| 222 msg_class##__ID, | |
| 223 | |
| 224 #define IPC_SYNC_MESSAGE_CONTROL2_3(msg_class, type1_in, type2_in, type1_out, ty
pe2_out, type3_out) \ | |
| 225 msg_class##__ID, | |
| 226 | |
| 227 #define IPC_SYNC_MESSAGE_CONTROL3_1(msg_class, type1_in, type2_in, type3_in, typ
e1_out) \ | |
| 228 msg_class##__ID, | |
| 229 | |
| 230 #define IPC_SYNC_MESSAGE_CONTROL3_2(msg_class, type1_in, type2_in, type3_in, typ
e1_out, type2_out) \ | |
| 231 msg_class##__ID, | |
| 232 | |
| 233 #define IPC_SYNC_MESSAGE_CONTROL3_3(msg_class, type1_in, type2_in, type3_in, typ
e1_out, type2_out, type3_out) \ | |
| 234 msg_class##__ID, | |
| 235 | |
| 236 #define IPC_SYNC_MESSAGE_CONTROL4_1(msg_class, type1_in, type2_in, type3_in, typ
e4_in, type1_out) \ | |
| 237 msg_class##__ID, | |
| 238 | |
| 239 #define IPC_SYNC_MESSAGE_CONTROL4_2(msg_class, type1_in, type2_in, type3_in, typ
e4_in, type1_out, type2_out) \ | |
| 240 msg_class##__ID, | |
| 241 | |
| 242 #define IPC_SYNC_MESSAGE_ROUTED0_0(msg_class) \ | |
| 243 msg_class##__ID, | |
| 244 | |
| 245 #define IPC_SYNC_MESSAGE_ROUTED0_1(msg_class, type1_out) \ | |
| 246 msg_class##__ID, | |
| 247 | |
| 248 #define IPC_SYNC_MESSAGE_ROUTED0_2(msg_class, type1_out, type2_out) \ | |
| 249 msg_class##__ID, | |
| 250 | |
| 251 #define IPC_SYNC_MESSAGE_ROUTED0_3(msg_class, type1_out, type2_out, type3_out) \ | |
| 252 msg_class##__ID, | |
| 253 | |
| 254 #define IPC_SYNC_MESSAGE_ROUTED1_0(msg_class, type1_in) \ | |
| 255 msg_class##__ID, | |
| 256 | |
| 257 #define IPC_SYNC_MESSAGE_ROUTED1_1(msg_class, type1_in, type1_out) \ | |
| 258 msg_class##__ID, | |
| 259 | |
| 260 #define IPC_SYNC_MESSAGE_ROUTED1_2(msg_class, type1_in, type1_out, type2_out) \ | |
| 261 msg_class##__ID, | |
| 262 | |
| 263 #define IPC_SYNC_MESSAGE_ROUTED1_3(msg_class, type1_in, type1_out, type2_out, ty
pe3_out) \ | |
| 264 msg_class##__ID, | |
| 265 | |
| 266 #define IPC_SYNC_MESSAGE_ROUTED1_4(msg_class, type1_in, type1_out, type2_out, ty
pe3_out, type4_out) \ | |
| 267 msg_class##__ID, | |
| 268 | |
| 269 #define IPC_SYNC_MESSAGE_ROUTED2_0(msg_class, type1_in, type2_in) \ | |
| 270 msg_class##__ID, | |
| 271 | |
| 272 #define IPC_SYNC_MESSAGE_ROUTED2_1(msg_class, type1_in, type2_in, type1_out) \ | |
| 273 msg_class##__ID, | |
| 274 | |
| 275 #define IPC_SYNC_MESSAGE_ROUTED2_2(msg_class, type1_in, type2_in, type1_out, typ
e2_out) \ | |
| 276 msg_class##__ID, | |
| 277 | |
| 278 #define IPC_SYNC_MESSAGE_ROUTED2_3(msg_class, type1_in, type2_in, type1_out, typ
e2_out, type3_out) \ | |
| 279 msg_class##__ID, | |
| 280 | |
| 281 #define IPC_SYNC_MESSAGE_ROUTED3_0(msg_class, type1_in, type2_in, type3_in) \ | |
| 282 msg_class##__ID, | |
| 283 | |
| 284 #define IPC_SYNC_MESSAGE_ROUTED3_1(msg_class, type1_in, type2_in, type3_in, type
1_out) \ | |
| 285 msg_class##__ID, | |
| 286 | |
| 287 #define IPC_SYNC_MESSAGE_ROUTED3_2(msg_class, type1_in, type2_in, type3_in, type
1_out, type2_out) \ | |
| 288 msg_class##__ID, | |
| 289 | |
| 290 #define IPC_SYNC_MESSAGE_ROUTED3_3(msg_class, type1_in, type2_in, type3_in, type
1_out, type2_out, type3_out) \ | |
| 291 msg_class##__ID, | |
| 292 | |
| 293 #define IPC_SYNC_MESSAGE_ROUTED4_0(msg_class, type1_in, type2_in, type3_in, type
4_in) \ | |
| 294 msg_class##__ID, | |
| 295 | |
| 296 #define IPC_SYNC_MESSAGE_ROUTED4_1(msg_class, type1_in, type2_in, type3_in, type
4_in, type1_out) \ | |
| 297 msg_class##__ID, | |
| 298 | |
| 299 #define IPC_SYNC_MESSAGE_ROUTED4_2(msg_class, type1_in, type2_in, type3_in, type
4_in, type1_out, type2_out) \ | |
| 300 msg_class##__ID, | |
| 301 | |
| 302 #define IPC_SYNC_MESSAGE_ROUTED4_3(msg_class, type1_in, type2_in, type3_in, type
4_in, type1_out, type2_out, type3_out) \ | |
| 303 msg_class##__ID, | |
| 304 | |
| 305 // Message crackers and handlers. | |
| 306 // Prefer to use the IPC_BEGIN_MESSAGE_MAP_EX to the older macros since they | |
| 307 // allow you to detect when a message could not be de-serialized. Usage: | |
| 308 // | |
| 309 // void MyClass::OnMessageReceived(const IPC::Message& msg) { | |
| 310 // bool msg_is_good = false; | |
| 311 // IPC_BEGIN_MESSAGE_MAP_EX(MyClass, msg, msg_is_good) | |
| 312 // IPC_MESSAGE_HANDLER(MsgClassOne, OnMsgClassOne) | |
| 313 // ...more handlers here ... | |
| 314 // IPC_MESSAGE_HANDLER(MsgClassTen, OnMsgClassTen) | |
| 315 // IPC_END_MESSAGE_MAP_EX() | |
| 316 // if (!msg_is_good) { | |
| 317 // // Signal error here or terminate offending process. | |
| 318 // } | |
| 319 // } | |
| 320 | |
| 321 #define IPC_DEFINE_MESSAGE_MAP(class_name) \ | |
| 322 void class_name::OnMessageReceived(const IPC::Message& msg) \ | |
| 323 IPC_BEGIN_MESSAGE_MAP(class_name, msg) | |
| 324 | |
| 325 #define IPC_BEGIN_MESSAGE_MAP_EX(class_name, msg, msg_is_ok) \ | |
| 326 { \ | |
| 327 typedef class_name _IpcMessageHandlerClass; \ | |
| 328 const IPC::Message& ipc_message__ = msg; \ | |
| 329 bool& msg_is_ok__ = msg_is_ok; \ | |
| 330 switch (ipc_message__.type()) { \ | |
| 331 | |
| 332 #define IPC_BEGIN_MESSAGE_MAP(class_name, msg) \ | |
| 333 { \ | |
| 334 typedef class_name _IpcMessageHandlerClass; \ | |
| 335 const IPC::Message& ipc_message__ = msg; \ | |
| 336 bool msg_is_ok__ = true; \ | |
| 337 switch (ipc_message__.type()) { \ | |
| 338 | |
| 339 #define IPC_MESSAGE_FORWARD(msg_class, obj, member_func) \ | |
| 340 case msg_class::ID: \ | |
| 341 msg_is_ok__ = msg_class::Dispatch(&ipc_message__, obj, &member_func); \ | |
| 342 break; | |
| 343 | |
| 344 #define IPC_MESSAGE_HANDLER(msg_class, member_func) \ | |
| 345 IPC_MESSAGE_FORWARD(msg_class, this, _IpcMessageHandlerClass::member_func) | |
| 346 | |
| 347 #define IPC_MESSAGE_FORWARD_DELAY_REPLY(msg_class, obj, member_func) \ | |
| 348 case msg_class::ID: \ | |
| 349 msg_class::DispatchDelayReply(&ipc_message__, obj, &member_func); \ | |
| 350 break; | |
| 351 | |
| 352 #define IPC_MESSAGE_HANDLER_DELAY_REPLY(msg_class, member_func) \ | |
| 353 IPC_MESSAGE_FORWARD_DELAY_REPLY(msg_class, this, _IpcMessageHandlerClass::memb
er_func) | |
| 354 | |
| 355 #define IPC_MESSAGE_HANDLER_GENERIC(msg_class, code) \ | |
| 356 case msg_class::ID: \ | |
| 357 code; \ | |
| 358 break; | |
| 359 | |
| 360 #define IPC_REPLY_HANDLER(func) \ | |
| 361 case IPC_REPLY_ID: \ | |
| 362 func(ipc_message__); \ | |
| 363 break; | |
| 364 | |
| 365 | |
| 366 #define IPC_MESSAGE_UNHANDLED(code) \ | |
| 367 default: \ | |
| 368 code; \ | |
| 369 break; | |
| 370 | |
| 371 #define IPC_MESSAGE_UNHANDLED_ERROR() \ | |
| 372 IPC_MESSAGE_UNHANDLED(NOTREACHED() << \ | |
| 373 "Invalid message with type = " << \ | |
| 374 ipc_message__.type()) | |
| 375 | |
| 376 #define IPC_END_MESSAGE_MAP() \ | |
| 377 DCHECK(msg_is_ok__); \ | |
| 378 } \ | |
| 379 } | |
| 380 | |
| 381 #define IPC_END_MESSAGE_MAP_EX() \ | |
| 382 } \ | |
| 383 } | |
| 384 | |
| 385 #elif defined(IPC_MESSAGE_MACROS_LOG) | |
| 386 #undef IPC_MESSAGE_MACROS_LOG | |
| 387 | |
| 388 #ifndef IPC_LOG_TABLE_CREATED | |
| 389 #define IPC_LOG_TABLE_CREATED | |
| 390 typedef void (*LogFunction)(uint16 type, | |
| 391 std::wstring* name, | |
| 392 const IPC::Message* msg, | |
| 393 std::wstring* params); | |
| 394 | |
| 395 LogFunction g_log_function_mapping[LastMsgIndex]; | |
| 396 #endif | |
| 397 | |
| 398 | |
| 399 #define IPC_BEGIN_MESSAGES(label) \ | |
| 400 void label##MsgLog(uint16 type, std::wstring* name, const IPC::Message* msg, s
td::wstring* params) { \ | |
| 401 switch (type) { | |
| 402 | |
| 403 #define IPC_END_MESSAGES(label) \ | |
| 404 default: \ | |
| 405 if (name) \ | |
| 406 *name = L"[UNKNOWN " L ## #label L" MSG"; \ | |
| 407 } \ | |
| 408 } \ | |
| 409 class LoggerRegisterHelper##label { \ | |
| 410 public: \ | |
| 411 LoggerRegisterHelper##label() { \ | |
| 412 g_log_function_mapping[label##MsgStart] = label##MsgLog; \ | |
| 413 } \ | |
| 414 }; \ | |
| 415 LoggerRegisterHelper##label g_LoggerRegisterHelper##label; | |
| 416 | |
| 417 #define IPC_MESSAGE_LOG(msg_class) \ | |
| 418 case msg_class##__ID: \ | |
| 419 if (name) \ | |
| 420 *name = L ## #msg_class; \ | |
| 421 if (msg && params) \ | |
| 422 msg_class::Log(msg, params); \ | |
| 423 break; | |
| 424 | |
| 425 #define IPC_MESSAGE_CONTROL0(msg_class) \ | |
| 426 IPC_MESSAGE_LOG(msg_class) | |
| 427 | |
| 428 #define IPC_MESSAGE_CONTROL1(msg_class, type1) \ | |
| 429 IPC_MESSAGE_LOG(msg_class) | |
| 430 | |
| 431 #define IPC_MESSAGE_CONTROL2(msg_class, type1, type2) \ | |
| 432 IPC_MESSAGE_LOG(msg_class) | |
| 433 | |
| 434 #define IPC_MESSAGE_CONTROL3(msg_class, type1, type2, type3) \ | |
| 435 IPC_MESSAGE_LOG(msg_class) | |
| 436 | |
| 437 #define IPC_MESSAGE_CONTROL4(msg_class, type1, type2, type3, type4) \ | |
| 438 IPC_MESSAGE_LOG(msg_class) | |
| 439 | |
| 440 #define IPC_MESSAGE_CONTROL5(msg_class, type1, type2, type3, type4, type5) \ | |
| 441 IPC_MESSAGE_LOG(msg_class) | |
| 442 | |
| 443 #define IPC_MESSAGE_ROUTED0(msg_class) \ | |
| 444 IPC_MESSAGE_LOG(msg_class) | |
| 445 | |
| 446 #define IPC_MESSAGE_ROUTED1(msg_class, type1) \ | |
| 447 IPC_MESSAGE_LOG(msg_class) | |
| 448 | |
| 449 #define IPC_MESSAGE_ROUTED2(msg_class, type1, type2) \ | |
| 450 IPC_MESSAGE_LOG(msg_class) | |
| 451 | |
| 452 #define IPC_MESSAGE_ROUTED3(msg_class, type1, type2, type3) \ | |
| 453 IPC_MESSAGE_LOG(msg_class) | |
| 454 | |
| 455 #define IPC_MESSAGE_ROUTED4(msg_class, type1, type2, type3, type4) \ | |
| 456 IPC_MESSAGE_LOG(msg_class) | |
| 457 | |
| 458 #define IPC_MESSAGE_ROUTED5(msg_class, type1, type2, type3, type4, type5) \ | |
| 459 IPC_MESSAGE_LOG(msg_class) | |
| 460 | |
| 461 #define IPC_SYNC_MESSAGE_CONTROL0_0(msg_class) \ | |
| 462 IPC_MESSAGE_LOG(msg_class) | |
| 463 | |
| 464 #define IPC_SYNC_MESSAGE_CONTROL0_1(msg_class, type1_out) \ | |
| 465 IPC_MESSAGE_LOG(msg_class) | |
| 466 | |
| 467 #define IPC_SYNC_MESSAGE_CONTROL0_2(msg_class, type1_out, type2_out) \ | |
| 468 IPC_MESSAGE_LOG(msg_class) | |
| 469 | |
| 470 #define IPC_SYNC_MESSAGE_CONTROL0_3(msg_class, type1_out, type2_out, type3_out)
\ | |
| 471 IPC_MESSAGE_LOG(msg_class) | |
| 472 | |
| 473 #define IPC_SYNC_MESSAGE_CONTROL1_0(msg_class, type1_in) \ | |
| 474 IPC_MESSAGE_LOG(msg_class) | |
| 475 | |
| 476 #define IPC_SYNC_MESSAGE_CONTROL1_1(msg_class, type1_in, type1_out) \ | |
| 477 IPC_MESSAGE_LOG(msg_class) | |
| 478 | |
| 479 #define IPC_SYNC_MESSAGE_CONTROL1_2(msg_class, type1_in, type1_out, type2_out) \ | |
| 480 IPC_MESSAGE_LOG(msg_class) | |
| 481 | |
| 482 #define IPC_SYNC_MESSAGE_CONTROL1_3(msg_class, type1_in, type1_out, type2_out, t
ype3_out) \ | |
| 483 IPC_MESSAGE_LOG(msg_class) | |
| 484 | |
| 485 #define IPC_SYNC_MESSAGE_CONTROL2_0(msg_class, type1_in, type2_in) \ | |
| 486 IPC_MESSAGE_LOG(msg_class) | |
| 487 | |
| 488 #define IPC_SYNC_MESSAGE_CONTROL2_1(msg_class, type1_in, type2_in, type1_out) \ | |
| 489 IPC_MESSAGE_LOG(msg_class) | |
| 490 | |
| 491 #define IPC_SYNC_MESSAGE_CONTROL2_2(msg_class, type1_in, type2_in, type1_out, ty
pe2_out) \ | |
| 492 IPC_MESSAGE_LOG(msg_class) | |
| 493 | |
| 494 #define IPC_SYNC_MESSAGE_CONTROL2_3(msg_class, type1_in, type2_in, type1_out, ty
pe2_out, type3_out) \ | |
| 495 IPC_MESSAGE_LOG(msg_class) | |
| 496 | |
| 497 #define IPC_SYNC_MESSAGE_CONTROL3_1(msg_class, type1_in, type2_in, type3_in, typ
e1_out) \ | |
| 498 IPC_MESSAGE_LOG(msg_class) | |
| 499 | |
| 500 #define IPC_SYNC_MESSAGE_CONTROL3_2(msg_class, type1_in, type2_in, type3_in, typ
e1_out, type2_out) \ | |
| 501 IPC_MESSAGE_LOG(msg_class) | |
| 502 | |
| 503 #define IPC_SYNC_MESSAGE_CONTROL3_3(msg_class, type1_in, type2_in, type3_in, typ
e1_out, type2_out, type3_out) \ | |
| 504 IPC_MESSAGE_LOG(msg_class) | |
| 505 | |
| 506 #define IPC_SYNC_MESSAGE_CONTROL4_1(msg_class, type1_in, type2_in, type3_in, typ
e4_in, type1_out) \ | |
| 507 IPC_MESSAGE_LOG(msg_class) | |
| 508 | |
| 509 #define IPC_SYNC_MESSAGE_CONTROL4_2(msg_class, type1_in, type2_in, type3_in, typ
e4_in, type1_out, type2_out) \ | |
| 510 IPC_MESSAGE_LOG(msg_class) | |
| 511 | |
| 512 #define IPC_SYNC_MESSAGE_ROUTED0_0(msg_class) \ | |
| 513 IPC_MESSAGE_LOG(msg_class) | |
| 514 | |
| 515 #define IPC_SYNC_MESSAGE_ROUTED0_1(msg_class, type1_out) \ | |
| 516 IPC_MESSAGE_LOG(msg_class) | |
| 517 | |
| 518 #define IPC_SYNC_MESSAGE_ROUTED0_2(msg_class, type1_out, type2_out) \ | |
| 519 IPC_MESSAGE_LOG(msg_class) | |
| 520 | |
| 521 #define IPC_SYNC_MESSAGE_ROUTED0_3(msg_class, type1_out, type2_out, type3_out) \ | |
| 522 IPC_MESSAGE_LOG(msg_class) | |
| 523 | |
| 524 #define IPC_SYNC_MESSAGE_ROUTED1_0(msg_class, type1_in) \ | |
| 525 IPC_MESSAGE_LOG(msg_class) | |
| 526 | |
| 527 #define IPC_SYNC_MESSAGE_ROUTED1_1(msg_class, type1_in, type1_out) \ | |
| 528 IPC_MESSAGE_LOG(msg_class) | |
| 529 | |
| 530 #define IPC_SYNC_MESSAGE_ROUTED1_2(msg_class, type1_in, type1_out, type2_out) \ | |
| 531 IPC_MESSAGE_LOG(msg_class) | |
| 532 | |
| 533 #define IPC_SYNC_MESSAGE_ROUTED1_3(msg_class, type1_in, type1_out, type2_out, ty
pe3_out) \ | |
| 534 IPC_MESSAGE_LOG(msg_class) | |
| 535 | |
| 536 #define IPC_SYNC_MESSAGE_ROUTED1_4(msg_class, type1_in, type1_out, type2_out, ty
pe3_out, type4_out) \ | |
| 537 IPC_MESSAGE_LOG(msg_class) | |
| 538 | |
| 539 #define IPC_SYNC_MESSAGE_ROUTED2_0(msg_class, type1_in, type2_in) \ | |
| 540 IPC_MESSAGE_LOG(msg_class) | |
| 541 | |
| 542 #define IPC_SYNC_MESSAGE_ROUTED2_1(msg_class, type1_in, type2_in, type1_out) \ | |
| 543 IPC_MESSAGE_LOG(msg_class) | |
| 544 | |
| 545 #define IPC_SYNC_MESSAGE_ROUTED2_2(msg_class, type1_in, type2_in, type1_out, typ
e2_out) \ | |
| 546 IPC_MESSAGE_LOG(msg_class) | |
| 547 | |
| 548 #define IPC_SYNC_MESSAGE_ROUTED2_3(msg_class, type1_in, type2_in, type1_out, typ
e2_out, type3_out) \ | |
| 549 IPC_MESSAGE_LOG(msg_class) | |
| 550 | |
| 551 #define IPC_SYNC_MESSAGE_ROUTED3_0(msg_class, type1_in, type2_in, type3_in) \ | |
| 552 IPC_MESSAGE_LOG(msg_class) | |
| 553 | |
| 554 #define IPC_SYNC_MESSAGE_ROUTED3_1(msg_class, type1_in, type2_in, type3_in, type
1_out) \ | |
| 555 IPC_MESSAGE_LOG(msg_class) | |
| 556 | |
| 557 #define IPC_SYNC_MESSAGE_ROUTED3_2(msg_class, type1_in, type2_in, type3_in, type
1_out, type2_out) \ | |
| 558 IPC_MESSAGE_LOG(msg_class) | |
| 559 | |
| 560 #define IPC_SYNC_MESSAGE_ROUTED3_3(msg_class, type1_in, type2_in, type3_in, type
1_out, type2_out, type3_out) \ | |
| 561 IPC_MESSAGE_LOG(msg_class) | |
| 562 | |
| 563 #define IPC_SYNC_MESSAGE_ROUTED4_0(msg_class, type1_in, type2_in, type3_in, type
4_in) \ | |
| 564 IPC_MESSAGE_LOG(msg_class) | |
| 565 | |
| 566 #define IPC_SYNC_MESSAGE_ROUTED4_1(msg_class, type1_in, type2_in, type3_in, type
4_in, type1_out) \ | |
| 567 IPC_MESSAGE_LOG(msg_class) | |
| 568 | |
| 569 #define IPC_SYNC_MESSAGE_ROUTED4_2(msg_class, type1_in, type2_in, type3_in, type
4_in, type1_out, type2_out) \ | |
| 570 IPC_MESSAGE_LOG(msg_class) | |
| 571 | |
| 572 #define IPC_SYNC_MESSAGE_ROUTED4_3(msg_class, type1_in, type2_in, type3_in, type
4_in, type1_out, type2_out, type3_out) \ | |
| 573 IPC_MESSAGE_LOG(msg_class) | |
| 574 | |
| 575 #elif defined(IPC_MESSAGE_MACROS_CLASSES) | |
| 576 #undef IPC_MESSAGE_MACROS_CLASSES | |
| 577 | |
| 578 #define IPC_BEGIN_MESSAGES(label) | |
| 579 #define IPC_END_MESSAGES(label) | |
| 580 | |
| 581 #define IPC_MESSAGE_CONTROL0(msg_class) \ | |
| 582 class msg_class : public IPC::Message { \ | |
| 583 public: \ | |
| 584 enum { ID = msg_class##__ID }; \ | |
| 585 msg_class() \ | |
| 586 : IPC::Message(MSG_ROUTING_CONTROL, \ | |
| 587 ID, \ | |
| 588 PRIORITY_NORMAL) {} \ | |
| 589 }; | |
| 590 | |
| 591 #define IPC_MESSAGE_CONTROL1(msg_class, type1) \ | |
| 592 class msg_class : public IPC::MessageWithTuple< Tuple1<type1> > { \ | |
| 593 public: \ | |
| 594 enum { ID = msg_class##__ID }; \ | |
| 595 msg_class(const type1& arg1) \ | |
| 596 : IPC::MessageWithTuple< Tuple1<type1> >(MSG_ROUTING_CONTROL, \ | |
| 597 ID, \ | |
| 598 MakeRefTuple(arg1)) {} \ | |
| 599 }; | |
| 600 | |
| 601 #define IPC_MESSAGE_CONTROL2(msg_class, type1, type2) \ | |
| 602 class msg_class : public IPC::MessageWithTuple< Tuple2<type1, type2> > { \ | |
| 603 public: \ | |
| 604 enum { ID = msg_class##__ID }; \ | |
| 605 msg_class(const type1& arg1, const type2& arg2) \ | |
| 606 : IPC::MessageWithTuple< Tuple2<type1, type2> >( \ | |
| 607 MSG_ROUTING_CONTROL, \ | |
| 608 ID, \ | |
| 609 MakeRefTuple(arg1, arg2)) {} \ | |
| 610 }; | |
| 611 | |
| 612 #define IPC_MESSAGE_CONTROL3(msg_class, type1, type2, type3) \ | |
| 613 class msg_class : \ | |
| 614 public IPC::MessageWithTuple< Tuple3<type1, type2, type3> > { \ | |
| 615 public: \ | |
| 616 enum { ID = msg_class##__ID }; \ | |
| 617 msg_class(const type1& arg1, const type2& arg2, const type3& arg3) \ | |
| 618 : IPC::MessageWithTuple< Tuple3<type1, type2, type3> >( \ | |
| 619 MSG_ROUTING_CONTROL, \ | |
| 620 ID, \ | |
| 621 MakeRefTuple(arg1, arg2, arg3)) {} \ | |
| 622 }; | |
| 623 | |
| 624 #define IPC_MESSAGE_CONTROL4(msg_class, type1, type2, type3, type4) \ | |
| 625 class msg_class : \ | |
| 626 public IPC::MessageWithTuple< Tuple4<type1, type2, type3, type4> > { \ | |
| 627 public: \ | |
| 628 enum { ID = msg_class##__ID }; \ | |
| 629 msg_class(const type1& arg1, const type2& arg2, const type3& arg3, \ | |
| 630 const type4& arg4) \ | |
| 631 : IPC::MessageWithTuple< Tuple4<type1, type2, type3, type4> >( \ | |
| 632 MSG_ROUTING_CONTROL, \ | |
| 633 ID, \ | |
| 634 MakeRefTuple(arg1, arg2, arg3, arg4)) {} \ | |
| 635 }; | |
| 636 | |
| 637 #define IPC_MESSAGE_CONTROL5(msg_class, type1, type2, type3, type4, type5) \ | |
| 638 class msg_class : \ | |
| 639 public IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, type5> >
{ \ | |
| 640 public: \ | |
| 641 enum { ID = msg_class##__ID }; \ | |
| 642 msg_class(const type1& arg1, const type2& arg2, \ | |
| 643 const type3& arg3, const type4& arg4, const type5& arg5) \ | |
| 644 : IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, type5> >( \ | |
| 645 MSG_ROUTING_CONTROL, \ | |
| 646 ID, \ | |
| 647 MakeRefTuple(arg1, arg2, arg3, arg4, arg5)) {} \ | |
| 648 }; | |
| 649 | |
| 650 #define IPC_MESSAGE_ROUTED0(msg_class) \ | |
| 651 class msg_class : public IPC::Message { \ | |
| 652 public: \ | |
| 653 enum { ID = msg_class##__ID }; \ | |
| 654 msg_class(int32 routing_id) \ | |
| 655 : IPC::Message(routing_id, ID, PRIORITY_NORMAL) {} \ | |
| 656 }; | |
| 657 | |
| 658 #define IPC_MESSAGE_ROUTED1(msg_class, type1) \ | |
| 659 class msg_class : public IPC::MessageWithTuple< Tuple1<type1> > { \ | |
| 660 public: \ | |
| 661 enum { ID = msg_class##__ID }; \ | |
| 662 msg_class(int32 routing_id, const type1& arg1) \ | |
| 663 : IPC::MessageWithTuple< Tuple1<type1> >(routing_id, ID, \ | |
| 664 MakeRefTuple(arg1)) {} \ | |
| 665 }; | |
| 666 | |
| 667 #define IPC_MESSAGE_ROUTED2(msg_class, type1, type2) \ | |
| 668 class msg_class : public IPC::MessageWithTuple< Tuple2<type1, type2> > { \ | |
| 669 public: \ | |
| 670 enum { ID = msg_class##__ID }; \ | |
| 671 msg_class(int32 routing_id, const type1& arg1, const type2& arg2) \ | |
| 672 : IPC::MessageWithTuple< Tuple2<type1, type2> >( \ | |
| 673 routing_id, ID, MakeRefTuple(arg1, arg2)) {} \ | |
| 674 }; | |
| 675 | |
| 676 #define IPC_MESSAGE_ROUTED3(msg_class, type1, type2, type3) \ | |
| 677 class msg_class : \ | |
| 678 public IPC::MessageWithTuple< Tuple3<type1, type2, type3> > { \ | |
| 679 public: \ | |
| 680 enum { ID = msg_class##__ID }; \ | |
| 681 msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \ | |
| 682 const type3& arg3) \ | |
| 683 : IPC::MessageWithTuple< Tuple3<type1, type2, type3> >( \ | |
| 684 routing_id, ID, MakeRefTuple(arg1, arg2, arg3)) {} \ | |
| 685 }; | |
| 686 | |
| 687 #define IPC_MESSAGE_ROUTED4(msg_class, type1, type2, type3, type4) \ | |
| 688 class msg_class : \ | |
| 689 public IPC::MessageWithTuple< Tuple4<type1, type2, type3, type4> > { \ | |
| 690 public: \ | |
| 691 enum { ID = msg_class##__ID }; \ | |
| 692 msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \ | |
| 693 const type3& arg3, const type4& arg4) \ | |
| 694 : IPC::MessageWithTuple< Tuple4<type1, type2, type3, type4> >( \ | |
| 695 routing_id, ID, MakeRefTuple(arg1, arg2, arg3, arg4)) {} \ | |
| 696 }; | |
| 697 | |
| 698 #define IPC_MESSAGE_ROUTED5(msg_class, type1, type2, type3, type4, type5) \ | |
| 699 class msg_class : \ | |
| 700 public IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, type5> >
{ \ | |
| 701 public: \ | |
| 702 enum { ID = msg_class##__ID }; \ | |
| 703 msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \ | |
| 704 const type3& arg3, const type4& arg4, const type5& arg5) \ | |
| 705 : IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, type5> >( \ | |
| 706 routing_id, ID, MakeRefTuple(arg1, arg2, arg3, arg4, arg5)) {} \ | |
| 707 }; | |
| 708 | |
| 709 #define IPC_SYNC_MESSAGE_CONTROL0_0(msg_class) \ | |
| 710 class msg_class : public IPC::MessageWithReply<Tuple0, Tuple0 > { \ | |
| 711 public: \ | |
| 712 enum { ID = msg_class##__ID }; \ | |
| 713 msg_class() \ | |
| 714 : IPC::MessageWithReply<Tuple0, Tuple0 >( \ | |
| 715 MSG_ROUTING_CONTROL, ID, \ | |
| 716 MakeTuple(), MakeTuple()) {} \ | |
| 717 }; | |
| 718 | |
| 719 #define IPC_SYNC_MESSAGE_CONTROL0_1(msg_class, type1_out) \ | |
| 720 class msg_class : public IPC::MessageWithReply<Tuple0, Tuple1<type1_out&> > {
\ | |
| 721 public: \ | |
| 722 enum { ID = msg_class##__ID }; \ | |
| 723 msg_class(type1_out* arg1) \ | |
| 724 : IPC::MessageWithReply<Tuple0, Tuple1<type1_out&> >( \ | |
| 725 MSG_ROUTING_CONTROL, \ | |
| 726 ID, \ | |
| 727 MakeTuple(), MakeRefTuple(*arg1)) {} \ | |
| 728 }; | |
| 729 | |
| 730 #define IPC_SYNC_MESSAGE_CONTROL0_2(msg_class, type1_out, type2_out) \ | |
| 731 class msg_class : \ | |
| 732 public IPC::MessageWithReply<Tuple0, Tuple2<type1_out&, type2_out&> > { \ | |
| 733 public: \ | |
| 734 enum { ID = msg_class##__ID }; \ | |
| 735 msg_class(type1_out* arg1, type2_out* arg2) \ | |
| 736 : IPC::MessageWithReply<Tuple0, Tuple2<type1_out&, type2_out&> >( \ | |
| 737 MSG_ROUTING_CONTROL, \ | |
| 738 ID, \ | |
| 739 MakeTuple(), MakeRefTuple(*arg1, *arg2)) {} \ | |
| 740 }; | |
| 741 | |
| 742 #define IPC_SYNC_MESSAGE_CONTROL0_3(msg_class, type1_out, type2_out, type3_out)
\ | |
| 743 class msg_class : \ | |
| 744 public IPC::MessageWithReply<Tuple0, \ | |
| 745 Tuple3<type1_out&, type2_out&, type3_out&> >{ \ | |
| 746 public: \ | |
| 747 enum { ID = msg_class##__ID }; \ | |
| 748 msg_class(type1_out* arg1, type2_out* arg2, type3_out* arg3) \ | |
| 749 : IPC::MessageWithReply<Tuple0, \ | |
| 750 Tuple3<type1_out&, type2_out&, type3_out&> >(MSG_ROUTING_CONTROL, \ | |
| 751 ID, \ | |
| 752 MakeTuple(), MakeRefTuple(*arg1, *arg2, *arg3)) {} \ | |
| 753 }; | |
| 754 | |
| 755 #define IPC_SYNC_MESSAGE_CONTROL1_0(msg_class, type1_in) \ | |
| 756 class msg_class : \ | |
| 757 public IPC::MessageWithReply<Tuple1<type1_in>, Tuple0 > { \ | |
| 758 public: \ | |
| 759 enum { ID = msg_class##__ID }; \ | |
| 760 msg_class(const type1_in& arg1) \ | |
| 761 : IPC::MessageWithReply<Tuple1<type1_in>, Tuple0 >( \ | |
| 762 MSG_ROUTING_CONTROL, ID, \ | |
| 763 MakeRefTuple(arg1), MakeTuple()) {} \ | |
| 764 }; | |
| 765 | |
| 766 #define IPC_SYNC_MESSAGE_CONTROL1_1(msg_class, type1_in, type1_out) \ | |
| 767 class msg_class : \ | |
| 768 public IPC::MessageWithReply<Tuple1<type1_in>, Tuple1<type1_out&> > { \ | |
| 769 public: \ | |
| 770 enum { ID = msg_class##__ID }; \ | |
| 771 msg_class(const type1_in& arg1, type1_out* arg2) \ | |
| 772 : IPC::MessageWithReply<Tuple1<type1_in>, Tuple1<type1_out&> >( \ | |
| 773 MSG_ROUTING_CONTROL, ID, \ | |
| 774 MakeRefTuple(arg1), MakeRefTuple(*arg2)) {} \ | |
| 775 }; | |
| 776 | |
| 777 #define IPC_SYNC_MESSAGE_CONTROL1_2(msg_class, type1_in, type1_out, type2_out) \ | |
| 778 class msg_class : \ | |
| 779 public IPC::MessageWithReply<Tuple1<type1_in>, Tuple2<type1_out&, type2_ou
t&> > { \ | |
| 780 public: \ | |
| 781 enum { ID = msg_class##__ID }; \ | |
| 782 msg_class(const type1_in& arg1, type1_out* arg2, type2_out* arg3) \ | |
| 783 : IPC::MessageWithReply<Tuple1<type1_in>, Tuple2<type1_out&, type2_out&>
>( \ | |
| 784 MSG_ROUTING_CONTROL, ID, \ | |
| 785 MakeRefTuple(arg1), MakeRefTuple(*arg2, *arg3)) {} \ | |
| 786 }; | |
| 787 | |
| 788 #define IPC_SYNC_MESSAGE_CONTROL1_3(msg_class, type1_in, type1_out, type2_out, t
ype3_out) \ | |
| 789 class msg_class : \ | |
| 790 public IPC::MessageWithReply<Tuple1<type1_in>, \ | |
| 791 Tuple3<type1_out&, type2_out&, type3_out&> >{ \ | |
| 792 public: \ | |
| 793 enum { ID = msg_class##__ID }; \ | |
| 794 msg_class(const type1_in& arg1, type1_out* arg2, type2_out* arg3, type3_out*
arg4) \ | |
| 795 : IPC::MessageWithReply<Tuple1<type1_in>, \ | |
| 796 Tuple3<type1_out&, type2_out&, type3_out&> >(MSG_ROUTING_CONTROL, \ | |
| 797 ID, \ | |
| 798 MakeRefTuple(arg1), MakeRefTuple(*arg2, *arg3, *arg4)) {} \ | |
| 799 }; | |
| 800 | |
| 801 #define IPC_SYNC_MESSAGE_CONTROL2_0(msg_class, type1_in, type2_in) \ | |
| 802 class msg_class : \ | |
| 803 public IPC::MessageWithReply<Tuple2<type1_in, type2_in>, Tuple0 > { \ | |
| 804 public: \ | |
| 805 enum { ID = msg_class##__ID }; \ | |
| 806 msg_class(const type1_in& arg1, const type2_in& arg2) \ | |
| 807 : IPC::MessageWithReply<Tuple2<type1_in, type2_in>, Tuple0 >( \ | |
| 808 MSG_ROUTING_CONTROL, ID, \ | |
| 809 MakeRefTuple(arg1, arg2), MakeTuple()) {} \ | |
| 810 }; | |
| 811 | |
| 812 #define IPC_SYNC_MESSAGE_CONTROL2_1(msg_class, type1_in, type2_in, type1_out) \ | |
| 813 class msg_class : \ | |
| 814 public IPC::MessageWithReply<Tuple2<type1_in, type2_in>, Tuple1<type1_out&
> > { \ | |
| 815 public: \ | |
| 816 enum { ID = msg_class##__ID }; \ | |
| 817 msg_class(const type1_in& arg1, const type2_in& arg2, type1_out* arg3) \ | |
| 818 : IPC::MessageWithReply<Tuple2<type1_in, type2_in>, Tuple1<type1_out&> >
( \ | |
| 819 MSG_ROUTING_CONTROL, ID, \ | |
| 820 MakeRefTuple(arg1, arg2), MakeRefTuple(*arg3)) {} \ | |
| 821 }; | |
| 822 | |
| 823 #define IPC_SYNC_MESSAGE_CONTROL2_2(msg_class, type1_in, type2_in, type1_out, ty
pe2_out) \ | |
| 824 class msg_class : \ | |
| 825 public IPC::MessageWithReply<Tuple2<type1_in, type2_in>, \ | |
| 826 Tuple2<type1_out&, type2_out&> > { \ | |
| 827 public: \ | |
| 828 enum { ID = msg_class##__ID }; \ | |
| 829 msg_class(const type1_in& arg1, const type2_in& arg2, type1_out* arg3, type2
_out* arg4) \ | |
| 830 : IPC::MessageWithReply<Tuple2<type1_in, type2_in>, \ | |
| 831 Tuple2<type1_out&, type2_out&> >(MSG_ROUTING_CONTROL, ID, \ | |
| 832 MakeRefTuple(arg1, arg2), MakeRefTuple(*arg3, *arg4)) {} \ | |
| 833 }; | |
| 834 | |
| 835 #define IPC_SYNC_MESSAGE_CONTROL2_3(msg_class, type1_in, type2_in, type1_out, ty
pe2_out, type3_out) \ | |
| 836 class msg_class : \ | |
| 837 public IPC::MessageWithReply<Tuple2<type1_in, type2_in>, \ | |
| 838 Tuple3<type1_out&, type2_out&, type3_out&> > { \ | |
| 839 public: \ | |
| 840 enum { ID = msg_class##__ID }; \ | |
| 841 msg_class(const type1_in& arg1, const type2_in& arg2, type1_out* arg3, type2
_out* arg4, type3_out* arg5) \ | |
| 842 : IPC::MessageWithReply<Tuple2<type1_in, type2_in>, \ | |
| 843 Tuple3<type1_out&, type2_out&, type3_out&> >(MSG_ROUTING_CONTROL, \ | |
| 844 ID, \ | |
| 845 MakeRefTuple(arg1, arg2), MakeRefTuple(*arg3, *arg4, *arg5)) {} \ | |
| 846 }; | |
| 847 | |
| 848 #define IPC_SYNC_MESSAGE_CONTROL3_1(msg_class, type1_in, type2_in, type3_in, typ
e1_out) \ | |
| 849 class msg_class : \ | |
| 850 public IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \ | |
| 851 Tuple1<type1_out&> > { \ | |
| 852 public: \ | |
| 853 enum { ID = msg_class##__ID }; \ | |
| 854 msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3,
type1_out* arg4) \ | |
| 855 : IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \ | |
| 856 Tuple1<type1_out&> >(MSG_ROUTING_CONTROL, ID, \ | |
| 857 MakeRefTuple(arg1, arg2, arg3), MakeRefTuple(*arg4)) {} \ | |
| 858 }; | |
| 859 | |
| 860 #define IPC_SYNC_MESSAGE_CONTROL3_2(msg_class, type1_in, type2_in, type3_in, typ
e1_out, type2_out) \ | |
| 861 class msg_class : \ | |
| 862 public IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \ | |
| 863 Tuple2<type1_out&, type2_out&> > { \ | |
| 864 public: \ | |
| 865 enum { ID = msg_class##__ID }; \ | |
| 866 msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3,
type1_out* arg4, type2_out* arg5) \ | |
| 867 : IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \ | |
| 868 Tuple2<type1_out&, type2_out&> >(MSG_ROUTING_CONTROL, ID, \ | |
| 869 MakeRefTuple(arg1, arg2, arg3), MakeRefTuple(*arg4, *arg5)) {} \ | |
| 870 }; | |
| 871 | |
| 872 #define IPC_SYNC_MESSAGE_CONTROL3_3(msg_class, type1_in, type2_in, type3_in, typ
e1_out, type2_out, type3_out) \ | |
| 873 class msg_class : \ | |
| 874 public IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \ | |
| 875 Tuple3<type1_out&, type2_out&, type3_out&> > { \ | |
| 876 public: \ | |
| 877 enum { ID = msg_class##__ID }; \ | |
| 878 msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3,
type1_out* arg4, type2_out* arg5, type3_out* arg6) \ | |
| 879 : IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \ | |
| 880 Tuple3<type1_out&, type2_out&, type3_out&> >(MSG_ROUTING_CONTROL, \ | |
| 881 ID, \ | |
| 882 MakeRefTuple(arg1, arg2, arg3), MakeRefTuple(*arg4, *arg5, *arg6)) {
} \ | |
| 883 }; | |
| 884 | |
| 885 #define IPC_SYNC_MESSAGE_CONTROL4_1(msg_class, type1_in, type2_in, type3_in, typ
e4_in, type1_out) \ | |
| 886 class msg_class : \ | |
| 887 public IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in
>, \ | |
| 888 Tuple1<type1_out&> > { \ | |
| 889 public: \ | |
| 890 enum { ID = msg_class##__ID }; \ | |
| 891 msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3,
const type4_in& arg4, type1_out* arg6) \ | |
| 892 : IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in>,
\ | |
| 893 Tuple1<type1_out&> >(MSG_ROUTING_CONTROL, ID, \ | |
| 894 MakeRefTuple(arg1, arg2, arg3, arg4), MakeRefTuple(*arg6)) {} \ | |
| 895 }; | |
| 896 | |
| 897 #define IPC_SYNC_MESSAGE_CONTROL4_2(msg_class, type1_in, type2_in, type3_in, typ
e4_in, type1_out, type2_out) \ | |
| 898 class msg_class : \ | |
| 899 public IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in
>, \ | |
| 900 Tuple2<type1_out&, type2_out&> > { \ | |
| 901 public: \ | |
| 902 enum { ID = msg_class##__ID }; \ | |
| 903 msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3,
const type4_in& arg4, type1_out* arg5, type2_out* arg6) \ | |
| 904 : IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in>,
\ | |
| 905 Tuple2<type1_out&, type2_out&> >(MSG_ROUTING_CONTROL, ID, \ | |
| 906 MakeRefTuple(arg1, arg2, arg3, arg4), MakeRefTuple(*arg5, *arg6)) {}
\ | |
| 907 }; | |
| 908 | |
| 909 #define IPC_SYNC_MESSAGE_ROUTED0_1(msg_class, type1_out) \ | |
| 910 class msg_class : public IPC::MessageWithReply<Tuple0, Tuple1<type1_out&> > {
\ | |
| 911 public: \ | |
| 912 enum { ID = msg_class##__ID }; \ | |
| 913 msg_class(int routing_id, type1_out* arg1) \ | |
| 914 : IPC::MessageWithReply<Tuple0, Tuple1<type1_out&> >( \ | |
| 915 routing_id, ID, \ | |
| 916 MakeTuple(), MakeRefTuple(*arg1)) {} \ | |
| 917 }; | |
| 918 | |
| 919 #define IPC_SYNC_MESSAGE_ROUTED0_0(msg_class) \ | |
| 920 class msg_class : public IPC::MessageWithReply<Tuple0, Tuple0 > { \ | |
| 921 public: \ | |
| 922 enum { ID = msg_class##__ID }; \ | |
| 923 msg_class(int routing_id) \ | |
| 924 : IPC::MessageWithReply<Tuple0, Tuple0 >( \ | |
| 925 routing_id, ID, \ | |
| 926 MakeTuple(), MakeTuple()) {} \ | |
| 927 }; | |
| 928 | |
| 929 #define IPC_SYNC_MESSAGE_ROUTED0_2(msg_class, type1_out, type2_out) \ | |
| 930 class msg_class : \ | |
| 931 public IPC::MessageWithReply<Tuple0, Tuple2<type1_out&, type2_out&> > { \ | |
| 932 public: \ | |
| 933 enum { ID = msg_class##__ID }; \ | |
| 934 msg_class(int routing_id, type1_out* arg1, type2_out* arg2) \ | |
| 935 : IPC::MessageWithReply<Tuple0, Tuple2<type1_out&, type2_out&> >( \ | |
| 936 routing_id, ID, \ | |
| 937 MakeTuple(), MakeRefTuple(*arg1, *arg2)) {} \ | |
| 938 }; | |
| 939 | |
| 940 #define IPC_SYNC_MESSAGE_ROUTED0_3(msg_class, type1_out, type2_out, type3_out) \ | |
| 941 class msg_class : \ | |
| 942 public IPC::MessageWithReply<Tuple0, \ | |
| 943 Tuple3<type1_out&, type2_out&, type3_out&> >{ \ | |
| 944 public: \ | |
| 945 enum { ID = msg_class##__ID }; \ | |
| 946 msg_class(int routing_id, type1_out* arg1, type2_out* arg2, type3_out* arg3)
\ | |
| 947 : IPC::MessageWithReply<Tuple0, \ | |
| 948 Tuple3<type1_out&, type2_out&, type3_out&> >(routing_id, ID, \ | |
| 949 MakeTuple(), MakeRefTuple(*arg1, *arg2, *arg3)) {} \ | |
| 950 }; | |
| 951 | |
| 952 #define IPC_SYNC_MESSAGE_ROUTED1_0(msg_class, type1_in) \ | |
| 953 class msg_class : \ | |
| 954 public IPC::MessageWithReply<Tuple1<type1_in>, Tuple0 > { \ | |
| 955 public: \ | |
| 956 enum { ID = msg_class##__ID }; \ | |
| 957 msg_class(int routing_id, const type1_in& arg1) \ | |
| 958 : IPC::MessageWithReply<Tuple1<type1_in>, Tuple0 >( \ | |
| 959 routing_id, ID, \ | |
| 960 MakeRefTuple(arg1), MakeTuple()) {} \ | |
| 961 }; | |
| 962 | |
| 963 #define IPC_SYNC_MESSAGE_ROUTED1_1(msg_class, type1_in, type1_out) \ | |
| 964 class msg_class : \ | |
| 965 public IPC::MessageWithReply<Tuple1<type1_in>, Tuple1<type1_out&> > { \ | |
| 966 public: \ | |
| 967 enum { ID = msg_class##__ID }; \ | |
| 968 msg_class(int routing_id, const type1_in& arg1, type1_out* arg2) \ | |
| 969 : IPC::MessageWithReply<Tuple1<type1_in>, Tuple1<type1_out&> >( \ | |
| 970 routing_id, ID, \ | |
| 971 MakeRefTuple(arg1), MakeRefTuple(*arg2)) {} \ | |
| 972 }; | |
| 973 | |
| 974 #define IPC_SYNC_MESSAGE_ROUTED1_2(msg_class, type1_in, type1_out, type2_out) \ | |
| 975 class msg_class : \ | |
| 976 public IPC::MessageWithReply<Tuple1<type1_in>, Tuple2<type1_out&, type2_ou
t&> > { \ | |
| 977 public: \ | |
| 978 enum { ID = msg_class##__ID }; \ | |
| 979 msg_class(int routing_id, const type1_in& arg1, type1_out* arg2, type2_out*
arg3) \ | |
| 980 : IPC::MessageWithReply<Tuple1<type1_in>, Tuple2<type1_out&, type2_out&>
>( \ | |
| 981 routing_id, ID, \ | |
| 982 MakeRefTuple(arg1), MakeRefTuple(*arg2, *arg3)) {} \ | |
| 983 }; | |
| 984 | |
| 985 #define IPC_SYNC_MESSAGE_ROUTED1_3(msg_class, type1_in, type1_out, type2_out, ty
pe3_out) \ | |
| 986 class msg_class : \ | |
| 987 public IPC::MessageWithReply<Tuple1<type1_in>, \ | |
| 988 Tuple3<type1_out&, type2_out&, type3_out&> >{ \ | |
| 989 public: \ | |
| 990 enum { ID = msg_class##__ID }; \ | |
| 991 msg_class(int routing_id, const type1_in& arg1, type1_out* arg2, type2_out*
arg3, type3_out* arg4) \ | |
| 992 : IPC::MessageWithReply<Tuple1<type1_in>, \ | |
| 993 Tuple3<type1_out&, type2_out&, type3_out&> >(routing_id, ID, \ | |
| 994 MakeRefTuple(arg1), MakeRefTuple(*arg2, *arg3, *arg4)) {} \ | |
| 995 }; | |
| 996 | |
| 997 #define IPC_SYNC_MESSAGE_ROUTED1_4(msg_class, type1_in, type1_out, type2_out, ty
pe3_out, type4_out) \ | |
| 998 class msg_class : \ | |
| 999 public IPC::MessageWithReply<Tuple1<type1_in>, \ | |
| 1000 Tuple4<type1_out&, type2_out&, type3_out&, type4_out&> >{ \ | |
| 1001 public: \ | |
| 1002 enum { ID = msg_class##__ID }; \ | |
| 1003 msg_class(int routing_id, const type1_in& arg1, type1_out* arg2, type2_out*
arg3, type3_out* arg4, type4_out* arg5) \ | |
| 1004 : IPC::MessageWithReply<Tuple1<type1_in>, \ | |
| 1005 Tuple4<type1_out&, type2_out&, type3_out&, type4_out&> >(routing_id,
ID, \ | |
| 1006 MakeRefTuple(arg1), MakeRefTuple(*arg2, *arg3, *arg4, *arg5)) {} \ | |
| 1007 }; | |
| 1008 | |
| 1009 #define IPC_SYNC_MESSAGE_ROUTED2_0(msg_class, type1_in, type2_in) \ | |
| 1010 class msg_class : \ | |
| 1011 public IPC::MessageWithReply<Tuple2<type1_in, type2_in>, Tuple0 > { \ | |
| 1012 public: \ | |
| 1013 enum { ID = msg_class##__ID }; \ | |
| 1014 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2) \ | |
| 1015 : IPC::MessageWithReply<Tuple2<type1_in, type2_in>, Tuple0 >( \ | |
| 1016 routing_id, ID, \ | |
| 1017 MakeRefTuple(arg1, arg2), MakeTuple()) {} \ | |
| 1018 }; | |
| 1019 | |
| 1020 #define IPC_SYNC_MESSAGE_ROUTED2_1(msg_class, type1_in, type2_in, type1_out) \ | |
| 1021 class msg_class : \ | |
| 1022 public IPC::MessageWithReply<Tuple2<type1_in, type2_in>, Tuple1<type1_out&
> > { \ | |
| 1023 public: \ | |
| 1024 enum { ID = msg_class##__ID }; \ | |
| 1025 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, type1_
out* arg3) \ | |
| 1026 : IPC::MessageWithReply<Tuple2<type1_in, type2_in>, Tuple1<type1_out&> >
( \ | |
| 1027 routing_id, ID, \ | |
| 1028 MakeRefTuple(arg1, arg2), MakeRefTuple(*arg3)) {} \ | |
| 1029 }; | |
| 1030 | |
| 1031 #define IPC_SYNC_MESSAGE_ROUTED2_2(msg_class, type1_in, type2_in, type1_out, typ
e2_out) \ | |
| 1032 class msg_class : \ | |
| 1033 public IPC::MessageWithReply<Tuple2<type1_in, type2_in>, \ | |
| 1034 Tuple2<type1_out&, type2_out&> > { \ | |
| 1035 public: \ | |
| 1036 enum { ID = msg_class##__ID }; \ | |
| 1037 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, type1_
out* arg3, type2_out* arg4) \ | |
| 1038 : IPC::MessageWithReply<Tuple2<type1_in, type2_in>, \ | |
| 1039 Tuple2<type1_out&, type2_out&> >(routing_id, ID, \ | |
| 1040 MakeRefTuple(arg1, arg2), MakeRefTuple(*arg3, *arg4)) {} \ | |
| 1041 }; | |
| 1042 | |
| 1043 #define IPC_SYNC_MESSAGE_ROUTED2_3(msg_class, type1_in, type2_in, type1_out, typ
e2_out, type3_out) \ | |
| 1044 class msg_class : \ | |
| 1045 public IPC::MessageWithReply<Tuple2<type1_in, type2_in>, \ | |
| 1046 Tuple3<type1_out&, type2_out&, type3_out&> > { \ | |
| 1047 public: \ | |
| 1048 enum { ID = msg_class##__ID }; \ | |
| 1049 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, type1_
out* arg3, type2_out* arg4, type3_out* arg5) \ | |
| 1050 : IPC::MessageWithReply<Tuple2<type1_in, type2_in>, \ | |
| 1051 Tuple3<type1_out&, type2_out&, type3_out&> >(routing_id, ID, \ | |
| 1052 MakeRefTuple(arg1, arg2), MakeRefTuple(*arg3, *arg4, *arg5)) {} \ | |
| 1053 }; | |
| 1054 | |
| 1055 #define IPC_SYNC_MESSAGE_ROUTED3_0(msg_class, type1_in, type2_in, type3_in) \ | |
| 1056 class msg_class : \ | |
| 1057 public IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, Tuple0
> { \ | |
| 1058 public: \ | |
| 1059 enum { ID = msg_class##__ID }; \ | |
| 1060 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const
type3_in& arg3) \ | |
| 1061 : IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, Tuple0>( \ | |
| 1062 routing_id, ID, \ | |
| 1063 MakeRefTuple(arg1, arg2, arg3), MakeTuple()) {} \ | |
| 1064 }; | |
| 1065 | |
| 1066 #define IPC_SYNC_MESSAGE_ROUTED3_1(msg_class, type1_in, type2_in, type3_in, type
1_out) \ | |
| 1067 class msg_class : \ | |
| 1068 public IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \ | |
| 1069 Tuple1<type1_out&> > { \ | |
| 1070 public: \ | |
| 1071 enum { ID = msg_class##__ID }; \ | |
| 1072 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const
type3_in& arg3, type1_out* arg4) \ | |
| 1073 : IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \ | |
| 1074 Tuple1<type1_out&> >(routing_id, ID, \ | |
| 1075 MakeRefTuple(arg1, arg2, arg3), MakeRefTuple(*arg4)) {} \ | |
| 1076 }; | |
| 1077 | |
| 1078 #define IPC_SYNC_MESSAGE_ROUTED3_2(msg_class, type1_in, type2_in, type3_in, type
1_out, type2_out) \ | |
| 1079 class msg_class : \ | |
| 1080 public IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \ | |
| 1081 Tuple2<type1_out&, type2_out&> > { \ | |
| 1082 public: \ | |
| 1083 enum { ID = msg_class##__ID }; \ | |
| 1084 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const
type3_in& arg3, type1_out* arg4, type2_out* arg5) \ | |
| 1085 : IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \ | |
| 1086 Tuple2<type1_out&, type2_out&> >(routing_id, ID, \ | |
| 1087 MakeRefTuple(arg1, arg2, arg3), MakeRefTuple(*arg4, *arg5)) {} \ | |
| 1088 }; | |
| 1089 | |
| 1090 #define IPC_SYNC_MESSAGE_ROUTED3_3(msg_class, type1_in, type2_in, type3_in, type
1_out, type2_out, type3_out) \ | |
| 1091 class msg_class : \ | |
| 1092 public IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \ | |
| 1093 Tuple3<type1_out&, type2_out&, type3_out&> > { \ | |
| 1094 public: \ | |
| 1095 enum { ID = msg_class##__ID }; \ | |
| 1096 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) \ | |
| 1097 : IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \ | |
| 1098 Tuple3<type1_out&, type2_out&, type3_out&> >(routing_id, ID, \ | |
| 1099 MakeRefTuple(arg1, arg2, arg3), MakeRefTuple(*arg4, *arg5, *arg6)) {
} \ | |
| 1100 }; | |
| 1101 | |
| 1102 #define IPC_SYNC_MESSAGE_ROUTED4_0(msg_class, type1_in, type2_in, type3_in, type
4_in) \ | |
| 1103 class msg_class : \ | |
| 1104 public IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in
>, \ | |
| 1105 Tuple0 > { \ | |
| 1106 public: \ | |
| 1107 enum { ID = msg_class##__ID }; \ | |
| 1108 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const
type3_in& arg3, const type4_in& arg4) \ | |
| 1109 : IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in>,
\ | |
| 1110 Tuple0 >(routing_id, ID, \ | |
| 1111 MakeRefTuple(arg1, arg2, arg3, arg4), MakeTuple()) {} \ | |
| 1112 }; | |
| 1113 | |
| 1114 #define IPC_SYNC_MESSAGE_ROUTED4_1(msg_class, type1_in, type2_in, type3_in, type
4_in, type1_out) \ | |
| 1115 class msg_class : \ | |
| 1116 public IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in
>, \ | |
| 1117 Tuple1<type1_out&> > { \ | |
| 1118 public: \ | |
| 1119 enum { ID = msg_class##__ID }; \ | |
| 1120 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const
type3_in& arg3, const type4_in& arg4, type1_out* arg6) \ | |
| 1121 : IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in>,
\ | |
| 1122 Tuple1<type1_out&> >(routing_id, ID, \ | |
| 1123 MakeRefTuple(arg1, arg2, arg3, arg4), MakeRefTuple(*arg6)) {} \ | |
| 1124 }; | |
| 1125 | |
| 1126 #define IPC_SYNC_MESSAGE_ROUTED4_2(msg_class, type1_in, type2_in, type3_in, type
4_in, type1_out, type2_out) \ | |
| 1127 class msg_class : \ | |
| 1128 public IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in
>, \ | |
| 1129 Tuple2<type1_out&, type2_out&> > { \ | |
| 1130 public: \ | |
| 1131 enum { ID = msg_class##__ID }; \ | |
| 1132 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) \ | |
| 1133 : IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in>,
\ | |
| 1134 Tuple2<type1_out&, type2_out&> >(routing_id, ID, \ | |
| 1135 MakeRefTuple(arg1, arg2, arg3, arg4), MakeRefTuple(*arg5, *arg6)) {}
\ | |
| 1136 }; | |
| 1137 | |
| 1138 #define IPC_SYNC_MESSAGE_ROUTED4_3(msg_class, type1_in, type2_in, type3_in, type
4_in, type1_out, type2_out, type3_out) \ | |
| 1139 class msg_class : \ | |
| 1140 public IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in
>, \ | |
| 1141 Tuple3<type1_out&, type2_out&, type3_out&> > { \ | |
| 1142 public: \ | |
| 1143 enum { ID = msg_class##__ID }; \ | |
| 1144 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) \ | |
| 1145 : IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in>, \ | |
| 1146 Tuple3<type1_out&, type2_out&, type3_out&> >(routing_id, ID, \ | |
| 1147 MakeRefTuple(arg1, arg2, arg3, arg4), MakeRefTuple(*arg5, *arg6, *arg7
)) {} \ | |
| 1148 }; | |
| 1149 | |
| 1150 #endif // #if defined() | |
| OLD | NEW |