OLD | NEW |
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 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 LIBRARIES_NACL_IO_KERNEL_INTERCEPT_H_ | 5 #ifndef LIBRARIES_NACL_IO_KERNEL_INTERCEPT_H_ |
6 #define LIBRARIES_NACL_IO_KERNEL_INTERCEPT_H_ | 6 #define LIBRARIES_NACL_IO_KERNEL_INTERCEPT_H_ |
7 | 7 |
8 #include <stdarg.h> | 8 #include <stdarg.h> |
9 #include <sys/time.h> | 9 #include <sys/time.h> |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 * with NULL will instantiate a default kernel proxy object. ki_init must | 39 * with NULL will instantiate a default kernel proxy object. ki_init must |
40 * be called before any other ki_XXX function can be used. | 40 * be called before any other ki_XXX function can be used. |
41 */ | 41 */ |
42 int ki_init(void* kernel_proxy); | 42 int ki_init(void* kernel_proxy); |
43 | 43 |
44 /* | 44 /* |
45 * Saves the current internal state. This is used by test code which can | 45 * Saves the current internal state. This is used by test code which can |
46 * use this to save the current state before calling ki_init(). The | 46 * use this to save the current state before calling ki_init(). The |
47 * pushed state is restored in the next call to ki_uninit(). | 47 * pushed state is restored in the next call to ki_uninit(). |
48 */ | 48 */ |
49 int ki_push_state_for_testing(); | 49 int ki_push_state_for_testing(void); |
50 | 50 |
51 int ki_init_ppapi(void* kernel_proxy, | 51 int ki_init_ppapi(void* kernel_proxy, |
52 PP_Instance instance, | 52 PP_Instance instance, |
53 PPB_GetInterface get_browser_interface); | 53 PPB_GetInterface get_browser_interface); |
54 | 54 |
55 /* | 55 /* |
56 * ki_init_interface() is a variant of ki_init() that can be called with | 56 * ki_init_interface() is a variant of ki_init() that can be called with |
57 * a PepperInterface object. | 57 * a PepperInterface object. |
58 */ | 58 */ |
59 int ki_init_interface(void* kernel_proxy, void* pepper_interface); | 59 int ki_init_interface(void* kernel_proxy, void* pepper_interface); |
60 | 60 |
61 #ifdef __cplusplus | 61 #ifdef __cplusplus |
62 nacl_io::KernelProxy* ki_get_proxy(); | 62 nacl_io::KernelProxy* ki_get_proxy(); |
63 #endif | 63 #endif |
64 | 64 |
65 int ki_is_initialized(); | 65 int ki_is_initialized(void); |
66 void ki_uninit(); | 66 void ki_uninit(void); |
67 | 67 |
68 int ki_chdir(const char* path); | 68 int ki_chdir(const char* path); |
69 void ki_exit(int status); | 69 void ki_exit(int status); |
70 char* ki_getcwd(char* buf, size_t size); | 70 char* ki_getcwd(char* buf, size_t size); |
71 char* ki_getwd(char* buf); | 71 char* ki_getwd(char* buf); |
72 int ki_dup(int oldfd); | 72 int ki_dup(int oldfd); |
73 int ki_dup2(int oldfd, int newfd); | 73 int ki_dup2(int oldfd, int newfd); |
74 int ki_chmod(const char* path, mode_t mode); | 74 int ki_chmod(const char* path, mode_t mode); |
75 int ki_fchdir(int fd); | 75 int ki_fchdir(int fd); |
76 int ki_fchmod(int fd, mode_t mode); | 76 int ki_fchmod(int fd, mode_t mode); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 const void* optval, | 178 const void* optval, |
179 socklen_t len); | 179 socklen_t len); |
180 int ki_shutdown(int fd, int how); | 180 int ki_shutdown(int fd, int how); |
181 int ki_socket(int domain, int type, int protocol); | 181 int ki_socket(int domain, int type, int protocol); |
182 int ki_socketpair(int domain, int type, int protocl, int* sv); | 182 int ki_socketpair(int domain, int type, int protocl, int* sv); |
183 #endif /* PROVIDES_SOCKET_API */ | 183 #endif /* PROVIDES_SOCKET_API */ |
184 | 184 |
185 EXTERN_C_END | 185 EXTERN_C_END |
186 | 186 |
187 #endif /* LIBRARIES_NACL_IO_KERNEL_INTERCEPT_H_ */ | 187 #endif /* LIBRARIES_NACL_IO_KERNEL_INTERCEPT_H_ */ |
OLD | NEW |