| 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 #if defined(_WIN32) | 8 #if defined(_WIN32) |
| 9 typedef signed __int64 int64_t; | 9 typedef signed __int64 int64_t; |
| 10 typedef unsigned __int8 uint8_t; | 10 typedef unsigned __int8 uint8_t; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 kPositionRequest = 7, | 61 kPositionRequest = 7, |
| 62 kSetPositionRequest = 8, | 62 kSetPositionRequest = 8, |
| 63 kTruncateRequest = 9, | 63 kTruncateRequest = 9, |
| 64 kLengthRequest = 10, | 64 kLengthRequest = 10, |
| 65 kLengthFromNameRequest = 11, | 65 kLengthFromNameRequest = 11, |
| 66 kLastModifiedRequest = 12, | 66 kLastModifiedRequest = 12, |
| 67 kFlushRequest = 13, | 67 kFlushRequest = 13, |
| 68 kReadByteRequest = 14, | 68 kReadByteRequest = 14, |
| 69 kWriteByteRequest = 15, | 69 kWriteByteRequest = 15, |
| 70 kReadListRequest = 16, | 70 kReadListRequest = 16, |
| 71 kWriteListRequest = 17, | 71 kWriteListRequest = 17 |
| 72 kWriteStringRequest = 18 | |
| 73 }; | 72 }; |
| 74 | 73 |
| 75 ~File(); | 74 ~File(); |
| 76 | 75 |
| 77 // Read/Write attempt to transfer num_bytes to/from buffer. It returns | 76 // Read/Write attempt to transfer num_bytes to/from buffer. It returns |
| 78 // the number of bytes read/written. | 77 // the number of bytes read/written. |
| 79 int64_t Read(void* buffer, int64_t num_bytes); | 78 int64_t Read(void* buffer, int64_t num_bytes); |
| 80 int64_t Write(const void* buffer, int64_t num_bytes); | 79 int64_t Write(const void* buffer, int64_t num_bytes); |
| 81 | 80 |
| 82 // ReadFully and WriteFully do attempt to transfer num_bytes to/from | 81 // ReadFully and WriteFully do attempt to transfer num_bytes to/from |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 | 146 |
| 148 static dart::Mutex mutex_; | 147 static dart::Mutex mutex_; |
| 149 static int service_ports_size_; | 148 static int service_ports_size_; |
| 150 static Dart_Port* service_ports_; | 149 static Dart_Port* service_ports_; |
| 151 static int service_ports_index_; | 150 static int service_ports_index_; |
| 152 | 151 |
| 153 DISALLOW_COPY_AND_ASSIGN(File); | 152 DISALLOW_COPY_AND_ASSIGN(File); |
| 154 }; | 153 }; |
| 155 | 154 |
| 156 #endif // BIN_FILE_H_ | 155 #endif // BIN_FILE_H_ |
| OLD | NEW |