| 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 # pylint: disable=F0401 | 5 # pylint: disable=F0401 |
| 6 | 6 |
| 7 import interface_dsl | 7 import interface_dsl |
| 8 | 8 |
| 9 def MakeInterface(): | 9 def MakeInterface(): |
| 10 mojo = interface_dsl.Interface() | 10 mojo = interface_dsl.Interface() |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 f.Param('handles').OutArray('MojoHandle', 'num_handles').Optional() | 56 f.Param('handles').OutArray('MojoHandle', 'num_handles').Optional() |
| 57 f.Param('num_handles').InOut('uint32_t').Optional() | 57 f.Param('num_handles').InOut('uint32_t').Optional() |
| 58 f.Param('flags').In('MojoReadMessageFlags') | 58 f.Param('flags').In('MojoReadMessageFlags') |
| 59 | 59 |
| 60 f = mojo.Func('MojoCreateDataPipe', 'MojoResult') | 60 f = mojo.Func('MojoCreateDataPipe', 'MojoResult') |
| 61 p = f.Param('options') | 61 p = f.Param('options') |
| 62 p.InExtensibleStruct('MojoCreateDataPipeOptions').Optional() | 62 p.InExtensibleStruct('MojoCreateDataPipeOptions').Optional() |
| 63 f.Param('data_pipe_producer_handle').Out('MojoHandle') | 63 f.Param('data_pipe_producer_handle').Out('MojoHandle') |
| 64 f.Param('data_pipe_consumer_handle').Out('MojoHandle') | 64 f.Param('data_pipe_consumer_handle').Out('MojoHandle') |
| 65 | 65 |
| 66 f = mojo.Func('MojoSetDataPipeProducerOptions', 'MojoResult') |
| 67 f.Param('data_pipe_producer_handle').In('MojoHandle') |
| 68 p = f.Param('options') |
| 69 p.InExtensibleStruct('MojoDataPipeProducerOptions').Optional() |
| 70 |
| 71 f = mojo.Func('MojoGetDataPipeProducerOptions', 'MojoResult') |
| 72 f.Param('data_pipe_producer_handle').In('MojoHandle') |
| 73 p = f.Param('options') |
| 74 p.OutExtensibleStruct('MojoDataPipeProducerOptions', 'options_num_bytes') |
| 75 f.Param('options_num_bytes').In('uint32_t') |
| 76 |
| 66 f = mojo.Func('MojoWriteData', 'MojoResult') | 77 f = mojo.Func('MojoWriteData', 'MojoResult') |
| 67 f.Param('data_pipe_producer_handle').In('MojoHandle') | 78 f.Param('data_pipe_producer_handle').In('MojoHandle') |
| 68 f.Param('elements').InArray('void', 'num_bytes') | 79 f.Param('elements').InArray('void', 'num_bytes') |
| 69 f.Param('num_bytes').InOut('uint32_t') | 80 f.Param('num_bytes').InOut('uint32_t') |
| 70 f.Param('flags').In('MojoWriteDataFlags') | 81 f.Param('flags').In('MojoWriteDataFlags') |
| 71 | 82 |
| 72 f = mojo.Func('MojoBeginWriteData', 'MojoResult') | 83 f = mojo.Func('MojoBeginWriteData', 'MojoResult') |
| 73 f.Param('data_pipe_producer_handle').In('MojoHandle') | 84 f.Param('data_pipe_producer_handle').In('MojoHandle') |
| 74 f.Param('buffer').Out('void*') | 85 f.Param('buffer').Out('void*') |
| 75 f.Param('buffer_num_bytes').InOut('uint32_t') | 86 f.Param('buffer_num_bytes').InOut('uint32_t') |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 | 153 |
| 143 f = mojo.Func('MojoUnmapBuffer', 'MojoResult') | 154 f = mojo.Func('MojoUnmapBuffer', 'MojoResult') |
| 144 f.Param('buffer').In('void*') | 155 f.Param('buffer').In('void*') |
| 145 # TODO(ncbray): support mmaping. | 156 # TODO(ncbray): support mmaping. |
| 146 # https://code.google.com/p/chromium/issues/detail?id=401761 | 157 # https://code.google.com/p/chromium/issues/detail?id=401761 |
| 147 f.IsBrokenInNaCl() | 158 f.IsBrokenInNaCl() |
| 148 | 159 |
| 149 mojo.Finalize() | 160 mojo.Finalize() |
| 150 | 161 |
| 151 return mojo | 162 return mojo |
| OLD | NEW |