Lines Matching refs:fd_
177 EventDev::EventDev() : fd_(-1), path_("") {} in EventDev()
178 EventDev::EventDev(const std::string& path) : fd_(-1), path_(path) {} in EventDev()
179 EventDev::EventDev(EventDev&& other) : fd_(other.fd_), path_(std::move(other.path_)) { in EventDev()
180 other.fd_ = -1; in EventDev()
184 fd_ = other.fd_; in operator =()
186 other.fd_ = -1; in operator =()
190 if (fd_ >= 0) { in grab()
193 fd_ = TEMP_FAILURE_RETRY(open(path_.c_str(), O_RDWR | O_NONBLOCK)); in grab()
194 if (fd_ < 0) { in grab()
198 int error = ioctl(fd_, EVIOCGRAB, 1); in grab()
202 close(fd_); in grab()
203 fd_ = -1; in grab()
210 if (fd_ < 0) { in ungrab()
213 int error = ioctl(fd_, EVIOCGRAB, 0); in ungrab()
217 close(fd_); in ungrab()
218 fd_ = -1; in ungrab()
224 rc = TEMP_FAILURE_RETRY(read(fd_, &std::get<1>(result), sizeof std::get<1>(result))); in readEvent()
230 return fd_; in fd()