Lines Matching refs:monitorFfs
116 MonitorFfs *monitorFfs = (MonitorFfs *)param; in startMonitorFd() local
123 for (int i = 0; i < static_cast<int>(monitorFfs->mEndpointList.size()); i++) { in startMonitorFd()
124 if (access(monitorFfs->mEndpointList.at(i).c_str(), R_OK)) { in startMonitorFd()
133 if (!!WriteStringToFile(monitorFfs->mGadgetName, PULLUP_PATH)) { in startMonitorFd()
134 lock_guard<mutex> lock(monitorFfs->mLock); in startMonitorFd()
135 monitorFfs->mCurrentUsbFunctionsApplied = true; in startMonitorFd()
136 monitorFfs->mCallback(monitorFfs->mCurrentUsbFunctionsApplied, monitorFfs->mPayload); in startMonitorFd()
140 monitorFfs->mCv.notify_all(); in startMonitorFd()
145 int nrEvents = epoll_wait(monitorFfs->mEpollFd, events, kEpollEvents, -1); in startMonitorFd()
155 if (events[i].data.fd == monitorFfs->mInotifyFd) { in startMonitorFd()
157 int numRead = read(monitorFfs->mInotifyFd, buf, kBufferSize); in startMonitorFd()
166 for (int j = 0; j < static_cast<int>(monitorFfs->mEndpointList.size()); j++) { in startMonitorFd()
167 if (access(monitorFfs->mEndpointList.at(j).c_str(), R_OK)) { in startMonitorFd()
169 ALOGI("%s absent", monitorFfs->mEndpointList.at(j).c_str()); in startMonitorFd()
187 if (!!WriteStringToFile(monitorFfs->mGadgetName, PULLUP_PATH)) { in startMonitorFd()
188 lock_guard<mutex> lock(monitorFfs->mLock); in startMonitorFd()
189 monitorFfs->mCurrentUsbFunctionsApplied = true; in startMonitorFd()
190 monitorFfs->mCallback(monitorFfs->mCurrentUsbFunctionsApplied, in startMonitorFd()
191 monitorFfs->mPayload); in startMonitorFd()
196 monitorFfs->mCv.notify_all(); in startMonitorFd()
202 read(monitorFfs->mEventFd, &flag, sizeof(flag)); in startMonitorFd()