OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef MOJO_SYSTEM_MESSAGE_IN_TRANSIT_H_ | 5 #ifndef MOJO_SYSTEM_MESSAGE_IN_TRANSIT_H_ |
6 #define MOJO_SYSTEM_MESSAGE_IN_TRANSIT_H_ | 6 #define MOJO_SYSTEM_MESSAGE_IN_TRANSIT_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <stdlib.h> // For |free()|. | 9 #include <stdlib.h> // For |free()|. |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "mojo/public/system/system_export.h" | 12 #include "mojo/system/system_impl_export.h" |
13 | 13 |
14 namespace mojo { | 14 namespace mojo { |
15 namespace system { | 15 namespace system { |
16 | 16 |
17 // This class is used to represent data in transit. It is thread-unsafe. | 17 // This class is used to represent data in transit. It is thread-unsafe. |
18 // Note: This class is POD. | 18 // Note: This class is POD. |
19 class MOJO_SYSTEM_EXPORT MessageInTransit { | 19 class MOJO_SYSTEM_IMPL_EXPORT MessageInTransit { |
20 public: | 20 public: |
21 typedef uint16_t Type; | 21 typedef uint16_t Type; |
22 // Messages that are forwarded to |MessagePipeEndpoint|s. | 22 // Messages that are forwarded to |MessagePipeEndpoint|s. |
23 static const Type kTypeMessagePipeEndpoint = 0; | 23 static const Type kTypeMessagePipeEndpoint = 0; |
24 // Messages that are forwarded to |MessagePipe|s. | 24 // Messages that are forwarded to |MessagePipe|s. |
25 static const Type kTypeMessagePipe = 1; | 25 static const Type kTypeMessagePipe = 1; |
26 // Messages that are consumed by the channel. | 26 // Messages that are consumed by the channel. |
27 static const Type TYPE_CHANNEL = 2; | 27 static const Type TYPE_CHANNEL = 2; |
28 | 28 |
29 typedef uint16_t Subtype; | 29 typedef uint16_t Subtype; |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 }; | 105 }; |
106 | 106 |
107 // The size of |MessageInTransit| must be appropriate to maintain alignment of | 107 // The size of |MessageInTransit| must be appropriate to maintain alignment of |
108 // the following data. | 108 // the following data. |
109 COMPILE_ASSERT(sizeof(MessageInTransit) == 16, MessageInTransit_has_wrong_size); | 109 COMPILE_ASSERT(sizeof(MessageInTransit) == 16, MessageInTransit_has_wrong_size); |
110 | 110 |
111 } // namespace system | 111 } // namespace system |
112 } // namespace mojo | 112 } // namespace mojo |
113 | 113 |
114 #endif // MOJO_SYSTEM_MESSAGE_IN_TRANSIT_H_ | 114 #endif // MOJO_SYSTEM_MESSAGE_IN_TRANSIT_H_ |
OLD | NEW |