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

Unified Diff: mojo/public/dart/src/types.dart

Issue 834283003: Update Dart bindings to support updated MojoWait and MojoWaitMany APIs. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fixed comment Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/dart/src/timer_queue.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/dart/src/types.dart
diff --git a/mojo/public/dart/src/types.dart b/mojo/public/dart/src/types.dart
index 1dc3572bca950f50dfba24ecbe4ee60b13c6dba5..fa9e46579c2f0ce310e9e0311ae0f1f988c80f05 100644
--- a/mojo/public/dart/src/types.dart
+++ b/mojo/public/dart/src/types.dart
@@ -131,12 +131,30 @@ class MojoHandleSignals {
static bool isReadWrite(int mask) => (mask & READWRITE) == READWRITE;
static int toggleWrite(int mask) =>
isWritable(mask) ? (mask & ~WRITABLE) : (mask | WRITABLE);
+ static bool isPeerClosed(int mask) => (mask & PEER_CLOSED) == PEER_CLOSED;
}
class MojoHandleSignalsState {
- const MojoHandleSignalsState(this.satisfied_signals,
- this.satisfiable_signals);
+ MojoHandleSignalsState(this.satisfied_signals,
+ this.satisfiable_signals);
+
final int satisfied_signals;
final int satisfiable_signals;
}
+
+class MojoWaitResult {
+ MojoWaitResult(this.result, this.state);
+ final MojoResult result;
+ MojoHandleSignalsState state;
+}
+
+class MojoWaitManyResult {
+ MojoWaitManyResult(this.result, this.index, this.states);
+ final MojoResult result;
+ final int index;
+ List<MojoHandleSignalsState> states;
+
+ bool get isIndexValid => (this.index != null);
+ bool get areSignalStatesValid => (this.states != null);
+}
« no previous file with comments | « mojo/public/dart/src/timer_queue.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698