Home
last modified time | relevance | path

Searched refs:portId (Results 1 - 16 of 16) sorted by relevance

/base/usb/usb_manager/services/native/include/
H A Dusb_port_manager.h39 int32_t GetSupportedModes(int32_t portId, int32_t &supportedModes);
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);
44 void RemovePort(int32_t portId);
H A Dusb_service.h80 int32_t GetSupportedModes(int32_t portId, int32_t &result) override;
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 Dusb_port_manager.cpp105 int32_t UsbPortManager::GetSupportedModes(int32_t portId, int32_t &supportedModes) in GetSupportedModes() argument
108 auto it = portMap_.find(portId); in GetSupportedModes()
120 int32_t portId = 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()
141 usbPort.id = portId; in QueryPort()
148 void UsbPortManager::UpdatePort(int32_t portId, int32_t powerRole, int32_t dataRole, int32_t mode) in UpdatePort() argument
152 auto it = portMap_.find(portId); in UpdatePort()
154 if (it->second.id == portId) { in UpdatePort()
179 RemovePort(int32_t portId) RemovePort() argument
[all...]
H A Dusb_service_subscriber.cpp48 cJSON_AddNumberToObject(portJson, "portId", static_cast<double>(info.portId)); in PortChangedEvent()
55 pms->UpdateUsbPort(info.portId, info.powerRole, info.dataRole, info.mode); in PortChangedEvent()
H A Dusb_service.cpp627 int32_t UsbService::GetSupportedModes(int32_t portId, int32_t &supportedModes) in GetSupportedModes() argument
641 return usbPortManager_->GetSupportedModes(portId, supportedModes); in GetSupportedModes()
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/test/native/mock/src/
H A Dusb_impl_mock.cpp75 int32_t MockUsbImpl::QueryPort(int32_t &portId, int32_t &powerRole, int32_t &dataRole, int32_t &mode) in QueryPort() argument
78 portId = DEFAULT_PORT_ID; in QueryPort()
98 int32_t MockUsbImpl::SetPortRole(int32_t portId, int32_t powerRole, int32_t dataRole) in SetPortRole() argument
102 if (portId != DEFAULT_PORT_ID) { in SetPortRole()
120 portInfo_.portId = portId; in SetPortRole()
H A Dusb_event_mock_test.cpp268 int32_t portId = DEFAULT_PORT_ID; in HWTEST_F() local
271 auto ret = mockUsbImpl_->SetPortRole(portId, powerRole, dataRole); in HWTEST_F()
302 int32_t portId = DEFAULT_PORT_ID; in HWTEST_F() local
305 auto ret = mockUsbImpl_->SetPortRole(portId, powerRole, dataRole); in HWTEST_F()
/base/usb/usb_manager/interfaces/kits/js/napi/include/
H A Dusb_async_context.h80 int32_t portId; member
/base/usb/usb_manager/interfaces/innerkits/native/include/
H A Dusb_srv_client.h53 int32_t GetSupportedModes(int32_t portId, int32_t &supportedModes);
54 int32_t SetPortRole(int32_t portId, int32_t powerRole, int32_t dataRole);
H A Diusb_srv.h41 virtual int32_t GetSupportedModes(int32_t portId, int32_t &supportedModes) = 0;
42 virtual int32_t SetPortRole(int32_t portId, int32_t powerRole, int32_t dataRole) = 0;
/base/usb/usb_manager/test/native/mock/include/
H A Dusb_impl_mock.h59 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/services/zidl/include/
H A Dusb_server_proxy.h47 int32_t GetSupportedModes(int32_t portId, int32_t &supportedModes) override;
48 int32_t SetPortRole(int32_t portId, int32_t powerRole, int32_t dataRole) override;
/base/usb/usb_manager/interfaces/innerkits/native/src/
H A Dusb_srv_client.cpp232 int32_t UsbSrvClient::GetSupportedModes(int32_t portId, int32_t &result) in GetSupportedModes() argument
236 int32_t ret = proxy_->GetSupportedModes(portId, result); in GetSupportedModes()
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/services/zidl/src/
H A Dusb_srv_stub.cpp410 int32_t portId = 0; in DoGetSupportedModes() local
411 READ_PARCEL_WITH_RET(data, Int32, portId, UEC_SERVICE_READ_PARCEL_ERROR); in DoGetSupportedModes()
412 int32_t ret = GetSupportedModes(portId, supportedModes); in DoGetSupportedModes()
423 int32_t portId = 0; in DoSetPortRole() local
426 READ_PARCEL_WITH_RET(data, Int32, portId, UEC_SERVICE_READ_PARCEL_ERROR); in DoSetPortRole()
429 int32_t ret = SetPortRole(portId, powerRole, dataRole); in DoSetPortRole()
H A Dusb_srv_proxy.cpp563 int32_t UsbServerProxy::GetSupportedModes(int32_t portId, int32_t &supportedModes) in GetSupportedModes() argument
574 WRITE_PARCEL_WITH_RET(data, Int32, portId, UEC_INTERFACE_WRITE_PARCEL_ERROR); in GetSupportedModes()
585 int32_t UsbServerProxy::SetPortRole(int32_t portId, int32_t powerRole, int32_t dataRole) in SetPortRole() argument
596 WRITE_PARCEL_WITH_RET(data, Int32, portId, UEC_INTERFACE_WRITE_PARCEL_ERROR); in SetPortRole()
/base/usb/usb_manager/interfaces/kits/js/napi/src/
H A Dusb_info.cpp851 USB_ASSERT(env, type == napi_number, SYSPARAM_INVALID_INPUT, "The type of portId must be number."); in PortGetSupportedModes()
871 int32_t ret = g_usbClient.SetPortRole(asyncContext->portId, asyncContext->powerRole, asyncContext->dataRole);
907 USB_ASSERT(env, type == napi_number, SYSPARAM_INVALID_INPUT, "The type of portId must be number."); in PortSetPortRole()
927 asyncContext->portId = id; in PortSetPortRole()

Completed in 17 milliseconds