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_DIRECTORY_H_ | 5 #ifndef BIN_DIRECTORY_H_ |
6 #define BIN_DIRECTORY_H_ | 6 #define BIN_DIRECTORY_H_ |
7 | 7 |
8 #include "bin/builtin.h" | 8 #include "bin/builtin.h" |
9 #include "bin/dartutils.h" | 9 #include "bin/dartutils.h" |
10 #include "platform/globals.h" | 10 #include "platform/globals.h" |
| 11 #include "platform/thread.h" |
11 | 12 |
12 class DirectoryListing { | 13 class DirectoryListing { |
13 public: | 14 public: |
14 enum Response { | 15 enum Response { |
15 kListDirectory = 0, | 16 kListDirectory = 0, |
16 kListFile = 1, | 17 kListFile = 1, |
17 kListError = 2, | 18 kListError = 2, |
18 kListDone = 3 | 19 kListDone = 3 |
19 }; | 20 }; |
20 | 21 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 57 |
57 static bool Create(const char* path); | 58 static bool Create(const char* path); |
58 | 59 |
59 static int CreateTemp(const char* const_template, | 60 static int CreateTemp(const char* const_template, |
60 char** path, | 61 char** path, |
61 char* os_error_message, | 62 char* os_error_message, |
62 int os_error_message_len); | 63 int os_error_message_len); |
63 | 64 |
64 static bool Delete(const char* path, bool recursive); | 65 static bool Delete(const char* path, bool recursive); |
65 | 66 |
| 67 static Dart_Port GetServicePort(); |
| 68 |
| 69 private: |
| 70 static dart::Mutex mutex_; |
| 71 static int service_ports_size_; |
| 72 static Dart_Port* service_ports_; |
| 73 static int service_ports_index_; |
| 74 |
66 DISALLOW_ALLOCATION(); | 75 DISALLOW_ALLOCATION(); |
67 DISALLOW_IMPLICIT_CONSTRUCTORS(Directory); | 76 DISALLOW_IMPLICIT_CONSTRUCTORS(Directory); |
68 }; | 77 }; |
69 | 78 |
70 | 79 |
71 #endif // BIN_DIRECTORY_H_ | 80 #endif // BIN_DIRECTORY_H_ |
OLD | NEW |