/base/usb/usb_manager/test/native/mock/src/ |
H A D | usb_impl_mock.cpp | 75 int32_t MockUsbImpl::QueryPort(int32_t &portId, int32_t &powerRole, int32_t &dataRole, int32_t &mode) in QueryPort() argument 80 dataRole = UsbSrvSupport::DATA_ROLE_DEVICE; in QueryPort() 98 int32_t MockUsbImpl::SetPortRole(int32_t portId, int32_t powerRole, int32_t dataRole) in SetPortRole() argument 108 if (dataRole <= UsbSrvSupport::DTA_ROLE_NONE || dataRole > UsbSrvSupport::DATA_ROLE_DEVICE) { in SetPortRole() 112 if (powerRole == UsbSrvSupport::POWER_ROLE_SOURCE && dataRole == UsbSrvSupport::DATA_ROLE_HOST) { in SetPortRole() 116 if (powerRole == UsbSrvSupport::POWER_ROLE_SINK && dataRole == UsbSrvSupport::DATA_ROLE_DEVICE) { in SetPortRole() 122 portInfo_.dataRole = dataRole; in SetPortRole()
|
H A D | usb_event_mock_test.cpp | 270 int32_t dataRole = UsbSrvSupport::DATA_ROLE_HOST; in HWTEST_F() local 271 auto ret = mockUsbImpl_->SetPortRole(portId, powerRole, dataRole); in HWTEST_F() 304 int32_t dataRole = UsbSrvSupport::DATA_ROLE_DEVICE; in HWTEST_F() local 305 auto ret = mockUsbImpl_->SetPortRole(portId, powerRole, dataRole); in HWTEST_F()
|
/base/usb/usb_manager/services/native/include/ |
H A D | usb_port_manager.h | 40 void SetPortRoles(int32_t portId, int32_t powerRole, int32_t dataRole); 42 void UpdatePort(int32_t portId, int32_t powerRole, int32_t dataRole, int32_t mode);
|
H A D | usb_service.h | 81 int32_t SetPortRole(int32_t portId, int32_t powerRole, int32_t dataRole) override; 110 void UpdateUsbPort(int32_t portId, int32_t powerRole, int32_t dataRole, int32_t mode);
|
/base/usb/usb_manager/services/native/src/ |
H A D | usb_port_manager.cpp | 122 int32_t dataRole = 0; in QueryPort() local 129 int32_t ret = usbd_->QueryPort(portId, powerRole, dataRole, mode); in QueryPort() 130 USB_HILOGI(MODULE_USB_SERVICE, "portId:%{public}d powerRole:%{public}d dataRole:%{public}d mode:%{public}d ", in QueryPort() 131 portId, powerRole, dataRole, mode); in QueryPort() 139 usbPortStatus.currentDataRole = dataRole; in QueryPort() 148 void UsbPortManager::UpdatePort(int32_t portId, int32_t powerRole, int32_t dataRole, int32_t mode) in UpdatePort() argument 156 it->second.usbPortStatus.currentDataRole, dataRole); in UpdatePort() 158 it->second.usbPortStatus.currentDataRole = dataRole; in UpdatePort()
|
H A D | usb_service_subscriber.cpp | 50 cJSON_AddNumberToObject(portJson, "dataRole", static_cast<double>(info.dataRole)); in PortChangedEvent() 55 pms->UpdateUsbPort(info.portId, info.powerRole, info.dataRole, info.mode); in PortChangedEvent()
|
H A D | usb_service.cpp | 646 int32_t UsbService::SetPortRole(int32_t portId, int32_t powerRole, int32_t dataRole) in SetPortRole() argument 660 auto ret = usbd_->SetPortRole(portId, powerRole, dataRole); in SetPortRole() 1691 void UsbService::UpdateUsbPort(int32_t portId, int32_t powerRole, int32_t dataRole, int32_t mode) in UpdateUsbPort() argument 1698 usbPortManager_->UpdatePort(portId, powerRole, dataRole, mode); in UpdateUsbPort()
|
/base/usb/usb_manager/interfaces/kits/js/napi/include/ |
H A D | usb_async_context.h | 82 int32_t dataRole; member
|
/base/usb/usb_manager/test/native/mock/include/ |
H A D | usb_impl_mock.h | 59 int32_t QueryPort(int32_t &portId, int32_t &powerRole, int32_t &dataRole, int32_t &mode) override; 60 int32_t SetPortRole(int32_t portId, int32_t powerRole, int32_t dataRole) override;
|
/base/usb/usb_manager/interfaces/innerkits/native/include/ |
H A D | usb_srv_client.h | 54 int32_t SetPortRole(int32_t portId, int32_t powerRole, int32_t dataRole);
|
H A D | iusb_srv.h | 42 virtual int32_t SetPortRole(int32_t portId, int32_t powerRole, int32_t dataRole) = 0;
|
/base/usb/usb_manager/services/zidl/include/ |
H A D | usb_server_proxy.h | 48 int32_t SetPortRole(int32_t portId, int32_t powerRole, int32_t dataRole) override;
|
/base/usb/usb_manager/interfaces/innerkits/native/src/ |
H A D | usb_srv_client.cpp | 243 int32_t UsbSrvClient::SetPortRole(int32_t portId, int32_t powerRole, int32_t dataRole) in SetPortRole() argument 247 int32_t ret = proxy_->SetPortRole(portId, powerRole, dataRole); in SetPortRole()
|
/base/usb/usb_manager/interfaces/kits/js/napi/src/ |
H A D | usb_info.cpp | 871 int32_t ret = g_usbClient.SetPortRole(asyncContext->portId, asyncContext->powerRole, asyncContext->dataRole); 911 USB_ASSERT(env, type == napi_number, SYSPARAM_INVALID_INPUT, "The type of dataRole must be number."); in PortSetPortRole() 917 int32_t dataRole = 0; in PortSetPortRole() local 918 napi_get_value_int32(env, args[INDEX_2], &dataRole); in PortSetPortRole() 928 asyncContext->dataRole = dataRole; in PortSetPortRole()
|
/base/usb/usb_manager/services/zidl/src/ |
H A D | usb_srv_stub.cpp | 425 int32_t dataRole = 0; in DoSetPortRole() local 428 READ_PARCEL_WITH_RET(data, Int32, dataRole, UEC_SERVICE_READ_PARCEL_ERROR); in DoSetPortRole() 429 int32_t ret = SetPortRole(portId, powerRole, dataRole); in DoSetPortRole()
|
H A D | usb_srv_proxy.cpp | 585 int32_t UsbServerProxy::SetPortRole(int32_t portId, int32_t powerRole, int32_t dataRole) in SetPortRole() argument 598 WRITE_PARCEL_WITH_RET(data, Int32, dataRole, UEC_INTERFACE_WRITE_PARCEL_ERROR); in SetPortRole()
|