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_PIPE_H_ | 5 #ifndef MOJO_SYSTEM_MESSAGE_PIPE_H_ |
6 #define MOJO_SYSTEM_MESSAGE_PIPE_H_ | 6 #define MOJO_SYSTEM_MESSAGE_PIPE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // Gets the type of the endpoint (used for assertions, etc.). | 46 // Gets the type of the endpoint (used for assertions, etc.). |
47 MessagePipeEndpoint::Type GetType(unsigned port); | 47 MessagePipeEndpoint::Type GetType(unsigned port); |
48 | 48 |
49 // These are called by the dispatcher to implement its methods of | 49 // These are called by the dispatcher to implement its methods of |
50 // corresponding names. In all cases, the port |port| must be open. | 50 // corresponding names. In all cases, the port |port| must be open. |
51 void CancelAllWaiters(unsigned port); | 51 void CancelAllWaiters(unsigned port); |
52 void Close(unsigned port); | 52 void Close(unsigned port); |
53 // Unlike |MessagePipeDispatcher::WriteMessage()|, this does not validate its | 53 // Unlike |MessagePipeDispatcher::WriteMessage()|, this does not validate its |
54 // arguments. | 54 // arguments. |
55 MojoResult WriteMessage(unsigned port, | 55 MojoResult WriteMessage(unsigned port, |
56 const void* bytes, | 56 UserPointer<const void> bytes, |
57 uint32_t num_bytes, | 57 uint32_t num_bytes, |
58 std::vector<DispatcherTransport>* transports, | 58 std::vector<DispatcherTransport>* transports, |
59 MojoWriteMessageFlags flags); | 59 MojoWriteMessageFlags flags); |
60 MojoResult ReadMessage(unsigned port, | 60 MojoResult ReadMessage(unsigned port, |
61 UserPointer<void> bytes, | 61 UserPointer<void> bytes, |
62 UserPointer<uint32_t> num_bytes, | 62 UserPointer<uint32_t> num_bytes, |
63 DispatcherVector* dispatchers, | 63 DispatcherVector* dispatchers, |
64 uint32_t* num_dispatchers, | 64 uint32_t* num_dispatchers, |
65 MojoReadMessageFlags flags); | 65 MojoReadMessageFlags flags); |
66 MojoResult AddWaiter(unsigned port, | 66 MojoResult AddWaiter(unsigned port, |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 base::Lock lock_; // Protects the following members. | 112 base::Lock lock_; // Protects the following members. |
113 scoped_ptr<MessagePipeEndpoint> endpoints_[2]; | 113 scoped_ptr<MessagePipeEndpoint> endpoints_[2]; |
114 | 114 |
115 DISALLOW_COPY_AND_ASSIGN(MessagePipe); | 115 DISALLOW_COPY_AND_ASSIGN(MessagePipe); |
116 }; | 116 }; |
117 | 117 |
118 } // namespace system | 118 } // namespace system |
119 } // namespace mojo | 119 } // namespace mojo |
120 | 120 |
121 #endif // MOJO_SYSTEM_MESSAGE_PIPE_H_ | 121 #endif // MOJO_SYSTEM_MESSAGE_PIPE_H_ |
OLD | NEW |