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_PUBLIC_SYSTEM_CORE_H_ | 5 #ifndef MOJO_PUBLIC_SYSTEM_CORE_H_ |
6 #define MOJO_PUBLIC_SYSTEM_CORE_H_ | 6 #define MOJO_PUBLIC_SYSTEM_CORE_H_ |
7 | 7 |
8 // Note: This header should be compilable as C. | 8 // Note: This header should be compilable as C. |
9 | 9 |
10 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 uint32_t* num_bytes, | 399 uint32_t* num_bytes, |
400 MojoHandle* handles, | 400 MojoHandle* handles, |
401 uint32_t* num_handles, | 401 uint32_t* num_handles, |
402 MojoReadMessageFlags flags); | 402 MojoReadMessageFlags flags); |
403 | 403 |
404 // Data pipe: | 404 // Data pipe: |
405 // TODO(vtl): Moar docs. | 405 // TODO(vtl): Moar docs. |
406 | 406 |
407 MOJO_SYSTEM_EXPORT MojoResult MojoCreateDataPipe( | 407 MOJO_SYSTEM_EXPORT MojoResult MojoCreateDataPipe( |
408 const struct MojoCreateDataPipeOptions* options, | 408 const struct MojoCreateDataPipeOptions* options, |
409 MojoHandle* producer_handle, | 409 MojoHandle* data_pipe_producer_handle, |
410 MojoHandle* consumer_handle); | 410 MojoHandle* data_pipe_consumer_handle); |
411 | 411 |
412 MOJO_SYSTEM_EXPORT MojoResult MojoWriteData( | 412 MOJO_SYSTEM_EXPORT MojoResult MojoWriteData( |
413 MojoHandle data_pipe_producer_handle, | 413 MojoHandle data_pipe_producer_handle, |
414 const void* elements, | 414 const void* elements, |
415 uint32_t* num_elements, | 415 uint32_t* num_elements, |
416 MojoWriteDataFlags flags); | 416 MojoWriteDataFlags flags); |
417 | 417 |
| 418 // TODO(vtl): Note to self: |buffer_num_elements| is an "in-out" parameter: |
| 419 // on the "in" side, |*buffer_num_elements| is the number requested; on success, |
| 420 // on the "out" side, it's the number available (which may be GREATER or LESS |
| 421 // than the number requested; if the "all-or-nothing" flag is set, it's AT LEAST |
| 422 // the number requested). |
418 MOJO_SYSTEM_EXPORT MojoResult MojoBeginWriteData( | 423 MOJO_SYSTEM_EXPORT MojoResult MojoBeginWriteData( |
419 MojoHandle data_pipe_producer_handle, | 424 MojoHandle data_pipe_producer_handle, |
420 void** buffer, | 425 void** buffer, |
421 uint32_t* buffer_num_elements, | 426 uint32_t* buffer_num_elements, |
422 MojoWriteDataFlags flags); | 427 MojoWriteDataFlags flags); |
423 | 428 |
424 MOJO_SYSTEM_EXPORT MojoResult MojoEndWriteData( | 429 MOJO_SYSTEM_EXPORT MojoResult MojoEndWriteData( |
425 MojoHandle data_pipe_producer_handle, | 430 MojoHandle data_pipe_producer_handle, |
426 uint32_t num_elements_written); | 431 uint32_t num_elements_written); |
427 | 432 |
(...skipping 11 matching lines...) Expand all Loading... |
439 | 444 |
440 MOJO_SYSTEM_EXPORT MojoResult MojoEndReadData( | 445 MOJO_SYSTEM_EXPORT MojoResult MojoEndReadData( |
441 MojoHandle data_pipe_consumer_handle, | 446 MojoHandle data_pipe_consumer_handle, |
442 uint32_t num_elements_read); | 447 uint32_t num_elements_read); |
443 | 448 |
444 #ifdef __cplusplus | 449 #ifdef __cplusplus |
445 } // extern "C" | 450 } // extern "C" |
446 #endif | 451 #endif |
447 | 452 |
448 #endif // MOJO_PUBLIC_SYSTEM_CORE_H_ | 453 #endif // MOJO_PUBLIC_SYSTEM_CORE_H_ |
OLD | NEW |