| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BIN_FILE_H_ | 5 #ifndef BIN_FILE_H_ |
| 6 #define BIN_FILE_H_ | 6 #define BIN_FILE_H_ |
| 7 | 7 |
| 8 #include <stdlib.h> | 8 #include <stdlib.h> |
| 9 #include <string.h> | 9 #include <string.h> |
| 10 #include <stdio.h> | 10 #include <stdio.h> |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 kCloseRequest = 6, | 53 kCloseRequest = 6, |
| 54 kPositionRequest = 7, | 54 kPositionRequest = 7, |
| 55 kSetPositionRequest = 8, | 55 kSetPositionRequest = 8, |
| 56 kTruncateRequest = 9, | 56 kTruncateRequest = 9, |
| 57 kLengthRequest = 10, | 57 kLengthRequest = 10, |
| 58 kLengthFromNameRequest = 11, | 58 kLengthFromNameRequest = 11, |
| 59 kLastModifiedRequest = 12, | 59 kLastModifiedRequest = 12, |
| 60 kFlushRequest = 13, | 60 kFlushRequest = 13, |
| 61 kReadByteRequest = 14, | 61 kReadByteRequest = 14, |
| 62 kWriteByteRequest = 15, | 62 kWriteByteRequest = 15, |
| 63 kReadListRequest = 16, | 63 kReadRequest = 16, |
| 64 kWriteListRequest = 17 | 64 kReadListRequest = 17, |
| 65 kWriteListRequest = 18 |
| 65 }; | 66 }; |
| 66 | 67 |
| 67 ~File(); | 68 ~File(); |
| 68 | 69 |
| 69 // Read/Write attempt to transfer num_bytes to/from buffer. It returns | 70 // Read/Write attempt to transfer num_bytes to/from buffer. It returns |
| 70 // the number of bytes read/written. | 71 // the number of bytes read/written. |
| 71 int64_t Read(void* buffer, int64_t num_bytes); | 72 int64_t Read(void* buffer, int64_t num_bytes); |
| 72 int64_t Write(const void* buffer, int64_t num_bytes); | 73 int64_t Write(const void* buffer, int64_t num_bytes); |
| 73 | 74 |
| 74 // ReadFully and WriteFully do attempt to transfer num_bytes to/from | 75 // ReadFully and WriteFully do attempt to transfer num_bytes to/from |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 | 140 |
| 140 static dart::Mutex mutex_; | 141 static dart::Mutex mutex_; |
| 141 static int service_ports_size_; | 142 static int service_ports_size_; |
| 142 static Dart_Port* service_ports_; | 143 static Dart_Port* service_ports_; |
| 143 static int service_ports_index_; | 144 static int service_ports_index_; |
| 144 | 145 |
| 145 DISALLOW_COPY_AND_ASSIGN(File); | 146 DISALLOW_COPY_AND_ASSIGN(File); |
| 146 }; | 147 }; |
| 147 | 148 |
| 148 #endif // BIN_FILE_H_ | 149 #endif // BIN_FILE_H_ |
| OLD | NEW |