Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / mojo / public / cpp / bindings / lib / message_internal.h
blob3c67902b7a846789c603c95eb22811a99762b142
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.
5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_MESSAGE_INTERNAL_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_MESSAGE_INTERNAL_H_
8 #include "mojo/public/cpp/bindings/lib/bindings_internal.h"
10 namespace mojo {
11 namespace internal {
13 #pragma pack(push, 1)
15 enum {
16 kMessageExpectsResponse = 1 << 0,
17 kMessageIsResponse = 1 << 1
20 struct MessageHeader : internal::StructHeader {
21 uint32_t name;
22 uint32_t flags;
24 MOJO_COMPILE_ASSERT(sizeof(MessageHeader) == 16, bad_sizeof_MessageHeader);
26 struct MessageHeaderWithRequestID : MessageHeader {
27 uint64_t request_id;
29 MOJO_COMPILE_ASSERT(sizeof(MessageHeaderWithRequestID) == 24,
30 bad_sizeof_MessageHeaderWithRequestID);
32 struct MessageData {
33 MessageHeader header;
36 MOJO_COMPILE_ASSERT(sizeof(MessageData) == sizeof(MessageHeader),
37 bad_sizeof_MessageData);
39 #pragma pack(pop)
41 } // namespace internal
42 } // namespace mojo
44 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_MESSAGE_INTERNAL_H_