Chromium Code Reviews| Index: mojo/dart/packages/mojo/sdk_ext/src/constants.dart |
| diff --git a/mojo/dart/packages/mojo/sdk_ext/src/constants.dart b/mojo/dart/packages/mojo/sdk_ext/src/constants.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2569c4448ace081ff3c4aa3231bcc5792cdfe26e |
| --- /dev/null |
| +++ b/mojo/dart/packages/mojo/sdk_ext/src/constants.dart |
| @@ -0,0 +1,55 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
|
zra
2016/02/22 20:20:04
2016
floitsch
2016/02/26 18:48:07
Done.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +part of internal; |
|
zra
2016/02/22 20:20:04
Please add comment explaining where these values c
floitsch
2016/02/26 18:48:08
Done.
|
| + |
| +class MojoConstants { |
| + // MojoResult: |
|
zra
2016/02/22 20:20:04
Should these be doc comments?
floitsch
2016/02/26 18:48:07
Dartdoc doesn't support sections yet. This means,
|
| + static const int kOk = 0; |
| + static const int kCancelled = 1; |
| + static const int kUnknown = 2; |
| + static const int kInvalidArgument = 3; |
| + static const int kDeadlineExceeded = 4; |
| + static const int kNotFound = 5; |
| + static const int kAlreadyExists = 6; |
| + static const int kPermissionDenied = 7; |
| + static const int kResourceExhausted = 8; |
| + static const int kFailedPrecondition = 9; |
| + static const int kAborted = 10; |
| + static const int kOutOfRange = 11; |
| + static const int kUnimplemented = 12; |
| + static const int kInternal = 13; |
| + static const int kUnavailable = 14; |
| + static const int kDataLoss = 15; |
| + static const int kBusy = 16; |
| + static const int kShouldWait = 17; |
| + |
| + // Shared constant for "no flag or signal". |
| + static const int kNone = 0; |
| + |
| + // Endpoint Read Flags: |
| + static const int kMayDiscard = 1; |
| + |
| + // DataPipeProducer and Consumer |
|
zra
2016/02/22 20:20:04
Consumer:
floitsch
2016/02/26 18:48:07
Done.
|
| + static const int kAllOrNone = 1 << 0; |
| + |
| + // DataPipeConsumer: |
| + static const int kDiscard = 1 << 1; |
| + static const int kQuery = 1 << 2; |
| + static const int kPeek = 1 << 3; |
| + |
| + // DataPipe: |
| + static const int kDefaultPipeElementSize = 1; |
| + static const int kDefaultPipeCapacity = 0; |
| + |
| + // Handle Signals: |
| + static const int kReadable = 0x1; |
| + static const int kWritable = 0x2; |
| + static const int kPeerClosed = 0x4; |
| + static const int kHandleSignalBitfieldSize = 3; |
| + |
| + // Handle: |
| + static const int kInvalidHandleToken = 0; |
| + static const int kDeadlineIndefinite = -1; |
| +} |