Chromium Code Reviews| Index: mojo/public/java/src/org/chromium/mojo/system/SharedBufferHandle.java |
| diff --git a/mojo/public/java/src/org/chromium/mojo/system/SharedBufferHandle.java b/mojo/public/java/src/org/chromium/mojo/system/SharedBufferHandle.java |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..bb326f8ae44da11911766498ed4807794552a60b |
| --- /dev/null |
| +++ b/mojo/public/java/src/org/chromium/mojo/system/SharedBufferHandle.java |
| @@ -0,0 +1,125 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +package org.chromium.mojo.system; |
| + |
| +import java.nio.ByteBuffer; |
| + |
| +/** |
| + * TODO(qsr): Insert description here. |
| + */ |
| +public interface SharedBufferHandle extends Handle { |
| + |
| + /** |
| + * TODO(qsr): Insert description here. |
| + */ |
| + public static class CreateFlags extends Flags<CreateFlags> { |
| + private static final int FLAG_NONE = 0; |
| + |
| + /** |
| + * Dedicated constructor. |
| + * |
| + * @param flags initial value of the flags. |
| + */ |
| + protected CreateFlags(int flags) { |
| + super(flags); |
| + } |
| + |
| + /** |
| + * @return flags with no bit set. |
| + */ |
| + public static CreateFlags none() { |
| + return new CreateFlags(FLAG_NONE); |
| + } |
| + |
| + } |
| + |
| + /** |
| + * TODO(qsr): Insert description here. |
| + */ |
| + public static class CreateOptions { |
| + public CreateFlags flags; |
|
bulach
2014/04/14 17:39:56
ditto
|
| + } |
| + |
| + /** |
| + * TODO(qsr): Insert description here. |
| + */ |
| + public static class DuplicateFlags extends Flags<DuplicateFlags> { |
| + private static final int FLAG_NONE = 0; |
| + |
| + /** |
| + * Dedicated constructor. |
| + * |
| + * @param flags initial value of the flags. |
| + */ |
| + protected DuplicateFlags(int flags) { |
| + super(flags); |
| + } |
| + |
| + /** |
| + * @return flags with no bit set. |
| + */ |
| + public static DuplicateFlags none() { |
| + return new DuplicateFlags(FLAG_NONE); |
| + } |
| + |
| + } |
| + |
| + /** |
| + * TODO(qsr): Insert description here. |
| + */ |
| + public static class DuplicateOptions { |
| + public DuplicateFlags flags; |
| + } |
| + |
| + /** |
| + * TODO(qsr): Insert description here. |
| + */ |
| + public static class MapFlags extends Flags<MapFlags> { |
| + private static final int FLAG_NONE = 0; |
| + |
| + /** |
| + * Dedicated constructor. |
| + * |
| + * @param flags initial value of the flags. |
| + */ |
| + protected MapFlags(int flags) { |
| + super(flags); |
| + } |
| + |
| + /** |
| + * @return flags with no bit set. |
| + */ |
| + public static MapFlags none() { |
| + return new MapFlags(FLAG_NONE); |
| + } |
| + |
| + } |
| + |
| + /** |
| + * TODO(qsr): |
| + * |
| + * @param options |
| + * @return TODO(qsr) |
| + */ |
| + public SharedBufferHandle duplicate(DuplicateOptions options); |
| + |
| + /** |
| + * TODO(qsr): |
| + * |
| + * @param offset |
| + * @param numBytes |
| + * @param flags |
| + * @return TODO(qsr) |
| + */ |
| + public ByteBuffer map(long offset, long numBytes, MapFlags flags); |
| + |
| + /** |
| + * TODO(qsr): |
| + * |
| + * @param buffer |
| + */ |
| + public void unmap(ByteBuffer buffer); |
| + |
| +} |