| 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_IO_SERVICE_H_ | 5 #ifndef BIN_IO_SERVICE_H_ |
| 6 #define BIN_IO_SERVICE_H_ | 6 #define BIN_IO_SERVICE_H_ |
| 7 | 7 |
| 8 #include "bin/builtin.h" | 8 #include "bin/builtin.h" |
| 9 #include "bin/utils.h" | 9 #include "bin/utils.h" |
| 10 | 10 |
| 11 | 11 |
| 12 namespace dart { | 12 namespace dart { |
| 13 namespace bin { | 13 namespace bin { |
| 14 | 14 |
| 15 // This list must be kept in sync with the list in sdk/lib/io/io_service.dart |
| 15 #define IO_SERVICE_REQUEST_LIST(V) \ | 16 #define IO_SERVICE_REQUEST_LIST(V) \ |
| 16 V(File, Exists, 0) \ | 17 V(File, Exists, 0) \ |
| 17 V(File, Create, 1) \ | 18 V(File, Create, 1) \ |
| 18 V(File, Delete, 2) \ | 19 V(File, Delete, 2) \ |
| 19 V(File, Rename, 3) \ | 20 V(File, Rename, 3) \ |
| 20 V(File, Open, 4) \ | 21 V(File, Open, 4) \ |
| 21 V(File, ResolveSymbolicLinks, 5) \ | 22 V(File, ResolveSymbolicLinks, 5) \ |
| 22 V(File, Close, 6) \ | 23 V(File, Close, 6) \ |
| 23 V(File, Position, 7) \ | 24 V(File, Position, 7) \ |
| 24 V(File, SetPosition, 8) \ | 25 V(File, SetPosition, 8) \ |
| (...skipping 14 matching lines...) Expand all Loading... |
| 39 V(File, Type, 23) \ | 40 V(File, Type, 23) \ |
| 40 V(File, Identical, 24) \ | 41 V(File, Identical, 24) \ |
| 41 V(File, Stat, 25) \ | 42 V(File, Stat, 25) \ |
| 42 V(Socket, Lookup, 26) \ | 43 V(Socket, Lookup, 26) \ |
| 43 V(Socket, ListInterfaces, 27) \ | 44 V(Socket, ListInterfaces, 27) \ |
| 44 V(Socket, ReverseLookup, 28) \ | 45 V(Socket, ReverseLookup, 28) \ |
| 45 V(Directory, Create, 29) \ | 46 V(Directory, Create, 29) \ |
| 46 V(Directory, Delete, 30) \ | 47 V(Directory, Delete, 30) \ |
| 47 V(Directory, Exists, 31) \ | 48 V(Directory, Exists, 31) \ |
| 48 V(Directory, CreateTemp, 32) \ | 49 V(Directory, CreateTemp, 32) \ |
| 49 V(Directory, ListStart, 33) \ | 50 V(Directory, CreateSystemTemp, 33) \ |
| 50 V(Directory, ListNext, 34) \ | 51 V(Directory, ListStart, 34) \ |
| 51 V(Directory, ListStop, 35) \ | 52 V(Directory, ListNext, 35) \ |
| 52 V(Directory, Rename, 36) \ | 53 V(Directory, ListStop, 36) \ |
| 53 V(SSLFilter, ProcessFilter, 37) | 54 V(Directory, Rename, 37) \ |
| 55 V(SSLFilter, ProcessFilter, 38) |
| 54 | 56 |
| 55 #define DECLARE_REQUEST(type, method, id) \ | 57 #define DECLARE_REQUEST(type, method, id) \ |
| 56 k##type##method##Request = id, | 58 k##type##method##Request = id, |
| 57 | 59 |
| 58 class IOService { | 60 class IOService { |
| 59 public: | 61 public: |
| 60 enum { | 62 enum { |
| 61 IO_SERVICE_REQUEST_LIST(DECLARE_REQUEST) | 63 IO_SERVICE_REQUEST_LIST(DECLARE_REQUEST) |
| 62 }; | 64 }; |
| 63 | 65 |
| 64 static Dart_Port GetServicePort(); | 66 static Dart_Port GetServicePort(); |
| 65 }; | 67 }; |
| 66 | 68 |
| 67 } // namespace bin | 69 } // namespace bin |
| 68 } // namespace dart | 70 } // namespace dart |
| 69 | 71 |
| 70 #endif // BIN_IO_SERVICE_H_ | 72 #endif // BIN_IO_SERVICE_H_ |
| 71 | |
| OLD | NEW |