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 // Note: This header should be compilable as C. | 5 // Note: This header should be compilable as C. |
6 | 6 |
7 #ifndef MOJO_PUBLIC_C_SYSTEM_THUNKS_H_ | 7 #ifndef MOJO_PUBLIC_C_SYSTEM_THUNKS_H_ |
8 #define MOJO_PUBLIC_C_SYSTEM_THUNKS_H_ | 8 #define MOJO_PUBLIC_C_SYSTEM_THUNKS_H_ |
9 | 9 |
10 #include <stddef.h> | 10 #include <stddef.h> |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 MojoPlatformSharedBufferHandleFlags flags, | 149 MojoPlatformSharedBufferHandleFlags flags, |
150 MojoHandle* mojo_handle); | 150 MojoHandle* mojo_handle); |
151 MojoResult (*UnwrapPlatformSharedBufferHandle)( | 151 MojoResult (*UnwrapPlatformSharedBufferHandle)( |
152 MojoHandle mojo_handle, | 152 MojoHandle mojo_handle, |
153 struct MojoPlatformHandle* platform_handle, | 153 struct MojoPlatformHandle* platform_handle, |
154 size_t* num_bytes, | 154 size_t* num_bytes, |
155 MojoPlatformSharedBufferHandleFlags* flags); | 155 MojoPlatformSharedBufferHandleFlags* flags); |
156 MojoResult (*NotifyBadMessage)(MojoMessageHandle message, | 156 MojoResult (*NotifyBadMessage)(MojoMessageHandle message, |
157 const char* error, | 157 const char* error, |
158 size_t error_num_bytes); | 158 size_t error_num_bytes); |
| 159 MojoResult (*GetProperty)(MojoPropertyType type, void* value); |
159 }; | 160 }; |
160 #pragma pack(pop) | 161 #pragma pack(pop) |
161 | 162 |
162 // Use this type for the function found by dynamically discovering it in | 163 // Use this type for the function found by dynamically discovering it in |
163 // a DSO linked with mojo_system. For example: | 164 // a DSO linked with mojo_system. For example: |
164 // MojoSetSystemThunksFn mojo_set_system_thunks_fn = | 165 // MojoSetSystemThunksFn mojo_set_system_thunks_fn = |
165 // reinterpret_cast<MojoSetSystemThunksFn>(app_library.GetFunctionPointer( | 166 // reinterpret_cast<MojoSetSystemThunksFn>(app_library.GetFunctionPointer( |
166 // "MojoSetSystemThunks")); | 167 // "MojoSetSystemThunks")); |
167 // The expected size of |system_thunks| is returned. | 168 // The expected size of |system_thunks| is returned. |
168 // The contents of |system_thunks| are copied. | 169 // The contents of |system_thunks| are copied. |
169 typedef size_t (*MojoSetSystemThunksFn)( | 170 typedef size_t (*MojoSetSystemThunksFn)( |
170 const struct MojoSystemThunks* system_thunks); | 171 const struct MojoSystemThunks* system_thunks); |
171 | 172 |
172 // A function for setting up the embedder's own system thunks. This should only | 173 // A function for setting up the embedder's own system thunks. This should only |
173 // be called by Mojo embedder code. | 174 // be called by Mojo embedder code. |
174 MOJO_SYSTEM_EXPORT size_t MojoEmbedderSetSystemThunks( | 175 MOJO_SYSTEM_EXPORT size_t MojoEmbedderSetSystemThunks( |
175 const struct MojoSystemThunks* system_thunks); | 176 const struct MojoSystemThunks* system_thunks); |
176 | 177 |
177 #endif // MOJO_PUBLIC_C_SYSTEM_THUNKS_H_ | 178 #endif // MOJO_PUBLIC_C_SYSTEM_THUNKS_H_ |
OLD | NEW |