| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 // TODO(vtl): notes to self: | 5 // TODO(vtl): notes to self: |
| 6 // - file offsets, file positions, and file sizes are int64 (though positions | 6 // - file offsets, file positions, and file sizes are int64 (though positions |
| 7 // and sizes must always be non-negative) | 7 // and sizes must always be non-negative) |
| 8 // - buffer size parameters (for read/write) are uint32 | 8 // - buffer size parameters (for read/write) are uint32 |
| 9 | 9 |
| 10 [DartPackage="mojo_services"] | 10 [DartPackage="mojo_services"] |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 => (Error error, uint32 num_bytes_written); | 35 => (Error error, uint32 num_bytes_written); |
| 36 | 36 |
| 37 // TODO(vtl): We definitely want 64 bits for |num_bytes_to_read|; but do we | 37 // TODO(vtl): We definitely want 64 bits for |num_bytes_to_read|; but do we |
| 38 // want it to be signed (this is consistent with |size| values, but | 38 // want it to be signed (this is consistent with |size| values, but |
| 39 // inconsistent with 32-bit |num_bytes_to_read| values)? Do we want to have | 39 // inconsistent with 32-bit |num_bytes_to_read| values)? Do we want to have |
| 40 // separate "read to end" versus "tail" (i.e., keep on reading as more data is | 40 // separate "read to end" versus "tail" (i.e., keep on reading as more data is |
| 41 // appended) modes, and how would those be signaled? | 41 // appended) modes, and how would those be signaled? |
| 42 ReadToStream(handle<data_pipe_producer> source, | 42 ReadToStream(handle<data_pipe_producer> source, |
| 43 int64 offset, | 43 int64 offset, |
| 44 Whence whence, | 44 Whence whence, |
| 45 int64 num_bytes_to_read) => (Error error); | 45 int64 num_bytes_to_read) |
| 46 => (Error error); |
| 46 WriteFromStream(handle<data_pipe_consumer> sink, int64 offset, Whence whence) | 47 WriteFromStream(handle<data_pipe_consumer> sink, int64 offset, Whence whence) |
| 47 => (Error error); | 48 => (Error error); |
| 48 | 49 |
| 49 // Gets the current file position. On success, |position| is the current | 50 // Gets the current file position. On success, |position| is the current |
| 50 // offset (in bytes) from the beginning of the file). | 51 // offset (in bytes) from the beginning of the file). |
| 51 Tell() => (Error error, int64 position); | 52 Tell() => (Error error, int64 position); |
| 52 | 53 |
| 53 // Sets the current file position to that specified by |offset|/|whence|. On | 54 // Sets the current file position to that specified by |offset|/|whence|. On |
| 54 // success, |position| is the offset (in bytes) from the beginning of the | 55 // success, |position| is the offset (in bytes) from the beginning of the |
| 55 // file. | 56 // file. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 83 | 84 |
| 84 // Special-file-specific control function, for device "files". |in| and |out| | 85 // Special-file-specific control function, for device "files". |in| and |out| |
| 85 // are dependent on |request|. See ioctl.mojom for the master list of request | 86 // are dependent on |request|. See ioctl.mojom for the master list of request |
| 86 // values. | 87 // values. |
| 87 Ioctl(uint32 request, array<uint32>? in_values) | 88 Ioctl(uint32 request, array<uint32>? in_values) |
| 88 => (Error error, array<uint32>? out_values); | 89 => (Error error, array<uint32>? out_values); |
| 89 | 90 |
| 90 // TODO(vtl): Add a "watch"? | 91 // TODO(vtl): Add a "watch"? |
| 91 // TODO(vtl): Add something analogous to fsync(2)? | 92 // TODO(vtl): Add something analogous to fsync(2)? |
| 92 }; | 93 }; |
| OLD | NEW |