| 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_SYSTEM_WATCHER_H_ | 5 #ifndef BIN_FILE_SYSTEM_WATCHER_H_ |
| 6 #define BIN_FILE_SYSTEM_WATCHER_H_ | 6 #define BIN_FILE_SYSTEM_WATCHER_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 16 matching lines...) Expand all Loading... |
| 27 kModefyAttribute = 1 << 4 | 27 kModefyAttribute = 1 << 4 |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 struct Event { | 30 struct Event { |
| 31 intptr_t path_id; | 31 intptr_t path_id; |
| 32 int event; | 32 int event; |
| 33 const char* filename; | 33 const char* filename; |
| 34 int link; | 34 int link; |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 static bool IsSupported(); |
| 37 static intptr_t WatchPath(const char* path, int events, bool recursive); | 38 static intptr_t WatchPath(const char* path, int events, bool recursive); |
| 38 static void UnwatchPath(intptr_t id); | 39 static void UnwatchPath(intptr_t id); |
| 39 static intptr_t GetSocketId(intptr_t id); | 40 static intptr_t GetSocketId(intptr_t id); |
| 40 static Dart_Handle ReadEvents(intptr_t id); | 41 static Dart_Handle ReadEvents(intptr_t id); |
| 41 | 42 |
| 42 private: | 43 private: |
| 43 DISALLOW_COPY_AND_ASSIGN(FileSystemWatcher); | 44 DISALLOW_COPY_AND_ASSIGN(FileSystemWatcher); |
| 44 }; | 45 }; |
| 45 | 46 |
| 46 } // namespace bin | 47 } // namespace bin |
| 47 } // namespace dart | 48 } // namespace dart |
| 48 | 49 |
| 49 #endif // BIN_FILE_SYSTEM_WATCHER_H_ | 50 #endif // BIN_FILE_SYSTEM_WATCHER_H_ |
| 50 | 51 |
| OLD | NEW |