| 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() |
| 11 | 11 |
| 12 # This function is not provided by the Mojo system APIs, but instead allows | 12 # This function is not provided by the Mojo system APIs, but instead allows |
| 13 # trusted code to provide a handle for use by untrusted code. See the | 13 # trusted code to provide a handle for use by untrusted code. See the |
| 14 # implementation in mojo_syscall.cc.tmpl. | 14 # implementation in mojo_syscall.cc.tmpl. |
| 15 f = mojo.Func('_MojoGetInitialHandle', 'MojoResult') | 15 f = mojo.Func('_MojoGetInitialHandle', 'MojoResult') |
| 16 f.Param('handle').Out('MojoHandle') | 16 f.Param('handle').Out('MojoHandle') |
| 17 | 17 |
| 18 f = mojo.Func('MojoGetTimeTicksNow', 'MojoTimeTicks') | 18 f = mojo.Func('MojoGetTimeTicksNow', 'MojoTimeTicks') |
| 19 | 19 |
| 20 f = mojo.Func('MojoClose', 'MojoResult') | 20 f = mojo.Func('MojoClose', 'MojoResult') |
| 21 f.Param('handle').In('MojoHandle') | 21 f.Param('handle').In('MojoHandle') |
| 22 | 22 |
| 23 f = mojo.Func('MojoGetRights', 'MojoResult') |
| 24 f.Param('handle').In('MojoHandle') |
| 25 f.Param('rights').Out('MojoHandleRights') |
| 26 |
| 23 f = mojo.Func('MojoWait', 'MojoResult') | 27 f = mojo.Func('MojoWait', 'MojoResult') |
| 24 f.Param('handle').In('MojoHandle') | 28 f.Param('handle').In('MojoHandle') |
| 25 f.Param('signals').In('MojoHandleSignals') | 29 f.Param('signals').In('MojoHandleSignals') |
| 26 f.Param('deadline').In('MojoDeadline') | 30 f.Param('deadline').In('MojoDeadline') |
| 27 f.Param('signals_state').OutFixedStruct('MojoHandleSignalsState').Optional() | 31 f.Param('signals_state').OutFixedStruct('MojoHandleSignalsState').Optional() |
| 28 | 32 |
| 29 f = mojo.Func('MojoWaitMany', 'MojoResult') | 33 f = mojo.Func('MojoWaitMany', 'MojoResult') |
| 30 f.Param('handles').InArray('MojoHandle', 'num_handles') | 34 f.Param('handles').InArray('MojoHandle', 'num_handles') |
| 31 f.Param('signals').InArray('MojoHandleSignals', 'num_handles') | 35 f.Param('signals').InArray('MojoHandleSignals', 'num_handles') |
| 32 f.Param('num_handles').In('uint32_t') | 36 f.Param('num_handles').In('uint32_t') |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 | 157 |
| 154 f = mojo.Func('MojoUnmapBuffer', 'MojoResult') | 158 f = mojo.Func('MojoUnmapBuffer', 'MojoResult') |
| 155 f.Param('buffer').In('void*') | 159 f.Param('buffer').In('void*') |
| 156 # TODO(ncbray): support mmaping. | 160 # TODO(ncbray): support mmaping. |
| 157 # https://code.google.com/p/chromium/issues/detail?id=401761 | 161 # https://code.google.com/p/chromium/issues/detail?id=401761 |
| 158 f.IsBrokenInNaCl() | 162 f.IsBrokenInNaCl() |
| 159 | 163 |
| 160 mojo.Finalize() | 164 mojo.Finalize() |
| 161 | 165 |
| 162 return mojo | 166 return mojo |
| OLD | NEW |