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 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. | 9 // create enums for each of the messages defined with the IPC_MESSAGE_* macros. |
10 // | 10 // |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 #undef IPC_MESSAGE_CONTROL2 | 49 #undef IPC_MESSAGE_CONTROL2 |
50 #undef IPC_MESSAGE_CONTROL3 | 50 #undef IPC_MESSAGE_CONTROL3 |
51 #undef IPC_MESSAGE_CONTROL4 | 51 #undef IPC_MESSAGE_CONTROL4 |
52 #undef IPC_MESSAGE_CONTROL5 | 52 #undef IPC_MESSAGE_CONTROL5 |
53 #undef IPC_MESSAGE_ROUTED0 | 53 #undef IPC_MESSAGE_ROUTED0 |
54 #undef IPC_MESSAGE_ROUTED1 | 54 #undef IPC_MESSAGE_ROUTED1 |
55 #undef IPC_MESSAGE_ROUTED2 | 55 #undef IPC_MESSAGE_ROUTED2 |
56 #undef IPC_MESSAGE_ROUTED3 | 56 #undef IPC_MESSAGE_ROUTED3 |
57 #undef IPC_MESSAGE_ROUTED4 | 57 #undef IPC_MESSAGE_ROUTED4 |
58 #undef IPC_MESSAGE_ROUTED5 | 58 #undef IPC_MESSAGE_ROUTED5 |
| 59 #undef IPC_MESSAGE_ROUTED6 |
59 #undef IPC_MESSAGE_EMPTY | 60 #undef IPC_MESSAGE_EMPTY |
60 #undef IPC_SYNC_MESSAGE_CONTROL0_0 | 61 #undef IPC_SYNC_MESSAGE_CONTROL0_0 |
61 #undef IPC_SYNC_MESSAGE_CONTROL0_1 | 62 #undef IPC_SYNC_MESSAGE_CONTROL0_1 |
62 #undef IPC_SYNC_MESSAGE_CONTROL0_2 | 63 #undef IPC_SYNC_MESSAGE_CONTROL0_2 |
63 #undef IPC_SYNC_MESSAGE_CONTROL0_3 | 64 #undef IPC_SYNC_MESSAGE_CONTROL0_3 |
64 #undef IPC_SYNC_MESSAGE_CONTROL1_0 | 65 #undef IPC_SYNC_MESSAGE_CONTROL1_0 |
65 #undef IPC_SYNC_MESSAGE_CONTROL1_1 | 66 #undef IPC_SYNC_MESSAGE_CONTROL1_1 |
66 #undef IPC_SYNC_MESSAGE_CONTROL1_2 | 67 #undef IPC_SYNC_MESSAGE_CONTROL1_2 |
67 #undef IPC_SYNC_MESSAGE_CONTROL1_3 | 68 #undef IPC_SYNC_MESSAGE_CONTROL1_3 |
68 #undef IPC_SYNC_MESSAGE_CONTROL2_0 | 69 #undef IPC_SYNC_MESSAGE_CONTROL2_0 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 140 |
140 #define IPC_MESSAGE_ROUTED3(msg_class, type1, type2, type3) \ | 141 #define IPC_MESSAGE_ROUTED3(msg_class, type1, type2, type3) \ |
141 msg_class##__ID, | 142 msg_class##__ID, |
142 | 143 |
143 #define IPC_MESSAGE_ROUTED4(msg_class, type1, type2, type3, type4) \ | 144 #define IPC_MESSAGE_ROUTED4(msg_class, type1, type2, type3, type4) \ |
144 msg_class##__ID, | 145 msg_class##__ID, |
145 | 146 |
146 #define IPC_MESSAGE_ROUTED5(msg_class, type1, type2, type3, type4, type5) \ | 147 #define IPC_MESSAGE_ROUTED5(msg_class, type1, type2, type3, type4, type5) \ |
147 msg_class##__ID, | 148 msg_class##__ID, |
148 | 149 |
| 150 #define IPC_MESSAGE_ROUTED6(msg_class, type1, type2, type3, type4, type5, type6)
\ |
| 151 msg_class##__ID, |
| 152 |
149 #define IPC_MESSAGE_EMPTY(msg_class) \ | 153 #define IPC_MESSAGE_EMPTY(msg_class) \ |
150 msg_class##__ID, | 154 msg_class##__ID, |
151 | 155 |
152 #define IPC_SYNC_MESSAGE_CONTROL0_0(msg_class) \ | 156 #define IPC_SYNC_MESSAGE_CONTROL0_0(msg_class) \ |
153 msg_class##__ID, | 157 msg_class##__ID, |
154 | 158 |
155 #define IPC_SYNC_MESSAGE_CONTROL0_1(msg_class, type1_out) \ | 159 #define IPC_SYNC_MESSAGE_CONTROL0_1(msg_class, type1_out) \ |
156 msg_class##__ID, | 160 msg_class##__ID, |
157 | 161 |
158 #define IPC_SYNC_MESSAGE_CONTROL0_2(msg_class, type1_out, type2_out) \ | 162 #define IPC_SYNC_MESSAGE_CONTROL0_2(msg_class, type1_out, type2_out) \ |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 | 389 |
386 #define IPC_MESSAGE_ROUTED3(msg_class, type1, type2, type3) \ | 390 #define IPC_MESSAGE_ROUTED3(msg_class, type1, type2, type3) \ |
387 IPC_MESSAGE_LOG(msg_class) | 391 IPC_MESSAGE_LOG(msg_class) |
388 | 392 |
389 #define IPC_MESSAGE_ROUTED4(msg_class, type1, type2, type3, type4) \ | 393 #define IPC_MESSAGE_ROUTED4(msg_class, type1, type2, type3, type4) \ |
390 IPC_MESSAGE_LOG(msg_class) | 394 IPC_MESSAGE_LOG(msg_class) |
391 | 395 |
392 #define IPC_MESSAGE_ROUTED5(msg_class, type1, type2, type3, type4, type5) \ | 396 #define IPC_MESSAGE_ROUTED5(msg_class, type1, type2, type3, type4, type5) \ |
393 IPC_MESSAGE_LOG(msg_class) | 397 IPC_MESSAGE_LOG(msg_class) |
394 | 398 |
| 399 #define IPC_MESSAGE_ROUTED6(msg_class, type1, type2, type3, type4, type5, type6)
\ |
| 400 IPC_MESSAGE_LOG(msg_class) |
| 401 |
395 #define IPC_MESSAGE_EMPTY(msg_class) \ | 402 #define IPC_MESSAGE_EMPTY(msg_class) \ |
396 IPC_MESSAGE_LOG(msg_class) | 403 IPC_MESSAGE_LOG(msg_class) |
397 | 404 |
398 #define IPC_SYNC_MESSAGE_CONTROL0_0(msg_class) \ | 405 #define IPC_SYNC_MESSAGE_CONTROL0_0(msg_class) \ |
399 IPC_MESSAGE_LOG(msg_class) | 406 IPC_MESSAGE_LOG(msg_class) |
400 | 407 |
401 #define IPC_SYNC_MESSAGE_CONTROL0_1(msg_class, type1_out) \ | 408 #define IPC_SYNC_MESSAGE_CONTROL0_1(msg_class, type1_out) \ |
402 IPC_MESSAGE_LOG(msg_class) | 409 IPC_MESSAGE_LOG(msg_class) |
403 | 410 |
404 #define IPC_SYNC_MESSAGE_CONTROL0_2(msg_class, type1_out, type2_out) \ | 411 #define IPC_SYNC_MESSAGE_CONTROL0_2(msg_class, type1_out, type2_out) \ |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 class msg_class : \ | 633 class msg_class : \ |
627 public IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, type5> >
{ \ | 634 public IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, type5> >
{ \ |
628 public: \ | 635 public: \ |
629 enum { ID = msg_class##__ID }; \ | 636 enum { ID = msg_class##__ID }; \ |
630 msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \ | 637 msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \ |
631 const type3& arg3, const type4& arg4, const type5& arg5) \ | 638 const type3& arg3, const type4& arg4, const type5& arg5) \ |
632 : IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, type5> >( \ | 639 : IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, type5> >( \ |
633 routing_id, ID, MakeTuple(arg1, arg2, arg3, arg4, arg5)) {} \ | 640 routing_id, ID, MakeTuple(arg1, arg2, arg3, arg4, arg5)) {} \ |
634 }; | 641 }; |
635 | 642 |
| 643 #define IPC_MESSAGE_ROUTED6(msg_class, type1, type2, type3, type4, type5, \ |
| 644 type6) \ |
| 645 class msg_class : \ |
| 646 public IPC::MessageWithTuple< Tuple6<type1, type2, type3, type4, type5, \ |
| 647 type6> > { \ |
| 648 public: \ |
| 649 enum { ID = msg_class##__ID }; \ |
| 650 msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \ |
| 651 const type3& arg3, const type4& arg4, const type5& arg5, \ |
| 652 const type6& arg6) \ |
| 653 : IPC::MessageWithTuple< Tuple6<type1, type2, type3, type4, type5, \ |
| 654 type6> >( \ |
| 655 routing_id, ID, MakeTuple(arg1, arg2, arg3, arg4, arg5, arg6)) {} \ |
| 656 }; |
| 657 |
636 // Dummy class for now, just to give us the ID field. | 658 // Dummy class for now, just to give us the ID field. |
637 #define IPC_MESSAGE_EMPTY(msg_class) \ | 659 #define IPC_MESSAGE_EMPTY(msg_class) \ |
638 class msg_class { \ | 660 class msg_class { \ |
639 public: \ | 661 public: \ |
640 enum { ID = msg_class##__ID }; \ | 662 enum { ID = msg_class##__ID }; \ |
641 static void Log(const IPC::Message* msg, std::wstring* l) {} \ | 663 static void Log(const IPC::Message* msg, std::wstring* l) {} \ |
642 }; | 664 }; |
643 | 665 |
644 #define IPC_SYNC_MESSAGE_CONTROL0_0(msg_class) \ | 666 #define IPC_SYNC_MESSAGE_CONTROL0_0(msg_class) \ |
645 class msg_class : public IPC::MessageWithReply<Tuple0, Tuple0 > { \ | 667 class msg_class : public IPC::MessageWithReply<Tuple0, Tuple0 > { \ |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1041 public: \ | 1063 public: \ |
1042 enum { ID = msg_class##__ID }; \ | 1064 enum { ID = msg_class##__ID }; \ |
1043 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const
type3_in& arg3, const type4_in& arg4, type1_out* arg6) \ | 1065 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const
type3_in& arg3, const type4_in& arg4, type1_out* arg6) \ |
1044 : IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in>,
\ | 1066 : IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in>,
\ |
1045 Tuple1<type1_out&> >(routing_id, ID, \ | 1067 Tuple1<type1_out&> >(routing_id, ID, \ |
1046 MakeTuple(arg1, arg2, arg3, arg4), MakeRefTuple(*arg6)) {} \ | 1068 MakeTuple(arg1, arg2, arg3, arg4), MakeRefTuple(*arg6)) {} \ |
1047 }; | 1069 }; |
1048 | 1070 |
1049 #endif // #if defined() | 1071 #endif // #if defined() |
1050 | 1072 |
OLD | NEW |