OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_NACL_NONSFI_IRT_MOJO_NONSFI_H_ | 5 #ifndef MOJO_NACL_NONSFI_IRT_MOJO_NONSFI_H_ |
6 #define MOJO_NACL_NONSFI_IRT_MOJO_NONSFI_H_ | 6 #define MOJO_NACL_NONSFI_IRT_MOJO_NONSFI_H_ |
7 | 7 |
| 8 #include <string> |
| 9 |
8 #include "mojo/public/c/system/functions.h" | 10 #include "mojo/public/c/system/functions.h" |
| 11 #include "native_client/src/untrusted/irt/irt_dev.h" |
9 | 12 |
10 namespace nacl { | 13 namespace nacl { |
11 | 14 |
| 15 extern const struct nacl_irt_private_pnacl_translator_compile |
| 16 nacl_irt_private_pnacl_translator_compile; |
| 17 extern const struct nacl_irt_private_pnacl_translator_link |
| 18 nacl_irt_private_pnacl_translator_link; |
| 19 extern const struct nacl_irt_resource_open |
| 20 nacl_irt_resource_open; |
| 21 |
12 // Used to pass handle to application. If uncalled, | 22 // Used to pass handle to application. If uncalled, |
13 // the handle defaults to MOJO_HANDLE_INVALID. | 23 // the handle defaults to MOJO_HANDLE_INVALID. |
14 void MojoSetInitialHandle(MojoHandle handle); | 24 void MojoSetInitialHandle(MojoHandle handle); |
15 | 25 |
| 26 MojoResult MojoGetInitialHandle(MojoHandle* handle); |
| 27 |
| 28 // Mechanism to control when nexes get access to the PNaCl translation |
| 29 // IRT functions. |
| 30 void MojoPnaclTranslatorEnable(); |
| 31 |
| 32 // For interfaces like irt_resource_open, identify a root path |
| 33 // which holds all relevant files. |
| 34 void MojoSetBasePath(std::string base_path); |
| 35 std::string MojoGetBasePath(); |
| 36 |
16 // IRT interface query function which may be passed to nacl_irt_nonsfi_entry. | 37 // IRT interface query function which may be passed to nacl_irt_nonsfi_entry. |
17 // Queries for a mojo interface, then for the irt core. | 38 // Queries for a mojo interface, then for the irt core. |
18 size_t MojoIrtNonsfiQuery(const char* interface_ident, | 39 size_t MojoIrtNonsfiQuery(const char* interface_ident, |
19 void* table, | 40 void* table, |
20 size_t tablesize); | 41 size_t tablesize); |
21 | 42 |
22 } // namespace nacl | 43 } // namespace nacl |
23 #endif // MOJO_NACL_NONSFI_IRT_MOJO_NONSFI_H_ | 44 #endif // MOJO_NACL_NONSFI_IRT_MOJO_NONSFI_H_ |
OLD | NEW |