Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Side by Side Diff: mojo/public/platform/native/system_thunks.h

Issue 1890603003: Add Mojo{Set,Get}DataPipeProducerOptions() to the standard/native system thunks. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_PLATFORM_NATIVE_SYSTEM_THUNKS_H_ 7 #ifndef MOJO_PUBLIC_PLATFORM_NATIVE_SYSTEM_THUNKS_H_
8 #define MOJO_PUBLIC_PLATFORM_NATIVE_SYSTEM_THUNKS_H_ 8 #define MOJO_PUBLIC_PLATFORM_NATIVE_SYSTEM_THUNKS_H_
9 9
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 MojoResult (*GetBufferInformation)(MojoHandle buffer_handle, 112 MojoResult (*GetBufferInformation)(MojoHandle buffer_handle,
113 struct MojoBufferInformation* info, 113 struct MojoBufferInformation* info,
114 uint32_t info_num_bytes); 114 uint32_t info_num_bytes);
115 MojoResult (*SetDataPipeConsumerOptions)( 115 MojoResult (*SetDataPipeConsumerOptions)(
116 MojoHandle data_pipe_consumer_handle, 116 MojoHandle data_pipe_consumer_handle,
117 const struct MojoDataPipeConsumerOptions* options); 117 const struct MojoDataPipeConsumerOptions* options);
118 MojoResult (*GetDataPipeConsumerOptions)( 118 MojoResult (*GetDataPipeConsumerOptions)(
119 MojoHandle data_pipe_consumer_handle, 119 MojoHandle data_pipe_consumer_handle,
120 struct MojoDataPipeConsumerOptions* options, 120 struct MojoDataPipeConsumerOptions* options,
121 uint32_t options_num_bytes); 121 uint32_t options_num_bytes);
122 MojoResult (*SetDataPipeProducerOptions)(
123 MojoHandle data_pipe_producer_handle,
124 const struct MojoDataPipeProducerOptions* options);
125 MojoResult (*GetDataPipeProducerOptions)(
126 MojoHandle data_pipe_producer_handle,
127 struct MojoDataPipeProducerOptions* options,
128 uint32_t options_num_bytes);
122 }; 129 };
123 #pragma pack(pop) 130 #pragma pack(pop)
124 131
125 132
126 #ifdef __cplusplus 133 #ifdef __cplusplus
127 // Intended to be called from the embedder. Returns a |MojoCore| initialized 134 // Intended to be called from the embedder. Returns a |MojoCore| initialized
128 // to contain pointers to each of the embedder's MojoCore functions. 135 // to contain pointers to each of the embedder's MojoCore functions.
129 inline MojoSystemThunks MojoMakeSystemThunks() { 136 inline MojoSystemThunks MojoMakeSystemThunks() {
130 MojoSystemThunks system_thunks = { 137 MojoSystemThunks system_thunks = {
131 sizeof(MojoSystemThunks), 138 sizeof(MojoSystemThunks),
(...skipping 11 matching lines...) Expand all
143 MojoReadData, 150 MojoReadData,
144 MojoBeginReadData, 151 MojoBeginReadData,
145 MojoEndReadData, 152 MojoEndReadData,
146 MojoCreateSharedBuffer, 153 MojoCreateSharedBuffer,
147 MojoDuplicateBufferHandle, 154 MojoDuplicateBufferHandle,
148 MojoMapBuffer, 155 MojoMapBuffer,
149 MojoUnmapBuffer, 156 MojoUnmapBuffer,
150 MojoGetBufferInformation, 157 MojoGetBufferInformation,
151 MojoSetDataPipeConsumerOptions, 158 MojoSetDataPipeConsumerOptions,
152 MojoGetDataPipeConsumerOptions, 159 MojoGetDataPipeConsumerOptions,
160 MojoSetDataPipeProducerOptions,
161 MojoGetDataPipeProducerOptions,
153 }; 162 };
154 return system_thunks; 163 return system_thunks;
155 } 164 }
156 #endif 165 #endif
157 166
158 167
159 // Use this type for the function found by dynamically discovering it in 168 // Use this type for the function found by dynamically discovering it in
160 // a DSO linked with mojo_system. For example: 169 // a DSO linked with mojo_system. For example:
161 // MojoSetSystemThunksFn mojo_set_system_thunks_fn = 170 // MojoSetSystemThunksFn mojo_set_system_thunks_fn =
162 // reinterpret_cast<MojoSetSystemThunksFn>(app_library.GetFunctionPointer( 171 // reinterpret_cast<MojoSetSystemThunksFn>(app_library.GetFunctionPointer(
163 // "MojoSetSystemThunks")); 172 // "MojoSetSystemThunks"));
164 // The expected size of |system_thunks} is returned. 173 // The expected size of |system_thunks} is returned.
165 // The contents of |system_thunks| are copied. 174 // The contents of |system_thunks| are copied.
166 typedef size_t (*MojoSetSystemThunksFn)( 175 typedef size_t (*MojoSetSystemThunksFn)(
167 const struct MojoSystemThunks* system_thunks); 176 const struct MojoSystemThunks* system_thunks);
168 177
169 #endif // MOJO_PUBLIC_PLATFORM_NATIVE_SYSTEM_THUNKS_H_ 178 #endif // MOJO_PUBLIC_PLATFORM_NATIVE_SYSTEM_THUNKS_H_
OLDNEW
« no previous file with comments | « mojo/public/c/system/tests/core_unittest.cc ('k') | mojo/public/platform/native/system_thunks.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698