Lines Matching defs:Event
88 std::queue<DirectoryWatcher::Event> Events;
91 void push_back(const DirectoryWatcher::Event::EventKind K,
102 DirectoryWatcher::Event pop_front_blocking() {
108 DirectoryWatcher::Event Front = Events.front();
121 std::function<void(llvm::ArrayRef<Event>, bool)> Receiver,
144 std::function<void(llvm::ArrayRef<Event>, bool)> Receiver;
170 Queue.push_back(DirectoryWatcher::Event::EventKind::WatcherGotInvalidated,
247 struct inotify_event *Event = reinterpret_cast<struct inotify_event *>(P);
248 P += sizeof(struct inotify_event) + Event->len;
250 if (Event->mask & (IN_CREATE | IN_MODIFY | IN_MOVED_TO | IN_DELETE) &&
251 Event->len <= 0) {
257 if (Event->mask & (IN_CREATE | IN_MOVED_TO | IN_MODIFY)) {
258 Queue.push_back(DirectoryWatcher::Event::EventKind::Modified,
259 Event->name);
260 } else if (Event->mask & (IN_DELETE | IN_MOVED_FROM)) {
261 Queue.push_back(DirectoryWatcher::Event::EventKind::Removed,
262 Event->name);
263 } else if (Event->mask & (IN_DELETE_SELF | IN_MOVE_SELF)) {
264 Queue.push_back(DirectoryWatcher::Event::EventKind::WatchedDirRemoved,
268 } else if (Event->mask & IN_IGNORED) {
287 DirectoryWatcher::Event Event = this->Queue.pop_front_blocking();
288 this->Receiver(Event, false);
289 if (Event.Kind ==
290 DirectoryWatcher::Event::EventKind::WatcherGotInvalidated) {
299 std::function<void(llvm::ArrayRef<Event>, bool)> Receiver,
327 std::function<void(llvm::ArrayRef<DirectoryWatcher::Event>, bool)> Receiver,