OLD | NEW |
| (Empty) |
1 // Copyright 2014 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 #ifndef MOJO_PUBLIC_BINDINGS_LIB_MESSAGE_INTERNAL_H_ | |
6 #define MOJO_PUBLIC_BINDINGS_LIB_MESSAGE_INTERNAL_H_ | |
7 | |
8 #include "mojo/public/bindings/lib/bindings_internal.h" | |
9 | |
10 namespace mojo { | |
11 namespace internal { | |
12 | |
13 #pragma pack(push, 1) | |
14 | |
15 enum { | |
16 kMessageExpectsResponse = 1 << 0, | |
17 kMessageIsResponse = 1 << 1 | |
18 }; | |
19 | |
20 struct MessageHeader : internal::StructHeader { | |
21 uint32_t name; | |
22 uint32_t flags; | |
23 }; | |
24 MOJO_COMPILE_ASSERT(sizeof(MessageHeader) == 16, bad_sizeof_MessageHeader); | |
25 | |
26 struct MessageHeaderWithRequestID : MessageHeader { | |
27 uint64_t request_id; | |
28 }; | |
29 MOJO_COMPILE_ASSERT(sizeof(MessageHeaderWithRequestID) == 24, | |
30 bad_sizeof_MessageHeaderWithRequestID); | |
31 | |
32 struct MessageData { | |
33 MessageHeader header; | |
34 }; | |
35 | |
36 MOJO_COMPILE_ASSERT(sizeof(MessageData) == sizeof(MessageHeader), | |
37 bad_sizeof_MessageData); | |
38 | |
39 #pragma pack(pop) | |
40 | |
41 } // namespace internal | |
42 } // namespace mojo | |
43 | |
44 #endif // MOJO_PUBLIC_BINDINGS_LIB_MESSAGE_INTERNAL_H_ | |
OLD | NEW |