Lines Matching defs:deviceName

357 std::string UsbService::GetDeviceVidPidSerialNumber(std::string deviceName)
363 if (it->first == deviceName) {
373 int32_t UsbService::GetDeviceVidPidSerialNumber(std::string deviceName, std::string& strDesc)
379 if (it->first == deviceName) {
402 bool UsbService::HasRight(std::string deviceName)
411 if (GetDeviceVidPidSerialNumber(deviceName, deviceVidPidSerialNum) != UEC_OK) {
412 USB_HILOGE(MODULE_USB_SERVICE, "can not find deviceName.");
417 USB_HILOGW(MODULE_USB_SERVICE, "system app, bypass: dev=%{public}s", deviceName.c_str());
429 USB_HILOGI(MODULE_USB_SERVICE, "bundle=%{public}s, device=%{public}s", bundleName.c_str(), deviceName.c_str());
439 int32_t UsbService::RequestRight(std::string deviceName)
447 int32_t ret = GetDeviceVidPidSerialNumber(deviceName, deviceVidPidSerialNum);
449 USB_HILOGE(MODULE_USB_SERVICE, "can not find deviceName.");
453 USB_HILOGW(MODULE_USB_SERVICE, "system app, bypass: dev=%{public}s", deviceName.c_str());
464 USB_HILOGI(MODULE_USB_SERVICE, "bundle=%{public}s, device=%{public}s", bundleName.c_str(), deviceName.c_str());
465 return usbRightManager_->RequestRight(deviceName, deviceVidPidSerialNum, bundleName, tokenId, userId);
470 int32_t UsbService::RemoveRight(std::string deviceName)
477 int32_t ret = GetDeviceVidPidSerialNumber(deviceName, deviceVidPidSerialNum);
479 USB_HILOGE(MODULE_USB_SERVICE, "can not find deviceName.");
483 USB_HILOGW(MODULE_USB_SERVICE, "system app, bypass: dev=%{public}s", deviceName.c_str());
1899 int32_t UsbService::AddRight(const std::string &bundleName, const std::string &deviceName)
1906 int32_t ret = GetDeviceVidPidSerialNumber(deviceName, deviceVidPidSerialNum);
1908 USB_HILOGE(MODULE_USB_SERVICE, "can not find deviceName.");
1920 USB_HILOGI(MODULE_USB_SERVICE, "AddRight bundleName = %{public}s, deviceName = %{public}s", bundleName.c_str(),
1921 deviceName.c_str());
1933 int32_t UsbService::AddAccessRight(const std::string &tokenId, const std::string &deviceName)
1940 int32_t ret = GetDeviceVidPidSerialNumber(deviceName, deviceVidPidSerialNum);
1942 USB_HILOGE(MODULE_USB_SERVICE, "can not find deviceName.");
1948 USB_HILOGI(MODULE_USB_SERVICE, "AddRight deviceName = %{public}s", deviceName.c_str());
2400 bool UsbService::GetDeviceProductName(const std::string &deviceName, std::string &productName)
2406 return usbHostManager_->GetProductName(deviceName, productName);