Home
last modified time | relevance | path

Searched refs:powerRole (Results 1 – 20 of 20) sorted by relevance

/base/usb/usb_manager/test/native/js_unittest/
DUsbPortJsunitEx.test.js72 var powerRole = usb.SINK;
75 usb.setPortRoles(portId, powerRole, dataRole).then(data => {
95 var powerRole = usb.NONE - 1;
98 usb.setPortRoles(portId, powerRole, dataRole).then(data => {
118 var powerRole = usb.SINK;
121 usb.setPortRoles(portId, powerRole, dataRole).then(data => {
141 var powerRole = usb.NONE - 1;
144 usb.setPortRoles(portId, powerRole, dataRole).then(data => {
165 var powerRole = usb.NONE - 1;
168 usb.setPortRoles(portId, powerRole, dataRole).then(data => {
[all …]
/base/usb/usb_manager/test/native/mock/src/
Dusb_impl_mock.cpp75 int32_t MockUsbImpl::QueryPort(int32_t &portId, int32_t &powerRole, int32_t &dataRole, int32_t &mod… in QueryPort() argument
79 powerRole = UsbSrvSupport::POWER_ROLE_SINK; in QueryPort()
98 int32_t MockUsbImpl::SetPortRole(int32_t portId, int32_t powerRole, int32_t dataRole) in SetPortRole() argument
105 if (powerRole <= UsbSrvSupport::POWER_ROLE_NONE || powerRole > UsbSrvSupport::POWER_ROLE_SINK) { 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()
121 portInfo_.powerRole = powerRole; in SetPortRole()
Dusb_event_mock_test.cpp271 int32_t powerRole = UsbSrvSupport::POWER_ROLE_SOURCE; variable
273 auto ret = mockUsbImpl_->SetPortRole(portId, powerRole, dataRole);
305 int32_t powerRole = UsbSrvSupport::POWER_ROLE_SINK; variable
307 auto ret = mockUsbImpl_->SetPortRole(portId, powerRole, dataRole);
/base/usb/usb_manager/services/native/src/
Dusb_port_manager.cpp106 int32_t powerRole = 0; in QueryPort() local
114 int32_t ret = usbd_->QueryPort(portId, powerRole, dataRole, mode); in QueryPort()
116 portId, powerRole, dataRole, mode); in QueryPort()
125 usbPortStatus.currentPowerRole = powerRole; in QueryPort()
133 void UsbPortManager::UpdatePort(int32_t portId, int32_t powerRole, int32_t dataRole, int32_t mode) in UpdatePort() argument
140 ReportPortRoleChangeSysEvent(it->second.usbPortStatus.currentPowerRole, powerRole, in UpdatePort()
142 it->second.usbPortStatus.currentPowerRole = powerRole; in UpdatePort()
Dusb_service_subscriber.cpp46 port["powerRole"] = info.powerRole; in PortChangedEvent()
56 pms->UpdateUsbPort(info.portId, info.powerRole, info.dataRole, info.mode); in PortChangedEvent()
Dusb_service.cpp499 int32_t UsbService::SetPortRole(int32_t portId, int32_t powerRole, int32_t dataRole) in SetPortRole() argument
514 return usbd_->SetPortRole(portId, powerRole, dataRole); in SetPortRole()
967 void UsbService::UpdateUsbPort(int32_t portId, int32_t powerRole, int32_t dataRole, int32_t mode) in UpdateUsbPort() argument
974 usbPortManager_->UpdatePort(portId, powerRole, dataRole, mode); in UpdateUsbPort()
/base/usb/usb_manager/services/native/include/
Dusb_port_manager.h40 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);
Dusb_service.h79 int32_t SetPortRole(int32_t portId, int32_t powerRole, int32_t dataRole) override;
102 void UpdateUsbPort(int32_t portId, int32_t powerRole, int32_t dataRole, int32_t mode);
/base/usb/usb_manager/interfaces/kits/js/napi/include/
Dusb_async_context.h81 int32_t powerRole; member
/base/usb/usb_manager/test/native/mock/include/
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/interfaces/kits/js/
D@ohos.usbManager.d.ts171 …function setPortRoles(portId: number, powerRole: PowerRoleType, dataRole: DataRoleType): Promise<v…
/base/usb/usb_manager/interfaces/innerkits/native/include/
Dusb_srv_client.h53 int32_t SetPortRole(int32_t portId, int32_t powerRole, int32_t dataRole);
Diusb_srv.h40 virtual int32_t SetPortRole(int32_t portId, int32_t powerRole, int32_t dataRole) = 0;
/base/usb/usb_manager/services/zidl/include/
Dusb_server_proxy.h46 int32_t SetPortRole(int32_t portId, int32_t powerRole, int32_t dataRole) override;
/base/usb/usb_manager/interfaces/innerkits/native/src/
Dusb_srv_client.cpp200 int32_t UsbSrvClient::SetPortRole(int32_t portId, int32_t powerRole, int32_t dataRole) in SetPortRole() argument
204 int32_t ret = proxy_->SetPortRole(portId, powerRole, dataRole); in SetPortRole()
/base/usb/usb_manager/
DREADME_zh.md70 | int32_t SetPortRole(int32_t portId, int32_t powerRole, int32_t dataRole); | 设置端口工作模式 |
DREADME.md78 | int32_t SetPortRole(int32_t portId, int32_t powerRole, int32_t dataRole); | Sets the port role. …
/base/usb/usb_manager/interfaces/kits/js/napi/src/
Dusb_info.cpp782 …int32_t ret = g_usbClient.SetPortRole(asyncContext->portId, asyncContext->powerRole, asyncContext-… in __anonfdf92cdc0502()
823 int32_t powerRole = 0; in PortSetPortRole() local
824 napi_get_value_int32(env, args[INDEX_1], &powerRole); in PortSetPortRole()
837 asyncContext->powerRole = powerRole; in PortSetPortRole()
/base/usb/usb_manager/services/zidl/src/
Dusb_srv_stub.cpp333 int32_t powerRole = 0; in DoSetPortRole() local
336 READ_PARCEL_WITH_RET(data, Int32, powerRole, UEC_SERVICE_READ_PARCEL_ERROR); in DoSetPortRole()
338 return SetPortRole(portId, powerRole, dataRole); in DoSetPortRole()
Dusb_srv_proxy.cpp559 int32_t UsbServerProxy::SetPortRole(int32_t portId, int32_t powerRole, int32_t dataRole) in SetPortRole() argument
571 WRITE_PARCEL_WITH_RET(data, Int32, powerRole, UEC_INTERFACE_WRITE_PARCEL_ERROR); in SetPortRole()