/base/hiviewdfx/hiview/test/plugins/examples_bundle/bundle_event_source_example/ |
H A D | bundle_event_source_example.cpp | 34 BundleEventSourceExample::BundleEventSourceExample() : inotifyFd_(0) in BundleEventSourceExample() 85 printf("BundleEventSourceExample::OnEvent fd:%d, type:%d, inotifyFd_:%d.\n", fd, type, inotifyFd_); in OnFileDescriptorEvent() 90 if (inotifyFd_ < 0) { in OnFileDescriptorEvent() 91 printf("BundleEventSourceExample Invalid inotify fd:%d", inotifyFd_); in OnFileDescriptorEvent() 95 int len = read(inotifyFd_, buffer, bufSize); in OnFileDescriptorEvent() 137 if (inotifyFd_ > 0) { in GetPollFd() 138 return inotifyFd_; in GetPollFd() 141 inotifyFd_ = inotify_init(); in GetPollFd() 142 if (inotifyFd_ in GetPollFd() [all...] |
H A D | bundle_event_source_example.h | 85 int inotifyFd_; member in OHOS::HiviewDFX::BundleEventSourceExample
|
/base/msdp/device_status/intention/services/device_manager/src/ |
H A D | monitor.cpp | 75 int32_t ret = inotify_rm_watch(inotifyFd_, devWd_); in Disable() 81 if (inotifyFd_ >= 0) { in Disable() 82 if (close(inotifyFd_) < 0) { in Disable() 83 FI_HILOGE("close inotify fd failed, error:%{public}s, inotifyFd_:%{public}d", strerror(errno), inotifyFd_); in Disable() 85 inotifyFd_ = -1; in Disable() 92 inotifyFd_ = inotify_init1(IN_NONBLOCK | IN_CLOEXEC); in OpenConnection() 93 if (inotifyFd_ < 0) { in OpenConnection() 103 devWd_ = inotify_add_watch(inotifyFd_, DEV_INPUT_PATH.c_str(), IN_CREATE | IN_DELETE); in EnableReceiving() 120 numRead = ::read(inotifyFd_, bu in ReceiveDevice() [all...] |
/base/hiviewdfx/hiview/test/plugins/examples/event_source_example/ |
H A D | event_source_example.cpp | 34 EventSourceExample::EventSourceExample() : inotifyFd_(0) in EventSourceExample() 89 printf("EventSourceExample::OnEvent fd:%d, type:%d, inotifyFd_:%d.\n", fd, type, inotifyFd_); in OnFileDescriptorEvent() 94 if (inotifyFd_ < 0) { in OnFileDescriptorEvent() 95 printf("EventSourceExample Invalid inotify fd:%d", inotifyFd_); in OnFileDescriptorEvent() 99 int len = read(inotifyFd_, buffer, bufSize); in OnFileDescriptorEvent() 141 if (inotifyFd_ > 0) { in GetPollFd() 142 return inotifyFd_; in GetPollFd() 145 inotifyFd_ = inotify_init(); in GetPollFd() 146 if (inotifyFd_ in GetPollFd() [all...] |
H A D | event_source_example.h | 84 int inotifyFd_; member in OHOS::HiviewDFX::EventSourceExample
|
/base/hiviewdfx/hiappevent/frameworks/native/libhiappevent/observer/ |
H A D | os_event_listener.cpp | 69 if (inotifyFd_ != -1) { in ~OsEventListener() 70 (void)inotify_rm_watch(inotifyFd_, inotifyWd_); in ~OsEventListener() 71 close(inotifyFd_); in ~OsEventListener() 72 inotifyFd_ = -1; in ~OsEventListener() 158 if (inotifyFd_ < 0) { in RegisterDirListener() 159 inotifyFd_ = inotify_init(); in RegisterDirListener() 160 if (inotifyFd_ < 0) { in RegisterDirListener() 164 inotifyWd_ = inotify_add_watch(inotifyFd_, dirPath.c_str(), IN_MOVED_TO | IN_CLOSE_WRITE); in RegisterDirListener() 167 close(inotifyFd_); in RegisterDirListener() 168 inotifyFd_ in RegisterDirListener() [all...] |
/base/msdp/device_status/test/unittest/intention/common/src/ |
H A D | epoll_manager_test.cpp | 48 inotifyFd_ = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK); in MonitorEvent() 49 if (inotifyFd_ < 0) { in MonitorEvent() 56 if (inotifyFd_ < 0) { in ~MonitorEvent() 60 if (close(inotifyFd_) < 0) { in ~MonitorEvent() 61 FI_HILOGE("Close timer fd failed, error:%{public}s, timerFd_:%{public}d", strerror(errno), inotifyFd_); in ~MonitorEvent() 63 inotifyFd_ = -1; in ~MonitorEvent() 69 if (inotifyFd_ < 0) { in Dispatch() 70 FI_HILOGE("inotifyFd_ is invalid."); in Dispatch() 75 int32_t ret = read(inotifyFd_, buf, sizeof(buf)); in Dispatch() 88 if (inotifyFd_ < in SetTimer() [all...] |
/base/msdp/device_status/test/unittest/intention/common/include/ |
H A D | epoll_manager_test.h | 41 int32_t inotifyFd_ { -1 }; 46 return inotifyFd_; in GetFd()
|
/base/msdp/device_status/intention/services/device_manager/include/ |
H A D | monitor.h | 54 int32_t inotifyFd_ { -1 }; 61 return inotifyFd_; in GetFd()
|
/base/hiviewdfx/hiview/base/test/unittest/common/ |
H A D | event_loop_test.cpp | 96 printf("DataFileEventReader::OnEvent id:%d inotifyFd_:%d\n", fd, inotifyFd_); in OnFileDescriptorEvent() 101 if (inotifyFd_ <= 0) { in OnFileDescriptorEvent() 102 printf("Invalid inotify fd:%d", inotifyFd_); in OnFileDescriptorEvent() 106 int len = read(inotifyFd_, buffer, bufSize); in OnFileDescriptorEvent() 133 if (inotifyFd_ > 0) { in GetPollFd() 134 return inotifyFd_; in GetPollFd() 137 inotifyFd_ = inotify_init(); in GetPollFd() 138 if (inotifyFd_ == -1) { in GetPollFd() 149 int wd = inotify_add_watch(inotifyFd_, EVENT_LOG_PAT in GetPollFd() [all...] |
H A D | event_loop_test.h | 52 int inotifyFd_;
member in OHOS::HiviewDFX::DataFileEventReader
|
/base/account/os_account/services/accountmgr/src/ |
H A D | account_file_watcher_manager.cpp | 230 inotifyFd_ = inotify_init(); in AccountFileWatcherMgr() 231 if (inotifyFd_ < 0) { in AccountFileWatcherMgr() 253 while (((len = read(inotifyFd_, &buf, sizeof(buf))) < 0) && (errno == EINTR)) {}; in DealWithFileEvent() 272 FD_SET(inotifyFd_, &fds_); in GetNotifyEvent() 274 if (inotifyFd_ < 0) { in GetNotifyEvent() 278 if (select(inotifyFd_ + 1, &fds_, nullptr, nullptr, nullptr) <= 0) { in GetNotifyEvent() 305 if (inotifyFd_ < 0) { in AddFileWatcher() 306 inotifyFd_ = inotify_init(); in AddFileWatcher() 307 if (inotifyFd_ < 0) { in AddFileWatcher() 322 if (!fileWatcher->StartNotify(inotifyFd_, IN_MODIF in AddFileWatcher() [all...] |
/base/hiviewdfx/hiappevent/frameworks/native/libhiappevent/observer/include/ |
H A D | os_event_listener.h | 48 int inotifyFd_ = -1; member in OHOS::HiviewDFX::OsEventListener
|
/base/account/os_account/services/accountmgr/include/ |
H A D | account_file_watcher_manager.h | 75 int32_t inotifyFd_ = -1; member in OHOS::AccountSA::AccountFileWatcherMgr
|