Lines Matching refs:handle

161       uint8_t handle = it->first;  in DisconnectDevice()  local
162 return avrc_->Close(handle) == AVRC_SUCCESS; in DisconnectDevice()
235 uint8_t handle = 0; in AvrcpConnect() local
236 uint16_t status = avrc_->Open(&handle, &open_cb, bdaddr); in AvrcpConnect()
237 log::info("handle=0x{:x} status= 0x{:x}", handle, status); in AvrcpConnect()
241 void ConnectionHandler::InitiatorControlCb(uint8_t handle, uint8_t event, in InitiatorControlCb() argument
246 log::info("handle=0x{:x} result=0x{:x} addr={}", handle, result, in InitiatorControlCb()
264 avrc_->OpenBrowse(handle, AVCT_INT); in InitiatorControlCb()
272 base::Unretained(this), handle); in InitiatorControlCb()
273 auto&& ctrl_mtu = avrc_->GetPeerMtu(handle) - AVCT_HDR_LEN; in InitiatorControlCb()
274 auto&& browse_mtu = avrc_->GetBrowseMtu(handle) - AVCT_HDR_LEN; in InitiatorControlCb()
278 device_map_[handle] = newDevice; in InitiatorControlCb()
299 if (device_map_.find(handle) == device_map_.end()) { in InitiatorControlCb()
304 avrc_->Close(handle); in InitiatorControlCb()
305 feature_map_.erase(device_map_[handle]->GetAddress()); in InitiatorControlCb()
306 device_map_[handle]->DeviceDisconnected(); in InitiatorControlCb()
307 device_map_.erase(handle); in InitiatorControlCb()
316 if (device_map_.find(handle) == device_map_.end()) { in InitiatorControlCb()
321 auto browse_mtu = avrc_->GetBrowseMtu(handle) - AVCT_HDR_LEN; in InitiatorControlCb()
322 device_map_[handle]->SetBrowseMtu(browse_mtu); in InitiatorControlCb()
333 void ConnectionHandler::AcceptorControlCb(uint8_t handle, uint8_t event, in AcceptorControlCb() argument
338 log::info("handle=0x{:x} result=0x{:x} addr={}", handle, result, in AcceptorControlCb()
350 if (device_map_.find(handle) != device_map_.end()) { in AcceptorControlCb()
352 feature_map_.erase(device_map_[handle]->GetAddress()); in AcceptorControlCb()
353 device_map_[handle]->DeviceDisconnected(); in AcceptorControlCb()
354 device_map_.erase(handle); in AcceptorControlCb()
356 avrc_->Close(handle); in AcceptorControlCb()
362 weak_ptr_factory_.GetWeakPtr(), handle); in AcceptorControlCb()
363 auto&& ctrl_mtu = avrc_->GetPeerMtu(handle) - AVCT_HDR_LEN; in AcceptorControlCb()
364 auto&& browse_mtu = avrc_->GetBrowseMtu(handle) - AVCT_HDR_LEN; in AcceptorControlCb()
368 device_map_[handle] = newDevice; in AcceptorControlCb()
372 auto sdp_lambda = [](ConnectionHandler* instance_, uint8_t handle, in AcceptorControlCb()
375 if (instance_->device_map_.find(handle) == in AcceptorControlCb()
377 log::warn("No device found for handle: 0x{:x}", handle); in AcceptorControlCb()
381 auto device = instance_->device_map_[handle]; in AcceptorControlCb()
397 if (SdpLookup(*peer_addr, base::Bind(sdp_lambda, this, handle), false)) { in AcceptorControlCb()
398 avrc_->OpenBrowse(handle, AVCT_ACP); in AcceptorControlCb()
404 handle); in AcceptorControlCb()
413 SdpLookupAudioRole(handle); in AcceptorControlCb()
420 if (device_map_.find(handle) == device_map_.end()) { in AcceptorControlCb()
426 feature_map_.erase(device_map_[handle]->GetAddress()); in AcceptorControlCb()
427 device_map_[handle]->DeviceDisconnected(); in AcceptorControlCb()
428 device_map_.erase(handle); in AcceptorControlCb()
430 avrc_->Close(handle); in AcceptorControlCb()
439 if (device_map_.find(handle) == device_map_.end()) { in AcceptorControlCb()
444 auto browse_mtu = avrc_->GetBrowseMtu(handle) - AVCT_HDR_LEN; in AcceptorControlCb()
445 device_map_[handle]->SetBrowseMtu(browse_mtu); in AcceptorControlCb()
456 void ConnectionHandler::MessageCb(uint8_t handle, uint8_t label, uint8_t opcode, in MessageCb() argument
458 if (device_map_.find(handle) == device_map_.end()) { in MessageCb()
460 handle); in MessageCb()
469 log::verbose("ignore response handle {}", (unsigned int)handle); in MessageCb()
473 log::verbose("Browse Message received on handle {}", (unsigned int)handle); in MessageCb()
474 device_map_[handle]->BrowseMessageReceived(label, BrowsePacket::Parse(pkt)); in MessageCb()
478 log::verbose("Message received on handle {}", (unsigned int)handle); in MessageCb()
479 device_map_[handle]->MessageReceived(label, Packet::Parse(pkt)); in MessageCb()
593 uint8_t handle, uint8_t label, bool browse, in SendMessage() argument
604 log::info("SendMessage to handle=0x{:x}", handle); in SendMessage()
634 avrc_->MsgReq(handle, label, ctype, pkt); in SendMessage()
652 bool ConnectionHandler::SdpLookupAudioRole(uint16_t handle) { in SdpLookupAudioRole() argument
653 if (device_map_.find(handle) == device_map_.end()) { in SdpLookupAudioRole()
654 log::warn("No device found for handle: {}", loghex(handle)); in SdpLookupAudioRole()
657 auto device = device_map_[handle]; in SdpLookupAudioRole()
662 ADDRESS_TO_LOGGABLE_STR(device->GetAddress()), handle); in SdpLookupAudioRole()
666 weak_ptr_factory_.GetWeakPtr(), handle)); in SdpLookupAudioRole()
669 void ConnectionHandler::SdpLookupAudioRoleCb(uint16_t handle, bool found, in SdpLookupAudioRoleCb() argument
672 if (device_map_.find(handle) == device_map_.end()) { in SdpLookupAudioRoleCb()
673 log::warn("No device found for handle: {}", loghex(handle)); in SdpLookupAudioRoleCb()
676 auto device = device_map_[handle]; in SdpLookupAudioRoleCb()
679 ADDRESS_TO_LOGGABLE_STR(device->GetAddress()), handle, in SdpLookupAudioRoleCb()
683 device->connect_a2dp_sink_delayed(handle); in SdpLookupAudioRoleCb()