| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 file provides a C++ wrapping around the Mojo C API for message pipes, | 5 // This file provides a C++ wrapping around the Mojo C API for message pipes, |
| 6 // replacing the prefix of "Mojo" with a "mojo" namespace, and using more | 6 // replacing the prefix of "Mojo" with a "mojo" namespace, and using more |
| 7 // strongly-typed representations of |MojoHandle|s. | 7 // strongly-typed representations of |MojoHandle|s. |
| 8 // | 8 // |
| 9 // Please see "mojo/public/c/system/message_pipe.h" for complete documentation | 9 // Please see "mojo/public/c/system/message_pipe.h" for complete documentation |
| 10 // of the API. | 10 // of the API. |
| 11 | 11 |
| 12 #ifndef MOJO_PUBLIC_CPP_SYSTEM_MESSAGE_PIPE_H_ | 12 #ifndef MOJO_PUBLIC_CPP_SYSTEM_MESSAGE_PIPE_H_ |
| 13 #define MOJO_PUBLIC_CPP_SYSTEM_MESSAGE_PIPE_H_ | 13 #define MOJO_PUBLIC_CPP_SYSTEM_MESSAGE_PIPE_H_ |
| 14 | 14 |
| 15 #include <assert.h> | 15 #include <assert.h> |
| 16 #include <stdint.h> |
| 16 | 17 |
| 17 #include "mojo/public/c/system/message_pipe.h" | 18 #include "mojo/public/c/system/message_pipe.h" |
| 18 #include "mojo/public/cpp/system/handle.h" | 19 #include "mojo/public/cpp/system/handle.h" |
| 19 #include "mojo/public/cpp/system/macros.h" | 20 #include "mojo/public/cpp/system/macros.h" |
| 20 | 21 |
| 21 namespace mojo { | 22 namespace mojo { |
| 22 | 23 |
| 23 // A strongly-typed representation of a |MojoHandle| to one end of a message | 24 // A strongly-typed representation of a |MojoHandle| to one end of a message |
| 24 // pipe. | 25 // pipe. |
| 25 class MessagePipeHandle : public Handle { | 26 class MessagePipeHandle : public Handle { |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 MOJO_ALLOW_UNUSED_LOCAL(result); | 111 MOJO_ALLOW_UNUSED_LOCAL(result); |
| 111 assert(result == MOJO_RESULT_OK); | 112 assert(result == MOJO_RESULT_OK); |
| 112 } | 113 } |
| 113 | 114 |
| 114 inline MessagePipe::~MessagePipe() { | 115 inline MessagePipe::~MessagePipe() { |
| 115 } | 116 } |
| 116 | 117 |
| 117 } // namespace mojo | 118 } // namespace mojo |
| 118 | 119 |
| 119 #endif // MOJO_PUBLIC_CPP_SYSTEM_MESSAGE_PIPE_H_ | 120 #endif // MOJO_PUBLIC_CPP_SYSTEM_MESSAGE_PIPE_H_ |
| OLD | NEW |