| 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 19 matching lines...) Expand all Loading... |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 struct Event { | 32 struct Event { |
| 33 intptr_t path_id; | 33 intptr_t path_id; |
| 34 int event; | 34 int event; |
| 35 const char* filename; | 35 const char* filename; |
| 36 int link; | 36 int link; |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 static bool IsSupported(); | 39 static bool IsSupported(); |
| 40 static intptr_t WatchPath(const char* path, int events, bool recursive); | 40 static intptr_t Init(); |
| 41 static void UnwatchPath(intptr_t id); | 41 static void Close(intptr_t id); |
| 42 static intptr_t GetSocketId(intptr_t id); | 42 static intptr_t WatchPath(intptr_t id, |
| 43 static Dart_Handle ReadEvents(intptr_t id); | 43 const char* path, |
| 44 int events, |
| 45 bool recursive); |
| 46 static void UnwatchPath(intptr_t id, intptr_t path_id); |
| 47 static intptr_t GetSocketId(intptr_t id, intptr_t path_id); |
| 48 static Dart_Handle ReadEvents(intptr_t id, intptr_t path_id); |
| 44 | 49 |
| 45 private: | 50 private: |
| 46 DISALLOW_COPY_AND_ASSIGN(FileSystemWatcher); | 51 DISALLOW_COPY_AND_ASSIGN(FileSystemWatcher); |
| 47 }; | 52 }; |
| 48 | 53 |
| 49 } // namespace bin | 54 } // namespace bin |
| 50 } // namespace dart | 55 } // namespace dart |
| 51 | 56 |
| 52 #endif // BIN_FILE_SYSTEM_WATCHER_H_ | 57 #endif // BIN_FILE_SYSTEM_WATCHER_H_ |
| 53 | 58 |
| OLD | NEW |