| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_C_BINDINGS_BUFFER_H_ | 5 #ifndef MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_BUFFER_H_ |
| 6 #define MOJO_PUBLIC_C_BINDINGS_BUFFER_H_ | 6 #define MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_BUFFER_H_ |
| 7 | 7 |
| 8 #include <mojo/macros.h> | 8 #include <mojo/macros.h> |
| 9 #include <mojo/system/handle.h> | 9 #include <mojo/system/handle.h> |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| 11 | 11 |
| 12 MOJO_BEGIN_EXTERN_C | 12 MOJO_BEGIN_EXTERN_C |
| 13 | 13 |
| 14 // |MojomBuffer| is used to track a buffer state for mojom serialization. The | 14 // |MojomBuffer| is used to track a buffer state for mojom serialization. The |
| 15 // user must initialize this struct themselves. See the fields for details. | 15 // user must initialize this struct themselves. See the fields for details. |
| 16 struct MojomBuffer { | 16 struct MojomBuffer { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 38 uint32_t num_handles; | 38 uint32_t num_handles; |
| 39 // The number of handles used so far in |handles|. As handles are moved into | 39 // The number of handles used so far in |handles|. As handles are moved into |
| 40 // |handles|, this counter is incremented. The caller can use it to determine | 40 // |handles|, this counter is incremented. The caller can use it to determine |
| 41 // how many handles were moved into |handles| after serialization. This | 41 // how many handles were moved into |handles| after serialization. This |
| 42 // counter must be initialized appropriately before the struct can be used. | 42 // counter must be initialized appropriately before the struct can be used. |
| 43 uint32_t num_handles_used; | 43 uint32_t num_handles_used; |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 MOJO_END_EXTERN_C | 46 MOJO_END_EXTERN_C |
| 47 | 47 |
| 48 #endif // MOJO_PUBLIC_C_BINDINGS_BUFFER_H_ | 48 #endif // MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_BUFFER_H_ |
| OLD | NEW |