Index: ipc/ipc_message_macros.h |
diff --git a/ipc/ipc_message_macros.h b/ipc/ipc_message_macros.h |
index c4e250cf9e6c9ac6839a2bc41eb3c44c3c5c95a4..ad7ce8bd581b8099f017dd4aa54b760c943a3783 100644 |
--- a/ipc/ipc_message_macros.h |
+++ b/ipc/ipc_message_macros.h |
@@ -240,6 +240,9 @@ |
#define IPC_MESSAGE_CONTROL5(msg_class, type1, type2, type3, type4, type5) \ |
IPC_MESSAGE_DECL(ASYNC, CONTROL, msg_class, 5, 0, (type1, type2, type3, type4, type5), ()) |
+#define IPC_MESSAGE_CONTROL6(msg_class, type1, type2, type3, type4, type5, type6) \ |
vabr (Chromium)
2014/01/13 14:46:29
What do you need this definition for?
riadh.chtara
2014/01/13 20:34:10
Done.
vabr (Chromium)
2014/01/14 14:11:02
I doubt "done" is really an answer for the questio
|
+ IPC_MESSAGE_DECL(ASYNC, CONTROL, msg_class, 6, 0, (type1, type2, type3, type4, type5, type6), ()) |
+ |
#define IPC_MESSAGE_ROUTED0(msg_class) \ |
IPC_MESSAGE_DECL(EMPTY, ROUTED, msg_class, 0, 0, (), ()) |
@@ -258,6 +261,9 @@ |
#define IPC_MESSAGE_ROUTED5(msg_class, type1, type2, type3, type4, type5) \ |
IPC_MESSAGE_DECL(ASYNC, ROUTED, msg_class, 5, 0, (type1, type2, type3, type4, type5), ()) |
+#define IPC_MESSAGE_ROUTED6(msg_class, type1, type2, type3, type4, type5, type6) \ |
+ IPC_MESSAGE_DECL(ASYNC, ROUTED, msg_class, 6, 0, (type1, type2, type3, type4, type5, type6), ()) |
+ |
#define IPC_SYNC_MESSAGE_CONTROL0_0(msg_class) \ |
IPC_MESSAGE_DECL(SYNC, CONTROL, msg_class, 0, 0, (), ()) |
@@ -549,6 +555,34 @@ |
*e = p.e; \ |
return true; \ |
} |
+#define IPC_ASYNC_MESSAGE_METHODS_6 \ |
+ IPC_ASYNC_MESSAGE_METHODS_GENERIC \ |
+ template<class T, class S, typename TA, typename TB, typename TC, \ |
+ typename TD, typename TE, typename TF> \ |
+ static bool Dispatch(const Message* msg, T* obj, S* sender, \ |
+ void (T::*func)(const Message&, TA, TB, TC, TD, TE, TF)) { \ |
+ Schema::Param p; \ |
+ if (Read(msg, &p)) { \ |
+ (obj->*func)(*msg, p.a, p.b, p.c, p.d, p.e, p.f); \ |
+ return true; \ |
+ } \ |
+ return false; \ |
+ } \ |
+ template<typename TA, typename TB, typename TC, typename TD, typename TE \ |
vabr (Chromium)
2014/01/13 14:46:29
Are you missing a "," after TE?
riadh.chtara
2014/01/13 20:34:10
Done.
|
+ typename TF> \ |
+ static bool Read(const IPC::Message* msg, TA* a, TB* b, TC* c, TD* d, \ |
+ TE* e, TF* f) { \ |
+ Schema::Param p; \ |
+ if (!Read(msg, &p)) \ |
+ return false; \ |
+ *a = p.a; \ |
+ *b = p.b; \ |
+ *c = p.c; \ |
+ *d = p.d; \ |
+ *e = p.e; \ |
+ *f = p.f; \ |
+ return true; \ |
+ } |
// The following macros define the common set of methods provided by SYNC |
// message classes. |
@@ -599,6 +633,12 @@ |
static void WriteReplyParams(Message* reply, TA a, TB b, TC c, TD d, TE e) { \ |
Schema::WriteReplyParams(reply, a, b, c, d, e); \ |
} |
+#define IPC_SYNC_MESSAGE_METHODS_6 \ |
+ IPC_SYNC_MESSAGE_METHODS_GENERIC \ |
+ template<typename TA, typename TB, typename TC, typename TD, typename TE, typename TF> \ |
+ static void WriteReplyParams(Message* reply, TA a, TB b, TC c, TD d, TE e, TF f) { \ |
+ Schema::WriteReplyParams(reply, a, b, c, d, e, f); \ |
+ } |
// Common message macro which dispatches into one of the 6 (sync x kind) |
// routines. There is a way that these 6 cases can be lumped together, |
@@ -845,6 +885,8 @@ |
#define IPC_TYPE_IN_3(t1, t2, t3) const t1& arg1, const t2& arg2, const t3& arg3 |
#define IPC_TYPE_IN_4(t1, t2, t3, t4) const t1& arg1, const t2& arg2, const t3& arg3, const t4& arg4 |
#define IPC_TYPE_IN_5(t1, t2, t3, t4, t5) const t1& arg1, const t2& arg2, const t3& arg3, const t4& arg4, const t5& arg5 |
+#define IPC_TYPE_IN_6(t1, t2, t3, t4, t5, t6) const t1& arg1, const t2& arg2, const t3& arg3, const t4& arg4, const t5& arg5, const t6& arg6 |
+ |
#define IPC_TYPE_OUT_0() |
#define IPC_TYPE_OUT_1(t1) t1* arg6 |
@@ -858,6 +900,7 @@ |
#define IPC_TUPLE_IN_3(t1, t2, t3) Tuple3<t1, t2, t3> |
#define IPC_TUPLE_IN_4(t1, t2, t3, t4) Tuple4<t1, t2, t3, t4> |
#define IPC_TUPLE_IN_5(t1, t2, t3, t4, t5) Tuple5<t1, t2, t3, t4, t5> |
+#define IPC_TUPLE_IN_6(t1, t2, t3, t4, t5, t6) Tuple6<t1, t2, t3, t4, t5, t6> |
#define IPC_TUPLE_OUT_0() Tuple0 |
#define IPC_TUPLE_OUT_1(t1) Tuple1<t1&> |
@@ -871,6 +914,7 @@ |
#define IPC_NAME_IN_3(t1, t2, t3) MakeRefTuple(arg1, arg2, arg3) |
#define IPC_NAME_IN_4(t1, t2, t3, t4) MakeRefTuple(arg1, arg2, arg3, arg4) |
#define IPC_NAME_IN_5(t1, t2, t3, t4, t5) MakeRefTuple(arg1, arg2, arg3, arg4, arg5) |
+#define IPC_NAME_IN_6(t1, t2, t3, t4, t5, t6) MakeRefTuple(arg1, arg2, arg3, arg4, arg5, arg6) |
#define IPC_NAME_OUT_0() MakeTuple() |
#define IPC_NAME_OUT_1(t1) MakeRefTuple(*arg6) |
@@ -888,6 +932,7 @@ |
#define IPC_COMMA_3 , |
#define IPC_COMMA_4 , |
#define IPC_COMMA_5 , |
+#define IPC_COMMA_6 , |
#define IPC_COMMA_AND_0(x) |
#define IPC_COMMA_AND_1(x) x |
@@ -895,6 +940,7 @@ |
#define IPC_COMMA_AND_3(x) x |
#define IPC_COMMA_AND_4(x) x |
#define IPC_COMMA_AND_5(x) x |
+#define IPC_COMMA_AND_6(x) x |
#define IPC_COMMA_OR_0(x) x |
#define IPC_COMMA_OR_1(x) , |
@@ -902,6 +948,7 @@ |
#define IPC_COMMA_OR_3(x) , |
#define IPC_COMMA_OR_4(x) , |
#define IPC_COMMA_OR_5(x) , |
+#define IPC_COMMA_OR_6(x) , |
// Message IDs |
// Note: we currently use __LINE__ to give unique IDs to messages within |