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

Side by Side Diff: mojo/public/c/system/functions.h

Issue 1811433002: [mojo-edk] Expose notification source to MojoWatch callbacks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 // This file contains basic functions common to different Mojo system APIs. 5 // This file contains basic functions common to different Mojo system APIs.
6 // 6 //
7 // Note: This header should be compilable as C. 7 // Note: This header should be compilable as C.
8 8
9 #ifndef MOJO_PUBLIC_C_SYSTEM_FUNCTIONS_H_ 9 #ifndef MOJO_PUBLIC_C_SYSTEM_FUNCTIONS_H_
10 #define MOJO_PUBLIC_C_SYSTEM_FUNCTIONS_H_ 10 #define MOJO_PUBLIC_C_SYSTEM_FUNCTIONS_H_
11 11
12 #include <stddef.h> 12 #include <stddef.h>
13 #include <stdint.h> 13 #include <stdint.h>
14 14
15 #include "mojo/public/c/system/system_export.h" 15 #include "mojo/public/c/system/system_export.h"
16 #include "mojo/public/c/system/types.h" 16 #include "mojo/public/c/system/types.h"
17 17
18 #ifdef __cplusplus 18 #ifdef __cplusplus
19 extern "C" { 19 extern "C" {
20 #endif 20 #endif
21 21
22 // A callback used to notify watchers registered via |MojoWatch()|. Called when 22 // A callback used to notify watchers registered via |MojoWatch()|. Called when
23 // some watched signals are satisfied or become unsatisfiable. See the 23 // some watched signals are satisfied or become unsatisfiable. See the
24 // documentation for |MojoWatch()| for more details. 24 // documentation for |MojoWatch()| for more details.
25 typedef void (*MojoWatchCallback)(uintptr_t context, 25 typedef void (*MojoWatchCallback)(uintptr_t context,
26 MojoResult result, 26 MojoResult result,
27 struct MojoHandleSignalsState signals_state); 27 struct MojoHandleSignalsState signals_state,
28 MojoWatchNotificationFlags flags);
28 29
29 // Note: Pointer parameters that are labelled "optional" may be null (at least 30 // Note: Pointer parameters that are labelled "optional" may be null (at least
30 // under some circumstances). Non-const pointer parameters are also labeled 31 // under some circumstances). Non-const pointer parameters are also labeled
31 // "in", "out", or "in/out", to indicate how they are used. (Note that how/if 32 // "in", "out", or "in/out", to indicate how they are used. (Note that how/if
32 // such a parameter is used may depend on other parameters or the requested 33 // such a parameter is used may depend on other parameters or the requested
33 // operation's success/failure. E.g., a separate |flags| parameter may control 34 // operation's success/failure. E.g., a separate |flags| parameter may control
34 // whether a given "in/out" parameter is used for input, output, or both.) 35 // whether a given "in/out" parameter is used for input, output, or both.)
35 36
36 // Returns the time, in microseconds, since some undefined point in the past. 37 // Returns the time, in microseconds, since some undefined point in the past.
37 // The values are only meaningful relative to other values that were obtained 38 // The values are only meaningful relative to other values that were obtained
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 // |MOJO_RESULT_INVALID_ARGUMENT| if no watch was registered with |context| 204 // |MOJO_RESULT_INVALID_ARGUMENT| if no watch was registered with |context|
204 // for the given |handle|, or if |handle| is invalid. 205 // for the given |handle|, or if |handle| is invalid.
205 MOJO_SYSTEM_EXPORT MojoResult 206 MOJO_SYSTEM_EXPORT MojoResult
206 MojoCancelWatch(MojoHandle handle, uintptr_t context); 207 MojoCancelWatch(MojoHandle handle, uintptr_t context);
207 208
208 #ifdef __cplusplus 209 #ifdef __cplusplus
209 } // extern "C" 210 } // extern "C"
210 #endif 211 #endif
211 212
212 #endif // MOJO_PUBLIC_C_SYSTEM_FUNCTIONS_H_ 213 #endif // MOJO_PUBLIC_C_SYSTEM_FUNCTIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698