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_EDK_SYSTEM_DISPATCHER_H_ | 5 #ifndef MOJO_EDK_SYSTEM_DISPATCHER_H_ |
6 #define MOJO_EDK_SYSTEM_DISPATCHER_H_ | 6 #define MOJO_EDK_SYSTEM_DISPATCHER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 MojoWriteMessageFlags flags); | 91 MojoWriteMessageFlags flags); |
92 // |dispatchers| must be non-null but empty, if |num_dispatchers| is non-null | 92 // |dispatchers| must be non-null but empty, if |num_dispatchers| is non-null |
93 // and nonzero. On success, it will be set to the dispatchers to be received | 93 // and nonzero. On success, it will be set to the dispatchers to be received |
94 // (and assigned handles) as part of the message. | 94 // (and assigned handles) as part of the message. |
95 MojoResult ReadMessage(UserPointer<void> bytes, | 95 MojoResult ReadMessage(UserPointer<void> bytes, |
96 UserPointer<uint32_t> num_bytes, | 96 UserPointer<uint32_t> num_bytes, |
97 DispatcherVector* dispatchers, | 97 DispatcherVector* dispatchers, |
98 uint32_t* num_dispatchers, | 98 uint32_t* num_dispatchers, |
99 MojoReadMessageFlags flags); | 99 MojoReadMessageFlags flags); |
100 | 100 |
| 101 MojoResult SetDataPipeProducerOptions( |
| 102 UserPointer<const MojoDataPipeProducerOptions> options); |
| 103 MojoResult GetDataPipeProducerOptions( |
| 104 UserPointer<MojoDataPipeProducerOptions> options, |
| 105 uint32_t options_num_bytes); |
101 MojoResult WriteData(UserPointer<const void> elements, | 106 MojoResult WriteData(UserPointer<const void> elements, |
102 UserPointer<uint32_t> elements_num_bytes, | 107 UserPointer<uint32_t> elements_num_bytes, |
103 MojoWriteDataFlags flags); | 108 MojoWriteDataFlags flags); |
104 MojoResult BeginWriteData(UserPointer<void*> buffer, | 109 MojoResult BeginWriteData(UserPointer<void*> buffer, |
105 UserPointer<uint32_t> buffer_num_bytes, | 110 UserPointer<uint32_t> buffer_num_bytes, |
106 MojoWriteDataFlags flags); | 111 MojoWriteDataFlags flags); |
107 MojoResult EndWriteData(uint32_t num_bytes_written); | 112 MojoResult EndWriteData(uint32_t num_bytes_written); |
108 MojoResult SetDataPipeConsumerOptions( | 113 MojoResult SetDataPipeConsumerOptions( |
109 UserPointer<const MojoDataPipeConsumerOptions> options); | 114 UserPointer<const MojoDataPipeConsumerOptions> options); |
110 MojoResult GetDataPipeConsumerOptions( | 115 MojoResult GetDataPipeConsumerOptions( |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 UserPointer<const void> bytes, | 249 UserPointer<const void> bytes, |
245 uint32_t num_bytes, | 250 uint32_t num_bytes, |
246 std::vector<DispatcherTransport>* transports, | 251 std::vector<DispatcherTransport>* transports, |
247 MojoWriteMessageFlags flags) MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_); | 252 MojoWriteMessageFlags flags) MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_); |
248 virtual MojoResult ReadMessageImplNoLock(UserPointer<void> bytes, | 253 virtual MojoResult ReadMessageImplNoLock(UserPointer<void> bytes, |
249 UserPointer<uint32_t> num_bytes, | 254 UserPointer<uint32_t> num_bytes, |
250 DispatcherVector* dispatchers, | 255 DispatcherVector* dispatchers, |
251 uint32_t* num_dispatchers, | 256 uint32_t* num_dispatchers, |
252 MojoReadMessageFlags flags) | 257 MojoReadMessageFlags flags) |
253 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_); | 258 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_); |
| 259 virtual MojoResult SetDataPipeProducerOptionsImplNoLock( |
| 260 UserPointer<const MojoDataPipeProducerOptions> options) |
| 261 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_); |
| 262 virtual MojoResult GetDataPipeProducerOptionsImplNoLock( |
| 263 UserPointer<MojoDataPipeProducerOptions> options, |
| 264 uint32_t options_num_bytes) MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_); |
254 virtual MojoResult WriteDataImplNoLock(UserPointer<const void> elements, | 265 virtual MojoResult WriteDataImplNoLock(UserPointer<const void> elements, |
255 UserPointer<uint32_t> num_bytes, | 266 UserPointer<uint32_t> num_bytes, |
256 MojoWriteDataFlags flags) | 267 MojoWriteDataFlags flags) |
257 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_); | 268 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_); |
258 virtual MojoResult BeginWriteDataImplNoLock( | 269 virtual MojoResult BeginWriteDataImplNoLock( |
259 UserPointer<void*> buffer, | 270 UserPointer<void*> buffer, |
260 UserPointer<uint32_t> buffer_num_bytes, | 271 UserPointer<uint32_t> buffer_num_bytes, |
261 MojoWriteDataFlags flags) MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_); | 272 MojoWriteDataFlags flags) MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_); |
262 virtual MojoResult EndWriteDataImplNoLock(uint32_t num_bytes_written) | 273 virtual MojoResult EndWriteDataImplNoLock(uint32_t num_bytes_written) |
263 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_); | 274 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_); |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 | 453 |
443 // So logging macros and |DCHECK_EQ()|, etc. work. | 454 // So logging macros and |DCHECK_EQ()|, etc. work. |
444 inline std::ostream& operator<<(std::ostream& out, Dispatcher::Type type) { | 455 inline std::ostream& operator<<(std::ostream& out, Dispatcher::Type type) { |
445 return out << static_cast<int>(type); | 456 return out << static_cast<int>(type); |
446 } | 457 } |
447 | 458 |
448 } // namespace system | 459 } // namespace system |
449 } // namespace mojo | 460 } // namespace mojo |
450 | 461 |
451 #endif // MOJO_EDK_SYSTEM_DISPATCHER_H_ | 462 #endif // MOJO_EDK_SYSTEM_DISPATCHER_H_ |
OLD | NEW |