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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 #ifdef IPC_MESSAGE_MACROS_LOG_ENABLED | 72 #ifdef IPC_MESSAGE_MACROS_LOG_ENABLED |
73 #define IPC_MESSAGE_MACROS_LOG | 73 #define IPC_MESSAGE_MACROS_LOG |
74 #include MESSAGES_INTERNAL_FILE | 74 #include MESSAGES_INTERNAL_FILE |
75 #endif | 75 #endif |
76 | 76 |
77 #undef MESSAGES_INTERNAL_FILE | 77 #undef MESSAGES_INTERNAL_FILE |
78 #undef IPC_MESSAGE_MACROS_INCLUDE_BLOCK | 78 #undef IPC_MESSAGE_MACROS_INCLUDE_BLOCK |
79 | 79 |
80 #endif | 80 #endif |
81 | 81 |
| 82 #if defined(IPC_MESSAGE_MACROS_ENUMS) |
| 83 #undef IPC_MESSAGE_MACROS_ENUMS |
| 84 |
82 | 85 |
83 // Undefine the macros from the previous pass (if any). | 86 // Undefine the macros from the previous pass (if any). |
84 #undef IPC_BEGIN_MESSAGES | 87 #undef IPC_BEGIN_MESSAGES |
85 #undef IPC_END_MESSAGES | 88 #undef IPC_END_MESSAGES |
86 #undef IPC_MESSAGE_CONTROL0 | 89 #undef IPC_MESSAGE_CONTROL0 |
87 #undef IPC_MESSAGE_CONTROL1 | 90 #undef IPC_MESSAGE_CONTROL1 |
88 #undef IPC_MESSAGE_CONTROL2 | 91 #undef IPC_MESSAGE_CONTROL2 |
89 #undef IPC_MESSAGE_CONTROL3 | 92 #undef IPC_MESSAGE_CONTROL3 |
90 #undef IPC_MESSAGE_CONTROL4 | 93 #undef IPC_MESSAGE_CONTROL4 |
91 #undef IPC_MESSAGE_CONTROL5 | 94 #undef IPC_MESSAGE_CONTROL5 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 #undef IPC_SYNC_MESSAGE_ROUTED3_3 | 134 #undef IPC_SYNC_MESSAGE_ROUTED3_3 |
132 #undef IPC_SYNC_MESSAGE_ROUTED4_0 | 135 #undef IPC_SYNC_MESSAGE_ROUTED4_0 |
133 #undef IPC_SYNC_MESSAGE_ROUTED4_1 | 136 #undef IPC_SYNC_MESSAGE_ROUTED4_1 |
134 #undef IPC_SYNC_MESSAGE_ROUTED4_2 | 137 #undef IPC_SYNC_MESSAGE_ROUTED4_2 |
135 #undef IPC_SYNC_MESSAGE_ROUTED4_3 | 138 #undef IPC_SYNC_MESSAGE_ROUTED4_3 |
136 #undef IPC_SYNC_MESSAGE_ROUTED5_0 | 139 #undef IPC_SYNC_MESSAGE_ROUTED5_0 |
137 #undef IPC_SYNC_MESSAGE_ROUTED5_1 | 140 #undef IPC_SYNC_MESSAGE_ROUTED5_1 |
138 #undef IPC_SYNC_MESSAGE_ROUTED5_2 | 141 #undef IPC_SYNC_MESSAGE_ROUTED5_2 |
139 #undef IPC_SYNC_MESSAGE_ROUTED5_3 | 142 #undef IPC_SYNC_MESSAGE_ROUTED5_3 |
140 | 143 |
141 #if defined(IPC_MESSAGE_MACROS_ENUMS) | |
142 #undef IPC_MESSAGE_MACROS_ENUMS | |
143 | |
144 // We're using the lowest 16 bits of type for the message id, and the highest | 144 // We're using the lowest 16 bits of type for the message id, and the highest |
145 // 16 bits for the channel type. | 145 // 16 bits for the channel type. |
146 // | 146 // |
147 // Do label##PreStart so that automation messages keep the same id as before. | 147 // Do label##PreStart so that automation messages keep the same id as before. |
148 #define IPC_BEGIN_MESSAGES(label) \ | 148 #define IPC_BEGIN_MESSAGES(label) \ |
149 enum label##MsgType { \ | 149 enum label##MsgType { \ |
150 label##Start = label##MsgStart << 16, \ | 150 label##Start = label##MsgStart << 16, \ |
151 label##PreStart = (label##MsgStart << 16) - 1, | 151 label##PreStart = (label##MsgStart << 16) - 1, |
152 | 152 |
153 #define IPC_END_MESSAGES(label) \ | 153 #define IPC_END_MESSAGES(label) \ |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 } \ | 392 } \ |
393 } | 393 } |
394 | 394 |
395 #define IPC_END_MESSAGE_MAP_EX() \ | 395 #define IPC_END_MESSAGE_MAP_EX() \ |
396 } \ | 396 } \ |
397 } | 397 } |
398 | 398 |
399 #elif defined(IPC_MESSAGE_MACROS_LOG) | 399 #elif defined(IPC_MESSAGE_MACROS_LOG) |
400 #undef IPC_MESSAGE_MACROS_LOG | 400 #undef IPC_MESSAGE_MACROS_LOG |
401 | 401 |
| 402 |
| 403 // Undefine the macros from the previous pass (if any). |
| 404 #undef IPC_BEGIN_MESSAGES |
| 405 #undef IPC_END_MESSAGES |
| 406 #undef IPC_MESSAGE_CONTROL0 |
| 407 #undef IPC_MESSAGE_CONTROL1 |
| 408 #undef IPC_MESSAGE_CONTROL2 |
| 409 #undef IPC_MESSAGE_CONTROL3 |
| 410 #undef IPC_MESSAGE_CONTROL4 |
| 411 #undef IPC_MESSAGE_CONTROL5 |
| 412 #undef IPC_MESSAGE_ROUTED0 |
| 413 #undef IPC_MESSAGE_ROUTED1 |
| 414 #undef IPC_MESSAGE_ROUTED2 |
| 415 #undef IPC_MESSAGE_ROUTED3 |
| 416 #undef IPC_MESSAGE_ROUTED4 |
| 417 #undef IPC_MESSAGE_ROUTED5 |
| 418 #undef IPC_SYNC_MESSAGE_CONTROL0_0 |
| 419 #undef IPC_SYNC_MESSAGE_CONTROL0_1 |
| 420 #undef IPC_SYNC_MESSAGE_CONTROL0_2 |
| 421 #undef IPC_SYNC_MESSAGE_CONTROL0_3 |
| 422 #undef IPC_SYNC_MESSAGE_CONTROL1_0 |
| 423 #undef IPC_SYNC_MESSAGE_CONTROL1_1 |
| 424 #undef IPC_SYNC_MESSAGE_CONTROL1_2 |
| 425 #undef IPC_SYNC_MESSAGE_CONTROL1_3 |
| 426 #undef IPC_SYNC_MESSAGE_CONTROL2_0 |
| 427 #undef IPC_SYNC_MESSAGE_CONTROL2_1 |
| 428 #undef IPC_SYNC_MESSAGE_CONTROL2_2 |
| 429 #undef IPC_SYNC_MESSAGE_CONTROL2_3 |
| 430 #undef IPC_SYNC_MESSAGE_CONTROL3_1 |
| 431 #undef IPC_SYNC_MESSAGE_CONTROL3_2 |
| 432 #undef IPC_SYNC_MESSAGE_CONTROL3_3 |
| 433 #undef IPC_SYNC_MESSAGE_CONTROL4_1 |
| 434 #undef IPC_SYNC_MESSAGE_CONTROL4_2 |
| 435 #undef IPC_SYNC_MESSAGE_ROUTED0_0 |
| 436 #undef IPC_SYNC_MESSAGE_ROUTED0_1 |
| 437 #undef IPC_SYNC_MESSAGE_ROUTED0_2 |
| 438 #undef IPC_SYNC_MESSAGE_ROUTED0_3 |
| 439 #undef IPC_SYNC_MESSAGE_ROUTED1_0 |
| 440 #undef IPC_SYNC_MESSAGE_ROUTED1_1 |
| 441 #undef IPC_SYNC_MESSAGE_ROUTED1_2 |
| 442 #undef IPC_SYNC_MESSAGE_ROUTED1_3 |
| 443 #undef IPC_SYNC_MESSAGE_ROUTED1_4 |
| 444 #undef IPC_SYNC_MESSAGE_ROUTED2_0 |
| 445 #undef IPC_SYNC_MESSAGE_ROUTED2_1 |
| 446 #undef IPC_SYNC_MESSAGE_ROUTED2_2 |
| 447 #undef IPC_SYNC_MESSAGE_ROUTED2_3 |
| 448 #undef IPC_SYNC_MESSAGE_ROUTED3_0 |
| 449 #undef IPC_SYNC_MESSAGE_ROUTED3_1 |
| 450 #undef IPC_SYNC_MESSAGE_ROUTED3_2 |
| 451 #undef IPC_SYNC_MESSAGE_ROUTED3_3 |
| 452 #undef IPC_SYNC_MESSAGE_ROUTED4_0 |
| 453 #undef IPC_SYNC_MESSAGE_ROUTED4_1 |
| 454 #undef IPC_SYNC_MESSAGE_ROUTED4_2 |
| 455 #undef IPC_SYNC_MESSAGE_ROUTED4_3 |
| 456 #undef IPC_SYNC_MESSAGE_ROUTED5_0 |
| 457 #undef IPC_SYNC_MESSAGE_ROUTED5_1 |
| 458 #undef IPC_SYNC_MESSAGE_ROUTED5_2 |
| 459 #undef IPC_SYNC_MESSAGE_ROUTED5_3 |
| 460 |
402 #ifndef IPC_LOG_TABLE_CREATED | 461 #ifndef IPC_LOG_TABLE_CREATED |
403 #define IPC_LOG_TABLE_CREATED | 462 #define IPC_LOG_TABLE_CREATED |
404 typedef void (*LogFunction)(uint32 type, | 463 typedef void (*LogFunction)(uint32 type, |
405 std::wstring* name, | 464 std::wstring* name, |
406 const IPC::Message* msg, | 465 const IPC::Message* msg, |
407 std::wstring* params); | 466 std::wstring* params); |
408 | 467 |
409 LogFunction g_log_function_mapping[LastMsgIndex]; | 468 LogFunction g_log_function_mapping[LastMsgIndex]; |
410 #endif | 469 #endif |
411 | 470 |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 | 653 |
595 #define IPC_SYNC_MESSAGE_ROUTED5_2(msg_class, type1_in, type2_in, type3_in, type
4_in, type5_in, type1_out, type2_out) \ | 654 #define IPC_SYNC_MESSAGE_ROUTED5_2(msg_class, type1_in, type2_in, type3_in, type
4_in, type5_in, type1_out, type2_out) \ |
596 IPC_MESSAGE_LOG(msg_class) | 655 IPC_MESSAGE_LOG(msg_class) |
597 | 656 |
598 #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) \ | 657 #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) \ |
599 IPC_MESSAGE_LOG(msg_class) | 658 IPC_MESSAGE_LOG(msg_class) |
600 | 659 |
601 #elif defined(IPC_MESSAGE_MACROS_CLASSES) | 660 #elif defined(IPC_MESSAGE_MACROS_CLASSES) |
602 #undef IPC_MESSAGE_MACROS_CLASSES | 661 #undef IPC_MESSAGE_MACROS_CLASSES |
603 | 662 |
| 663 |
| 664 // Undefine the macros from the previous pass (if any). |
| 665 #undef IPC_BEGIN_MESSAGES |
| 666 #undef IPC_END_MESSAGES |
| 667 #undef IPC_MESSAGE_CONTROL0 |
| 668 #undef IPC_MESSAGE_CONTROL1 |
| 669 #undef IPC_MESSAGE_CONTROL2 |
| 670 #undef IPC_MESSAGE_CONTROL3 |
| 671 #undef IPC_MESSAGE_CONTROL4 |
| 672 #undef IPC_MESSAGE_CONTROL5 |
| 673 #undef IPC_MESSAGE_ROUTED0 |
| 674 #undef IPC_MESSAGE_ROUTED1 |
| 675 #undef IPC_MESSAGE_ROUTED2 |
| 676 #undef IPC_MESSAGE_ROUTED3 |
| 677 #undef IPC_MESSAGE_ROUTED4 |
| 678 #undef IPC_MESSAGE_ROUTED5 |
| 679 #undef IPC_SYNC_MESSAGE_CONTROL0_0 |
| 680 #undef IPC_SYNC_MESSAGE_CONTROL0_1 |
| 681 #undef IPC_SYNC_MESSAGE_CONTROL0_2 |
| 682 #undef IPC_SYNC_MESSAGE_CONTROL0_3 |
| 683 #undef IPC_SYNC_MESSAGE_CONTROL1_0 |
| 684 #undef IPC_SYNC_MESSAGE_CONTROL1_1 |
| 685 #undef IPC_SYNC_MESSAGE_CONTROL1_2 |
| 686 #undef IPC_SYNC_MESSAGE_CONTROL1_3 |
| 687 #undef IPC_SYNC_MESSAGE_CONTROL2_0 |
| 688 #undef IPC_SYNC_MESSAGE_CONTROL2_1 |
| 689 #undef IPC_SYNC_MESSAGE_CONTROL2_2 |
| 690 #undef IPC_SYNC_MESSAGE_CONTROL2_3 |
| 691 #undef IPC_SYNC_MESSAGE_CONTROL3_1 |
| 692 #undef IPC_SYNC_MESSAGE_CONTROL3_2 |
| 693 #undef IPC_SYNC_MESSAGE_CONTROL3_3 |
| 694 #undef IPC_SYNC_MESSAGE_CONTROL4_1 |
| 695 #undef IPC_SYNC_MESSAGE_CONTROL4_2 |
| 696 #undef IPC_SYNC_MESSAGE_ROUTED0_0 |
| 697 #undef IPC_SYNC_MESSAGE_ROUTED0_1 |
| 698 #undef IPC_SYNC_MESSAGE_ROUTED0_2 |
| 699 #undef IPC_SYNC_MESSAGE_ROUTED0_3 |
| 700 #undef IPC_SYNC_MESSAGE_ROUTED1_0 |
| 701 #undef IPC_SYNC_MESSAGE_ROUTED1_1 |
| 702 #undef IPC_SYNC_MESSAGE_ROUTED1_2 |
| 703 #undef IPC_SYNC_MESSAGE_ROUTED1_3 |
| 704 #undef IPC_SYNC_MESSAGE_ROUTED1_4 |
| 705 #undef IPC_SYNC_MESSAGE_ROUTED2_0 |
| 706 #undef IPC_SYNC_MESSAGE_ROUTED2_1 |
| 707 #undef IPC_SYNC_MESSAGE_ROUTED2_2 |
| 708 #undef IPC_SYNC_MESSAGE_ROUTED2_3 |
| 709 #undef IPC_SYNC_MESSAGE_ROUTED3_0 |
| 710 #undef IPC_SYNC_MESSAGE_ROUTED3_1 |
| 711 #undef IPC_SYNC_MESSAGE_ROUTED3_2 |
| 712 #undef IPC_SYNC_MESSAGE_ROUTED3_3 |
| 713 #undef IPC_SYNC_MESSAGE_ROUTED4_0 |
| 714 #undef IPC_SYNC_MESSAGE_ROUTED4_1 |
| 715 #undef IPC_SYNC_MESSAGE_ROUTED4_2 |
| 716 #undef IPC_SYNC_MESSAGE_ROUTED4_3 |
| 717 #undef IPC_SYNC_MESSAGE_ROUTED5_0 |
| 718 #undef IPC_SYNC_MESSAGE_ROUTED5_1 |
| 719 #undef IPC_SYNC_MESSAGE_ROUTED5_2 |
| 720 #undef IPC_SYNC_MESSAGE_ROUTED5_3 |
| 721 |
604 #define IPC_BEGIN_MESSAGES(label) | 722 #define IPC_BEGIN_MESSAGES(label) |
605 #define IPC_END_MESSAGES(label) | 723 #define IPC_END_MESSAGES(label) |
606 | 724 |
607 #define IPC_MESSAGE_CONTROL0(msg_class) \ | 725 #define IPC_MESSAGE_CONTROL0(msg_class) \ |
608 class msg_class : public IPC::Message { \ | 726 class msg_class : public IPC::Message { \ |
609 public: \ | 727 public: \ |
610 enum { ID = msg_class##__ID }; \ | 728 enum { ID = msg_class##__ID }; \ |
611 msg_class() \ | 729 msg_class() \ |
612 : IPC::Message(MSG_ROUTING_CONTROL, \ | 730 : IPC::Message(MSG_ROUTING_CONTROL, \ |
613 ID, \ | 731 ID, \ |
614 PRIORITY_NORMAL) {} \ | 732 PRIORITY_NORMAL) {} \ |
615 }; | 733 }; |
616 | 734 |
617 #define IPC_MESSAGE_CONTROL1(msg_class, type1) \ | 735 #define IPC_MESSAGE_CONTROL1(msg_class, type1) \ |
618 class msg_class : public IPC::MessageWithTuple< Tuple1<type1> > { \ | 736 class msg_class : public IPC::MessageWithTuple< Tuple1<type1> > { \ |
619 public: \ | 737 public: \ |
620 enum { ID = msg_class##__ID }; \ | 738 enum { ID = msg_class##__ID }; \ |
621 msg_class(const type1& arg1) \ | 739 msg_class(const type1& arg1); \ |
622 : IPC::MessageWithTuple< Tuple1<type1> >(MSG_ROUTING_CONTROL, \ | 740 ~msg_class(); \ |
623 ID, \ | 741 static void Log(const Message* msg, std::wstring* l); \ |
624 MakeRefTuple(arg1)) {} \ | |
625 }; | 742 }; |
626 | 743 |
627 #define IPC_MESSAGE_CONTROL2(msg_class, type1, type2) \ | 744 #define IPC_MESSAGE_CONTROL2(msg_class, type1, type2) \ |
628 class msg_class : public IPC::MessageWithTuple< Tuple2<type1, type2> > { \ | 745 class msg_class : public IPC::MessageWithTuple< Tuple2<type1, type2> > { \ |
629 public: \ | 746 public: \ |
630 enum { ID = msg_class##__ID }; \ | 747 enum { ID = msg_class##__ID }; \ |
631 msg_class(const type1& arg1, const type2& arg2) \ | 748 msg_class(const type1& arg1, const type2& arg2); \ |
632 : IPC::MessageWithTuple< Tuple2<type1, type2> >( \ | 749 ~msg_class(); \ |
633 MSG_ROUTING_CONTROL, \ | 750 static void Log(const Message* msg, std::wstring* l); \ |
634 ID, \ | |
635 MakeRefTuple(arg1, arg2)) {} \ | |
636 }; | 751 }; |
637 | 752 |
638 #define IPC_MESSAGE_CONTROL3(msg_class, type1, type2, type3) \ | 753 #define IPC_MESSAGE_CONTROL3(msg_class, type1, type2, type3) \ |
639 class msg_class : \ | 754 class msg_class : \ |
640 public IPC::MessageWithTuple< Tuple3<type1, type2, type3> > { \ | 755 public IPC::MessageWithTuple< Tuple3<type1, type2, type3> > { \ |
641 public: \ | 756 public: \ |
642 enum { ID = msg_class##__ID }; \ | 757 enum { ID = msg_class##__ID }; \ |
643 msg_class(const type1& arg1, const type2& arg2, const type3& arg3) \ | 758 msg_class(const type1& arg1, const type2& arg2, const type3& arg3); \ |
644 : IPC::MessageWithTuple< Tuple3<type1, type2, type3> >( \ | 759 ~msg_class(); \ |
645 MSG_ROUTING_CONTROL, \ | 760 static void Log(const Message* msg, std::wstring* l); \ |
646 ID, \ | |
647 MakeRefTuple(arg1, arg2, arg3)) {} \ | |
648 }; | 761 }; |
649 | 762 |
650 #define IPC_MESSAGE_CONTROL4(msg_class, type1, type2, type3, type4) \ | 763 #define IPC_MESSAGE_CONTROL4(msg_class, type1, type2, type3, type4) \ |
651 class msg_class : \ | 764 class msg_class : \ |
652 public IPC::MessageWithTuple< Tuple4<type1, type2, type3, type4> > { \ | 765 public IPC::MessageWithTuple< Tuple4<type1, type2, type3, type4> > { \ |
653 public: \ | 766 public: \ |
654 enum { ID = msg_class##__ID }; \ | 767 enum { ID = msg_class##__ID }; \ |
655 msg_class(const type1& arg1, const type2& arg2, const type3& arg3, \ | 768 msg_class(const type1& arg1, const type2& arg2, const type3& arg3, \ |
656 const type4& arg4) \ | 769 const type4& arg4); \ |
657 : IPC::MessageWithTuple< Tuple4<type1, type2, type3, type4> >( \ | 770 ~msg_class(); \ |
658 MSG_ROUTING_CONTROL, \ | 771 static void Log(const Message* msg, std::wstring* l); \ |
659 ID, \ | |
660 MakeRefTuple(arg1, arg2, arg3, arg4)) {} \ | |
661 }; | 772 }; |
662 | 773 |
663 #define IPC_MESSAGE_CONTROL5(msg_class, type1, type2, type3, type4, type5) \ | 774 #define IPC_MESSAGE_CONTROL5(msg_class, type1, type2, type3, type4, type5) \ |
664 class msg_class : \ | 775 class msg_class : \ |
665 public IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, type5> >
{ \ | 776 public IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, type5> >
{ \ |
666 public: \ | 777 public: \ |
667 enum { ID = msg_class##__ID }; \ | 778 enum { ID = msg_class##__ID }; \ |
668 msg_class(const type1& arg1, const type2& arg2, \ | 779 msg_class(const type1& arg1, const type2& arg2, \ |
669 const type3& arg3, const type4& arg4, const type5& arg5) \ | 780 const type3& arg3, const type4& arg4, const type5& arg5); \ |
670 : IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, type5> >( \ | 781 ~msg_class(); \ |
671 MSG_ROUTING_CONTROL, \ | 782 static void Log(const Message* msg, std::wstring* l); \ |
672 ID, \ | |
673 MakeRefTuple(arg1, arg2, arg3, arg4, arg5)) {} \ | |
674 }; | 783 }; |
675 | 784 |
676 #define IPC_MESSAGE_ROUTED0(msg_class) \ | 785 #define IPC_MESSAGE_ROUTED0(msg_class) \ |
677 class msg_class : public IPC::Message { \ | 786 class msg_class : public IPC::Message { \ |
678 public: \ | 787 public: \ |
679 enum { ID = msg_class##__ID }; \ | 788 enum { ID = msg_class##__ID }; \ |
680 msg_class(int32 routing_id) \ | 789 msg_class(int32 routing_id) \ |
681 : IPC::Message(routing_id, ID, PRIORITY_NORMAL) {} \ | 790 : IPC::Message(routing_id, ID, PRIORITY_NORMAL) {} \ |
682 }; | 791 }; |
683 | 792 |
684 #define IPC_MESSAGE_ROUTED1(msg_class, type1) \ | 793 #define IPC_MESSAGE_ROUTED1(msg_class, type1) \ |
685 class msg_class : public IPC::MessageWithTuple< Tuple1<type1> > { \ | 794 class msg_class : public IPC::MessageWithTuple< Tuple1<type1> > { \ |
686 public: \ | 795 public: \ |
687 enum { ID = msg_class##__ID }; \ | 796 enum { ID = msg_class##__ID }; \ |
688 msg_class(int32 routing_id, const type1& arg1) \ | 797 msg_class(int32 routing_id, const type1& arg1); \ |
689 : IPC::MessageWithTuple< Tuple1<type1> >(routing_id, ID, \ | 798 ~msg_class(); \ |
690 MakeRefTuple(arg1)) {} \ | 799 static void Log(const Message* msg, std::wstring* l); \ |
691 }; | 800 }; |
692 | 801 |
693 #define IPC_MESSAGE_ROUTED2(msg_class, type1, type2) \ | 802 #define IPC_MESSAGE_ROUTED2(msg_class, type1, type2) \ |
694 class msg_class : public IPC::MessageWithTuple< Tuple2<type1, type2> > { \ | 803 class msg_class \ |
695 public: \ | 804 : public IPC::MessageWithTuple< Tuple2<type1, type2> > { \ |
696 enum { ID = msg_class##__ID }; \ | 805 public: \ |
697 msg_class(int32 routing_id, const type1& arg1, const type2& arg2) \ | 806 enum { ID = msg_class##__ID }; \ |
698 : IPC::MessageWithTuple< Tuple2<type1, type2> >( \ | 807 msg_class(int32 routing_id, const type1& arg1, const type2& arg2); \ |
699 routing_id, ID, MakeRefTuple(arg1, arg2)) {} \ | 808 ~msg_class(); \ |
| 809 static void Log(const Message* msg, std::wstring* l); \ |
700 }; | 810 }; |
701 | 811 |
702 #define IPC_MESSAGE_ROUTED3(msg_class, type1, type2, type3) \ | 812 #define IPC_MESSAGE_ROUTED3(msg_class, type1, type2, type3) \ |
703 class msg_class : \ | 813 class msg_class \ |
704 public IPC::MessageWithTuple< Tuple3<type1, type2, type3> > { \ | 814 : public IPC::MessageWithTuple< Tuple3<type1, type2, type3> > { \ |
705 public: \ | 815 public: \ |
706 enum { ID = msg_class##__ID }; \ | 816 enum { ID = msg_class##__ID }; \ |
707 msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \ | 817 msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \ |
708 const type3& arg3) \ | 818 const type3& arg3); \ |
709 : IPC::MessageWithTuple< Tuple3<type1, type2, type3> >( \ | 819 ~msg_class(); \ |
710 routing_id, ID, MakeRefTuple(arg1, arg2, arg3)) {} \ | 820 static void Log(const Message* msg, std::wstring* l); \ |
711 }; | 821 }; |
712 | 822 |
713 #define IPC_MESSAGE_ROUTED4(msg_class, type1, type2, type3, type4) \ | 823 #define IPC_MESSAGE_ROUTED4(msg_class, type1, type2, type3, type4) \ |
714 class msg_class : \ | 824 class msg_class \ |
715 public IPC::MessageWithTuple< Tuple4<type1, type2, type3, type4> > { \ | 825 : public IPC::MessageWithTuple< Tuple4<type1, type2, type3, type4> > { \ |
716 public: \ | 826 public: \ |
717 enum { ID = msg_class##__ID }; \ | 827 enum { ID = msg_class##__ID }; \ |
718 msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \ | 828 msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \ |
719 const type3& arg3, const type4& arg4) \ | 829 const type3& arg3, const type4& arg4); \ |
720 : IPC::MessageWithTuple< Tuple4<type1, type2, type3, type4> >( \ | 830 ~msg_class(); \ |
721 routing_id, ID, MakeRefTuple(arg1, arg2, arg3, arg4)) {} \ | 831 static void Log(const Message* msg, std::wstring* l); \ |
722 }; | 832 }; |
723 | 833 |
724 #define IPC_MESSAGE_ROUTED5(msg_class, type1, type2, type3, type4, type5) \ | 834 #define IPC_MESSAGE_ROUTED5(msg_class, type1, type2, type3, type4, type5) \ |
725 class msg_class : \ | 835 class msg_class \ |
726 public IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, type5> >
{ \ | 836 : public IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, \ |
727 public: \ | 837 type5> > { \ |
728 enum { ID = msg_class##__ID }; \ | 838 public: \ |
729 msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \ | 839 enum { ID = msg_class##__ID }; \ |
730 const type3& arg3, const type4& arg4, const type5& arg5) \ | 840 msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \ |
731 : IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, type5> >( \ | 841 const type3& arg3, const type4& arg4, const type5& arg5); \ |
732 routing_id, ID, MakeRefTuple(arg1, arg2, arg3, arg4, arg5)) {} \ | 842 ~msg_class(); \ |
| 843 static void Log(const Message* msg, std::wstring* l); \ |
733 }; | 844 }; |
734 | 845 |
735 #define IPC_SYNC_MESSAGE_CONTROL0_0(msg_class) \ | 846 #define IPC_SYNC_MESSAGE_CONTROL0_0(msg_class) \ |
736 class msg_class : public IPC::MessageWithReply<Tuple0, Tuple0 > { \ | 847 class msg_class : public IPC::MessageWithReply<Tuple0, Tuple0 > { \ |
737 public: \ | 848 public: \ |
738 enum { ID = msg_class##__ID }; \ | 849 enum { ID = msg_class##__ID }; \ |
739 msg_class() \ | 850 msg_class() \ |
740 : IPC::MessageWithReply<Tuple0, Tuple0 >( \ | 851 : IPC::MessageWithReply<Tuple0, Tuple0 >( \ |
741 MSG_ROUTING_CONTROL, ID, \ | 852 MSG_ROUTING_CONTROL, ID, \ |
742 MakeTuple(), MakeTuple()) {} \ | 853 MakeTuple(), MakeTuple()) {} \ |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1215 Tuple3<type1_out&, type2_out&, type3_out&> > { \ | 1326 Tuple3<type1_out&, type2_out&, type3_out&> > { \ |
1216 public: \ | 1327 public: \ |
1217 enum { ID = msg_class##__ID }; \ | 1328 enum { ID = msg_class##__ID }; \ |
1218 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) \ | 1329 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) \ |
1219 : IPC::MessageWithReply<Tuple5<type1_in, type2_in, type3_in, type4_in, typ
e5_in>, \ | 1330 : IPC::MessageWithReply<Tuple5<type1_in, type2_in, type3_in, type4_in, typ
e5_in>, \ |
1220 Tuple3<type1_out&, type2_out&, type3_out&> >(routing_id, ID, \ | 1331 Tuple3<type1_out&, type2_out&, type3_out&> >(routing_id, ID, \ |
1221 MakeRefTuple(arg1, arg2, arg3, arg4, arg5), MakeRefTuple(*arg6, *arg7,
*arg8)) {} \ | 1332 MakeRefTuple(arg1, arg2, arg3, arg4, arg5), MakeRefTuple(*arg6, *arg7,
*arg8)) {} \ |
1222 }; | 1333 }; |
1223 | 1334 |
1224 #endif // #if defined() | 1335 #endif // #if defined() |
OLD | NEW |