| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 <stdio.h> | 8 #include <stdio.h> |
| 9 #include <stdlib.h> | 9 #include <stdlib.h> |
| 10 #include <string.h> | 10 #include <string.h> |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 kSize = 5, | 74 kSize = 5, |
| 75 kStatSize = 6 | 75 kStatSize = 6 |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 enum LockType { | 78 enum LockType { |
| 79 // These match the constants in FileStat in file_impl.dart. | 79 // These match the constants in FileStat in file_impl.dart. |
| 80 kLockMin = 0, | 80 kLockMin = 0, |
| 81 kLockUnlock = 0, | 81 kLockUnlock = 0, |
| 82 kLockShared = 1, | 82 kLockShared = 1, |
| 83 kLockExclusive = 2, | 83 kLockExclusive = 2, |
| 84 kLockMax = 2 | 84 kLockBlockingShared = 3, |
| 85 kLockBlockingExclusive = 4, |
| 86 kLockMax = 4 |
| 85 }; | 87 }; |
| 86 | 88 |
| 87 intptr_t GetFD(); | 89 intptr_t GetFD(); |
| 88 | 90 |
| 89 void* MapExecutable(intptr_t* num_bytes); | 91 void* MapExecutable(intptr_t* num_bytes); |
| 90 | 92 |
| 91 // Read/Write attempt to transfer num_bytes to/from buffer. It returns | 93 // Read/Write attempt to transfer num_bytes to/from buffer. It returns |
| 92 // the number of bytes read/written. | 94 // the number of bytes read/written. |
| 93 int64_t Read(void* buffer, int64_t num_bytes); | 95 int64_t Read(void* buffer, int64_t num_bytes); |
| 94 int64_t Write(const void* buffer, int64_t num_bytes); | 96 int64_t Write(const void* buffer, int64_t num_bytes); |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 Dart_WeakPersistentHandle weak_handle_; | 234 Dart_WeakPersistentHandle weak_handle_; |
| 233 | 235 |
| 234 friend class ReferenceCounted<File>; | 236 friend class ReferenceCounted<File>; |
| 235 DISALLOW_COPY_AND_ASSIGN(File); | 237 DISALLOW_COPY_AND_ASSIGN(File); |
| 236 }; | 238 }; |
| 237 | 239 |
| 238 } // namespace bin | 240 } // namespace bin |
| 239 } // namespace dart | 241 } // namespace dart |
| 240 | 242 |
| 241 #endif // BIN_FILE_H_ | 243 #endif // BIN_FILE_H_ |
| OLD | NEW |