Home
last modified time | relevance | path

Searched refs:devicePath (Results 1 - 7 of 7) sorted by relevance

/foundation/distributedhardware/distributed_input/utils/src/
H A Ddinput_utils_tool.cpp302 int OpenInputDeviceFdByPath(const std::string &devicePath) in OpenInputDeviceFdByPath() argument
304 chmod(devicePath.c_str(), S_IWRITE | S_IREAD); in OpenInputDeviceFdByPath()
306 if (devicePath.length() == 0 || devicePath.length() >= PATH_MAX || in OpenInputDeviceFdByPath()
307 realpath(devicePath.c_str(), canonicalDevicePath) == nullptr) { in OpenInputDeviceFdByPath()
308 DHLOGE("path check fail, error path: %{public}s", devicePath.c_str()); in OpenInputDeviceFdByPath()
313 DHLOGI("path: %{public}s is a dir.", devicePath.c_str()); in OpenInputDeviceFdByPath()
322 DHLOGE("could not open the path: %{public}s, errno: %{public}s; retry: %{public}d", devicePath.c_str(), in OpenInputDeviceFdByPath()
326 DHLOGE("could not open the path: %{public}s, errno: %{public}s.", devicePath.c_str(), ConvertErrNo().c_str()); in OpenInputDeviceFdByPath()
/foundation/distributedhardware/distributed_input/services/source/inputinject/src/
H A Ddistributed_input_node_manager.cpp283 void DistributedInputNodeManager::SetPathForVirDev(const DhUniqueID &dhUniqueId, const std::string &devicePath) in SetPathForVirDev() argument
291 DHLOGD("Found the virtual device, set path :%{public}s", devicePath.c_str()); in SetPathForVirDev()
292 iter->second->SetPath(devicePath); in SetPathForVirDev()
299 bool DistributedInputNodeManager::MatchAndSavePhysicalPath(const std::string &devicePath, in MatchAndSavePhysicalPath() argument
302 DHLOGI("Opening input device path: %{public}s", devicePath.c_str()); in MatchAndSavePhysicalPath()
305 int fd = OpenInputDeviceFdByPath(devicePath); in MatchAndSavePhysicalPath()
307 DHLOGE("The fd open failed, devicePath %{public}s.", devicePath.c_str()); in MatchAndSavePhysicalPath()
311 DHLOGE("The dev not virtual, devicePath %{public}s.", devicePath in MatchAndSavePhysicalPath()
[all...]
/foundation/distributedhardware/distributed_input/common/include/
H A Dinput_hub.h121 int32_t OpenInputDeviceLocked(const std::string &devicePath);
151 void CloseDeviceByPathLocked(const std::string &devicePath);
154 Device* GetDeviceByPathLocked(const std::string &devicePath);
157 bool IsDeviceRegistered(const std::string &devicePath);
177 void RecordDeviceLog(const std::string &devicePath, const InputDevice &identifier);
H A Dinput_hub.cpp533 bool InputHub::IsDeviceRegistered(const std::string &devicePath) in IsDeviceRegistered() argument
537 if (device->path == devicePath) { in IsDeviceRegistered()
545 int32_t InputHub::OpenInputDeviceLocked(const std::string &devicePath) in OpenInputDeviceLocked() argument
547 if (IsDeviceRegistered(devicePath)) { in OpenInputDeviceLocked()
552 DHLOGD("Opening device start: %{public}s", devicePath.c_str()); in OpenInputDeviceLocked()
553 int fd = OpenInputDeviceFdByPath(devicePath); in OpenInputDeviceLocked()
555 DHLOGE("The fd open failed, devicePath %{public}s.", devicePath.c_str()); in OpenInputDeviceLocked()
560 std::unique_ptr<Device> device = std::make_unique<Device>(fd, devicePath); in OpenInputDeviceLocked()
568 RecordDeviceLog(devicePath, devic in OpenInputDeviceLocked()
1123 CloseDeviceByPathLocked(const std::string &devicePath) CloseDeviceByPathLocked() argument
1142 GetDeviceByPathLocked(const std::string &devicePath) GetDeviceByPathLocked() argument
1365 RecordDeviceLog(const std::string &devicePath, const InputDevice &identifier) RecordDeviceLog() argument
[all...]
/foundation/distributedhardware/distributed_input/services/source/inputinject/include/
H A Ddistributed_input_node_manager.h111 bool MatchAndSavePhysicalPath(const std::string &devicePath, const std::string &devId, const std::string &dhId);
114 void SetPathForVirDev(const DhUniqueID &dhUniqueId, const std::string &devicePath);
/foundation/distributedhardware/distributed_input/utils/include/
H A Ddinput_utils_tool.h57 int OpenInputDeviceFdByPath(const std::string &devicePath);
/foundation/distributedhardware/distributed_input/services/source/inputinject/test/sourceinjectunittest/
H A Ddistributed_input_sourceinject_test.cpp450 std::string devicePath = ""; in HWTEST_F() local
454 DistributedInputInject::GetInstance().inputNodeManager_->MatchAndSavePhysicalPath(devicePath, devId, dhId); in HWTEST_F()

Completed in 6 milliseconds