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

Side by Side Diff: mojo/edk/system/core.h

Issue 1880823005: [mojo-edk] Add explicit message object APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « mojo/edk/system/BUILD.gn ('k') | mojo/edk/system/core.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_EDK_SYSTEM_CORE_H_ 5 #ifndef MOJO_EDK_SYSTEM_CORE_H_
6 #define MOJO_EDK_SYSTEM_CORE_H_ 6 #define MOJO_EDK_SYSTEM_CORE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 const MojoHandleSignals* signals, 137 const MojoHandleSignals* signals,
138 uint32_t num_handles, 138 uint32_t num_handles,
139 MojoDeadline deadline, 139 MojoDeadline deadline,
140 uint32_t* result_index, 140 uint32_t* result_index,
141 MojoHandleSignalsState* signals_states); 141 MojoHandleSignalsState* signals_states);
142 MojoResult Watch(MojoHandle handle, 142 MojoResult Watch(MojoHandle handle,
143 MojoHandleSignals signals, 143 MojoHandleSignals signals,
144 MojoWatchCallback callback, 144 MojoWatchCallback callback,
145 uintptr_t context); 145 uintptr_t context);
146 MojoResult CancelWatch(MojoHandle handle, uintptr_t context); 146 MojoResult CancelWatch(MojoHandle handle, uintptr_t context);
147 MojoResult AllocMessage(uint32_t num_bytes,
148 const MojoHandle* handles,
149 uint32_t num_handles,
150 MojoAllocMessageFlags flags,
151 MojoMessageHandle* message);
152 MojoResult FreeMessage(MojoMessageHandle message);
153 MojoResult GetMessageBuffer(MojoMessageHandle message, void** buffer);
147 154
148 // These methods correspond to the API functions defined in 155 // These methods correspond to the API functions defined in
149 // "mojo/public/c/system/wait_set.h": 156 // "mojo/public/c/system/wait_set.h":
150 MojoResult CreateWaitSet(MojoHandle* wait_set_handle); 157 MojoResult CreateWaitSet(MojoHandle* wait_set_handle);
151 MojoResult AddHandle(MojoHandle wait_set_handle, 158 MojoResult AddHandle(MojoHandle wait_set_handle,
152 MojoHandle handle, 159 MojoHandle handle,
153 MojoHandleSignals signals); 160 MojoHandleSignals signals);
154 MojoResult RemoveHandle(MojoHandle wait_set_handle, 161 MojoResult RemoveHandle(MojoHandle wait_set_handle,
155 MojoHandle handle); 162 MojoHandle handle);
156 MojoResult GetReadyHandles(MojoHandle wait_set_handle, 163 MojoResult GetReadyHandles(MojoHandle wait_set_handle,
157 uint32_t* count, 164 uint32_t* count,
158 MojoHandle* handles, 165 MojoHandle* handles,
159 MojoResult* results, 166 MojoResult* results,
160 MojoHandleSignalsState* signals_states); 167 MojoHandleSignalsState* signals_states);
161 168
162 // These methods correspond to the API functions defined in 169 // These methods correspond to the API functions defined in
163 // "mojo/public/c/system/message_pipe.h": 170 // "mojo/public/c/system/message_pipe.h":
164 MojoResult CreateMessagePipe( 171 MojoResult CreateMessagePipe(
165 const MojoCreateMessagePipeOptions* options, 172 const MojoCreateMessagePipeOptions* options,
166 MojoHandle* message_pipe_handle0, 173 MojoHandle* message_pipe_handle0,
167 MojoHandle* message_pipe_handle1); 174 MojoHandle* message_pipe_handle1);
168 MojoResult WriteMessage(MojoHandle message_pipe_handle, 175 MojoResult WriteMessage(MojoHandle message_pipe_handle,
169 const void* bytes, 176 const void* bytes,
170 uint32_t num_bytes, 177 uint32_t num_bytes,
171 const MojoHandle* handles, 178 const MojoHandle* handles,
172 uint32_t num_handles, 179 uint32_t num_handles,
173 MojoWriteMessageFlags flags); 180 MojoWriteMessageFlags flags);
181 MojoResult WriteMessageNew(MojoHandle message_pipe_handle,
182 MojoMessageHandle message,
183 MojoWriteMessageFlags flags);
174 MojoResult ReadMessage(MojoHandle message_pipe_handle, 184 MojoResult ReadMessage(MojoHandle message_pipe_handle,
175 void* bytes, 185 void* bytes,
176 uint32_t* num_bytes, 186 uint32_t* num_bytes,
177 MojoHandle* handles, 187 MojoHandle* handles,
178 uint32_t* num_handles, 188 uint32_t* num_handles,
179 MojoReadMessageFlags flags); 189 MojoReadMessageFlags flags);
190 MojoResult ReadMessageNew(MojoHandle message_pipe_handle,
191 MojoMessageHandle* message,
192 uint32_t* num_bytes,
193 MojoHandle* handles,
194 uint32_t* num_handles,
195 MojoReadMessageFlags flags);
180 MojoResult FuseMessagePipes(MojoHandle handle0, MojoHandle handle1); 196 MojoResult FuseMessagePipes(MojoHandle handle0, MojoHandle handle1);
181 197
182 // These methods correspond to the API functions defined in 198 // These methods correspond to the API functions defined in
183 // "mojo/public/c/system/data_pipe.h": 199 // "mojo/public/c/system/data_pipe.h":
184 MojoResult CreateDataPipe( 200 MojoResult CreateDataPipe(
185 const MojoCreateDataPipeOptions* options, 201 const MojoCreateDataPipeOptions* options,
186 MojoHandle* data_pipe_producer_handle, 202 MojoHandle* data_pipe_producer_handle,
187 MojoHandle* data_pipe_consumer_handle); 203 MojoHandle* data_pipe_consumer_handle);
188 MojoResult WriteData(MojoHandle data_pipe_producer_handle, 204 MojoResult WriteData(MojoHandle data_pipe_producer_handle,
189 const void* elements, 205 const void* elements,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 base::Lock mapping_table_lock_; // Protects |mapping_table_|. 274 base::Lock mapping_table_lock_; // Protects |mapping_table_|.
259 MappingTable mapping_table_; 275 MappingTable mapping_table_;
260 276
261 DISALLOW_COPY_AND_ASSIGN(Core); 277 DISALLOW_COPY_AND_ASSIGN(Core);
262 }; 278 };
263 279
264 } // namespace edk 280 } // namespace edk
265 } // namespace mojo 281 } // namespace mojo
266 282
267 #endif // MOJO_EDK_SYSTEM_CORE_H_ 283 #endif // MOJO_EDK_SYSTEM_CORE_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/BUILD.gn ('k') | mojo/edk/system/core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698