| 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 | |
| 85 | 82 |
| 86 // Undefine the macros from the previous pass (if any). | 83 // Undefine the macros from the previous pass (if any). |
| 87 #undef IPC_BEGIN_MESSAGES | 84 #undef IPC_BEGIN_MESSAGES |
| 88 #undef IPC_END_MESSAGES | 85 #undef IPC_END_MESSAGES |
| 89 #undef IPC_MESSAGE_CONTROL0 | 86 #undef IPC_MESSAGE_CONTROL0 |
| 90 #undef IPC_MESSAGE_CONTROL1 | 87 #undef IPC_MESSAGE_CONTROL1 |
| 91 #undef IPC_MESSAGE_CONTROL2 | 88 #undef IPC_MESSAGE_CONTROL2 |
| 92 #undef IPC_MESSAGE_CONTROL3 | 89 #undef IPC_MESSAGE_CONTROL3 |
| 93 #undef IPC_MESSAGE_CONTROL4 | 90 #undef IPC_MESSAGE_CONTROL4 |
| 94 #undef IPC_MESSAGE_CONTROL5 | 91 #undef IPC_MESSAGE_CONTROL5 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 #undef IPC_SYNC_MESSAGE_ROUTED3_3 | 131 #undef IPC_SYNC_MESSAGE_ROUTED3_3 |
| 135 #undef IPC_SYNC_MESSAGE_ROUTED4_0 | 132 #undef IPC_SYNC_MESSAGE_ROUTED4_0 |
| 136 #undef IPC_SYNC_MESSAGE_ROUTED4_1 | 133 #undef IPC_SYNC_MESSAGE_ROUTED4_1 |
| 137 #undef IPC_SYNC_MESSAGE_ROUTED4_2 | 134 #undef IPC_SYNC_MESSAGE_ROUTED4_2 |
| 138 #undef IPC_SYNC_MESSAGE_ROUTED4_3 | 135 #undef IPC_SYNC_MESSAGE_ROUTED4_3 |
| 139 #undef IPC_SYNC_MESSAGE_ROUTED5_0 | 136 #undef IPC_SYNC_MESSAGE_ROUTED5_0 |
| 140 #undef IPC_SYNC_MESSAGE_ROUTED5_1 | 137 #undef IPC_SYNC_MESSAGE_ROUTED5_1 |
| 141 #undef IPC_SYNC_MESSAGE_ROUTED5_2 | 138 #undef IPC_SYNC_MESSAGE_ROUTED5_2 |
| 142 #undef IPC_SYNC_MESSAGE_ROUTED5_3 | 139 #undef IPC_SYNC_MESSAGE_ROUTED5_3 |
| 143 | 140 |
| 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 | |
| 461 #ifndef IPC_LOG_TABLE_CREATED | 402 #ifndef IPC_LOG_TABLE_CREATED |
| 462 #define IPC_LOG_TABLE_CREATED | 403 #define IPC_LOG_TABLE_CREATED |
| 463 typedef void (*LogFunction)(uint32 type, | 404 typedef void (*LogFunction)(uint32 type, |
| 464 std::wstring* name, | 405 std::wstring* name, |
| 465 const IPC::Message* msg, | 406 const IPC::Message* msg, |
| 466 std::wstring* params); | 407 std::wstring* params); |
| 467 | 408 |
| 468 LogFunction g_log_function_mapping[LastMsgIndex]; | 409 LogFunction g_log_function_mapping[LastMsgIndex]; |
| 469 #endif | 410 #endif |
| 470 | 411 |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 | 594 |
| 654 #define IPC_SYNC_MESSAGE_ROUTED5_2(msg_class, type1_in, type2_in, type3_in, type
4_in, type5_in, type1_out, type2_out) \ | 595 #define IPC_SYNC_MESSAGE_ROUTED5_2(msg_class, type1_in, type2_in, type3_in, type
4_in, type5_in, type1_out, type2_out) \ |
| 655 IPC_MESSAGE_LOG(msg_class) | 596 IPC_MESSAGE_LOG(msg_class) |
| 656 | 597 |
| 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) \ | 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) \ |
| 658 IPC_MESSAGE_LOG(msg_class) | 599 IPC_MESSAGE_LOG(msg_class) |
| 659 | 600 |
| 660 #elif defined(IPC_MESSAGE_MACROS_CLASSES) | 601 #elif defined(IPC_MESSAGE_MACROS_CLASSES) |
| 661 #undef IPC_MESSAGE_MACROS_CLASSES | 602 #undef IPC_MESSAGE_MACROS_CLASSES |
| 662 | 603 |
| 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 | |
| 722 #define IPC_BEGIN_MESSAGES(label) | 604 #define IPC_BEGIN_MESSAGES(label) |
| 723 #define IPC_END_MESSAGES(label) | 605 #define IPC_END_MESSAGES(label) |
| 724 | 606 |
| 725 #define IPC_MESSAGE_CONTROL0(msg_class) \ | 607 #define IPC_MESSAGE_CONTROL0(msg_class) \ |
| 726 class msg_class : public IPC::Message { \ | 608 class msg_class : public IPC::Message { \ |
| 727 public: \ | 609 public: \ |
| 728 enum { ID = msg_class##__ID }; \ | 610 enum { ID = msg_class##__ID }; \ |
| 729 msg_class() \ | 611 msg_class() \ |
| 730 : IPC::Message(MSG_ROUTING_CONTROL, \ | 612 : IPC::Message(MSG_ROUTING_CONTROL, \ |
| 731 ID, \ | 613 ID, \ |
| 732 PRIORITY_NORMAL) {} \ | 614 PRIORITY_NORMAL) {} \ |
| 733 }; | 615 }; |
| 734 | 616 |
| 735 #define IPC_MESSAGE_CONTROL1(msg_class, type1) \ | 617 #define IPC_MESSAGE_CONTROL1(msg_class, type1) \ |
| 736 class msg_class : public IPC::MessageWithTuple< Tuple1<type1> > { \ | 618 class msg_class : public IPC::MessageWithTuple< Tuple1<type1> > { \ |
| 737 public: \ | 619 public: \ |
| 738 enum { ID = msg_class##__ID }; \ | 620 enum { ID = msg_class##__ID }; \ |
| 739 msg_class(const type1& arg1); \ | 621 msg_class(const type1& arg1) \ |
| 740 ~msg_class(); \ | 622 : IPC::MessageWithTuple< Tuple1<type1> >(MSG_ROUTING_CONTROL, \ |
| 741 static void Log(const Message* msg, std::wstring* l); \ | 623 ID, \ |
| 624 MakeRefTuple(arg1)) {} \ |
| 742 }; | 625 }; |
| 743 | 626 |
| 744 #define IPC_MESSAGE_CONTROL2(msg_class, type1, type2) \ | 627 #define IPC_MESSAGE_CONTROL2(msg_class, type1, type2) \ |
| 745 class msg_class : public IPC::MessageWithTuple< Tuple2<type1, type2> > { \ | 628 class msg_class : public IPC::MessageWithTuple< Tuple2<type1, type2> > { \ |
| 746 public: \ | 629 public: \ |
| 747 enum { ID = msg_class##__ID }; \ | 630 enum { ID = msg_class##__ID }; \ |
| 748 msg_class(const type1& arg1, const type2& arg2); \ | 631 msg_class(const type1& arg1, const type2& arg2) \ |
| 749 ~msg_class(); \ | 632 : IPC::MessageWithTuple< Tuple2<type1, type2> >( \ |
| 750 static void Log(const Message* msg, std::wstring* l); \ | 633 MSG_ROUTING_CONTROL, \ |
| 634 ID, \ |
| 635 MakeRefTuple(arg1, arg2)) {} \ |
| 751 }; | 636 }; |
| 752 | 637 |
| 753 #define IPC_MESSAGE_CONTROL3(msg_class, type1, type2, type3) \ | 638 #define IPC_MESSAGE_CONTROL3(msg_class, type1, type2, type3) \ |
| 754 class msg_class : \ | 639 class msg_class : \ |
| 755 public IPC::MessageWithTuple< Tuple3<type1, type2, type3> > { \ | 640 public IPC::MessageWithTuple< Tuple3<type1, type2, type3> > { \ |
| 756 public: \ | 641 public: \ |
| 757 enum { ID = msg_class##__ID }; \ | 642 enum { ID = msg_class##__ID }; \ |
| 758 msg_class(const type1& arg1, const type2& arg2, const type3& arg3); \ | 643 msg_class(const type1& arg1, const type2& arg2, const type3& arg3) \ |
| 759 ~msg_class(); \ | 644 : IPC::MessageWithTuple< Tuple3<type1, type2, type3> >( \ |
| 760 static void Log(const Message* msg, std::wstring* l); \ | 645 MSG_ROUTING_CONTROL, \ |
| 646 ID, \ |
| 647 MakeRefTuple(arg1, arg2, arg3)) {} \ |
| 761 }; | 648 }; |
| 762 | 649 |
| 763 #define IPC_MESSAGE_CONTROL4(msg_class, type1, type2, type3, type4) \ | 650 #define IPC_MESSAGE_CONTROL4(msg_class, type1, type2, type3, type4) \ |
| 764 class msg_class : \ | 651 class msg_class : \ |
| 765 public IPC::MessageWithTuple< Tuple4<type1, type2, type3, type4> > { \ | 652 public IPC::MessageWithTuple< Tuple4<type1, type2, type3, type4> > { \ |
| 766 public: \ | 653 public: \ |
| 767 enum { ID = msg_class##__ID }; \ | 654 enum { ID = msg_class##__ID }; \ |
| 768 msg_class(const type1& arg1, const type2& arg2, const type3& arg3, \ | 655 msg_class(const type1& arg1, const type2& arg2, const type3& arg3, \ |
| 769 const type4& arg4); \ | 656 const type4& arg4) \ |
| 770 ~msg_class(); \ | 657 : IPC::MessageWithTuple< Tuple4<type1, type2, type3, type4> >( \ |
| 771 static void Log(const Message* msg, std::wstring* l); \ | 658 MSG_ROUTING_CONTROL, \ |
| 659 ID, \ |
| 660 MakeRefTuple(arg1, arg2, arg3, arg4)) {} \ |
| 772 }; | 661 }; |
| 773 | 662 |
| 774 #define IPC_MESSAGE_CONTROL5(msg_class, type1, type2, type3, type4, type5) \ | 663 #define IPC_MESSAGE_CONTROL5(msg_class, type1, type2, type3, type4, type5) \ |
| 775 class msg_class : \ | 664 class msg_class : \ |
| 776 public IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, type5> >
{ \ | 665 public IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, type5> >
{ \ |
| 777 public: \ | 666 public: \ |
| 778 enum { ID = msg_class##__ID }; \ | 667 enum { ID = msg_class##__ID }; \ |
| 779 msg_class(const type1& arg1, const type2& arg2, \ | 668 msg_class(const type1& arg1, const type2& arg2, \ |
| 780 const type3& arg3, const type4& arg4, const type5& arg5); \ | 669 const type3& arg3, const type4& arg4, const type5& arg5) \ |
| 781 ~msg_class(); \ | 670 : IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, type5> >( \ |
| 782 static void Log(const Message* msg, std::wstring* l); \ | 671 MSG_ROUTING_CONTROL, \ |
| 672 ID, \ |
| 673 MakeRefTuple(arg1, arg2, arg3, arg4, arg5)) {} \ |
| 783 }; | 674 }; |
| 784 | 675 |
| 785 #define IPC_MESSAGE_ROUTED0(msg_class) \ | 676 #define IPC_MESSAGE_ROUTED0(msg_class) \ |
| 786 class msg_class : public IPC::Message { \ | 677 class msg_class : public IPC::Message { \ |
| 787 public: \ | 678 public: \ |
| 788 enum { ID = msg_class##__ID }; \ | 679 enum { ID = msg_class##__ID }; \ |
| 789 msg_class(int32 routing_id) \ | 680 msg_class(int32 routing_id) \ |
| 790 : IPC::Message(routing_id, ID, PRIORITY_NORMAL) {} \ | 681 : IPC::Message(routing_id, ID, PRIORITY_NORMAL) {} \ |
| 791 }; | 682 }; |
| 792 | 683 |
| 793 #define IPC_MESSAGE_ROUTED1(msg_class, type1) \ | 684 #define IPC_MESSAGE_ROUTED1(msg_class, type1) \ |
| 794 class msg_class : public IPC::MessageWithTuple< Tuple1<type1> > { \ | 685 class msg_class : public IPC::MessageWithTuple< Tuple1<type1> > { \ |
| 795 public: \ | 686 public: \ |
| 796 enum { ID = msg_class##__ID }; \ | 687 enum { ID = msg_class##__ID }; \ |
| 797 msg_class(int32 routing_id, const type1& arg1); \ | 688 msg_class(int32 routing_id, const type1& arg1) \ |
| 798 ~msg_class(); \ | 689 : IPC::MessageWithTuple< Tuple1<type1> >(routing_id, ID, \ |
| 799 static void Log(const Message* msg, std::wstring* l); \ | 690 MakeRefTuple(arg1)) {} \ |
| 800 }; | 691 }; |
| 801 | 692 |
| 802 #define IPC_MESSAGE_ROUTED2(msg_class, type1, type2) \ | 693 #define IPC_MESSAGE_ROUTED2(msg_class, type1, type2) \ |
| 803 class msg_class \ | 694 class msg_class : public IPC::MessageWithTuple< Tuple2<type1, type2> > { \ |
| 804 : public IPC::MessageWithTuple< Tuple2<type1, type2> > { \ | 695 public: \ |
| 805 public: \ | 696 enum { ID = msg_class##__ID }; \ |
| 806 enum { ID = msg_class##__ID }; \ | 697 msg_class(int32 routing_id, const type1& arg1, const type2& arg2) \ |
| 807 msg_class(int32 routing_id, const type1& arg1, const type2& arg2); \ | 698 : IPC::MessageWithTuple< Tuple2<type1, type2> >( \ |
| 808 ~msg_class(); \ | 699 routing_id, ID, MakeRefTuple(arg1, arg2)) {} \ |
| 809 static void Log(const Message* msg, std::wstring* l); \ | |
| 810 }; | 700 }; |
| 811 | 701 |
| 812 #define IPC_MESSAGE_ROUTED3(msg_class, type1, type2, type3) \ | 702 #define IPC_MESSAGE_ROUTED3(msg_class, type1, type2, type3) \ |
| 813 class msg_class \ | 703 class msg_class : \ |
| 814 : public IPC::MessageWithTuple< Tuple3<type1, type2, type3> > { \ | 704 public IPC::MessageWithTuple< Tuple3<type1, type2, type3> > { \ |
| 815 public: \ | 705 public: \ |
| 816 enum { ID = msg_class##__ID }; \ | 706 enum { ID = msg_class##__ID }; \ |
| 817 msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \ | 707 msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \ |
| 818 const type3& arg3); \ | 708 const type3& arg3) \ |
| 819 ~msg_class(); \ | 709 : IPC::MessageWithTuple< Tuple3<type1, type2, type3> >( \ |
| 820 static void Log(const Message* msg, std::wstring* l); \ | 710 routing_id, ID, MakeRefTuple(arg1, arg2, arg3)) {} \ |
| 821 }; | 711 }; |
| 822 | 712 |
| 823 #define IPC_MESSAGE_ROUTED4(msg_class, type1, type2, type3, type4) \ | 713 #define IPC_MESSAGE_ROUTED4(msg_class, type1, type2, type3, type4) \ |
| 824 class msg_class \ | 714 class msg_class : \ |
| 825 : public IPC::MessageWithTuple< Tuple4<type1, type2, type3, type4> > { \ | 715 public IPC::MessageWithTuple< Tuple4<type1, type2, type3, type4> > { \ |
| 826 public: \ | 716 public: \ |
| 827 enum { ID = msg_class##__ID }; \ | 717 enum { ID = msg_class##__ID }; \ |
| 828 msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \ | 718 msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \ |
| 829 const type3& arg3, const type4& arg4); \ | 719 const type3& arg3, const type4& arg4) \ |
| 830 ~msg_class(); \ | 720 : IPC::MessageWithTuple< Tuple4<type1, type2, type3, type4> >( \ |
| 831 static void Log(const Message* msg, std::wstring* l); \ | 721 routing_id, ID, MakeRefTuple(arg1, arg2, arg3, arg4)) {} \ |
| 832 }; | 722 }; |
| 833 | 723 |
| 834 #define IPC_MESSAGE_ROUTED5(msg_class, type1, type2, type3, type4, type5) \ | 724 #define IPC_MESSAGE_ROUTED5(msg_class, type1, type2, type3, type4, type5) \ |
| 835 class msg_class \ | 725 class msg_class : \ |
| 836 : public IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, \ | 726 public IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, type5> >
{ \ |
| 837 type5> > { \ | 727 public: \ |
| 838 public: \ | 728 enum { ID = msg_class##__ID }; \ |
| 839 enum { ID = msg_class##__ID }; \ | 729 msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \ |
| 840 msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \ | 730 const type3& arg3, const type4& arg4, const type5& arg5) \ |
| 841 const type3& arg3, const type4& arg4, const type5& arg5); \ | 731 : IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, type5> >( \ |
| 842 ~msg_class(); \ | 732 routing_id, ID, MakeRefTuple(arg1, arg2, arg3, arg4, arg5)) {} \ |
| 843 static void Log(const Message* msg, std::wstring* l); \ | |
| 844 }; | 733 }; |
| 845 | 734 |
| 846 #define IPC_SYNC_MESSAGE_CONTROL0_0(msg_class) \ | 735 #define IPC_SYNC_MESSAGE_CONTROL0_0(msg_class) \ |
| 847 class msg_class : public IPC::MessageWithReply<Tuple0, Tuple0 > { \ | 736 class msg_class : public IPC::MessageWithReply<Tuple0, Tuple0 > { \ |
| 848 public: \ | 737 public: \ |
| 849 enum { ID = msg_class##__ID }; \ | 738 enum { ID = msg_class##__ID }; \ |
| 850 msg_class() \ | 739 msg_class() \ |
| 851 : IPC::MessageWithReply<Tuple0, Tuple0 >( \ | 740 : IPC::MessageWithReply<Tuple0, Tuple0 >( \ |
| 852 MSG_ROUTING_CONTROL, ID, \ | 741 MSG_ROUTING_CONTROL, ID, \ |
| 853 MakeTuple(), MakeTuple()) {} \ | 742 MakeTuple(), MakeTuple()) {} \ |
| (...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1326 Tuple3<type1_out&, type2_out&, type3_out&> > { \ | 1215 Tuple3<type1_out&, type2_out&, type3_out&> > { \ |
| 1327 public: \ | 1216 public: \ |
| 1328 enum { ID = msg_class##__ID }; \ | 1217 enum { ID = msg_class##__ID }; \ |
| 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) \ | 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) \ |
| 1330 : IPC::MessageWithReply<Tuple5<type1_in, type2_in, type3_in, type4_in, typ
e5_in>, \ | 1219 : IPC::MessageWithReply<Tuple5<type1_in, type2_in, type3_in, type4_in, typ
e5_in>, \ |
| 1331 Tuple3<type1_out&, type2_out&, type3_out&> >(routing_id, ID, \ | 1220 Tuple3<type1_out&, type2_out&, type3_out&> >(routing_id, ID, \ |
| 1332 MakeRefTuple(arg1, arg2, arg3, arg4, arg5), MakeRefTuple(*arg6, *arg7,
*arg8)) {} \ | 1221 MakeRefTuple(arg1, arg2, arg3, arg4, arg5), MakeRefTuple(*arg6, *arg7,
*arg8)) {} \ |
| 1333 }; | 1222 }; |
| 1334 | 1223 |
| 1335 #endif // #if defined() | 1224 #endif // #if defined() |
| OLD | NEW |