Lines Matching refs:instance_
38 ConnectionHandler* ConnectionHandler::instance_ = nullptr; member in bluetooth::avrcp::ConnectionHandler
41 CHECK(instance_); in Get()
43 return instance_; in Get()
63 CHECK(instance_ == nullptr); in Initialize()
69 instance_ = new ConnectionHandler(); in Initialize()
70 instance_->connection_cb_ = callback; in Initialize()
71 instance_->avrc_ = avrcp; in Initialize()
72 instance_->sdp_ = sdp; in Initialize()
73 instance_->vol_ = vol; in Initialize()
76 if (!instance_->AvrcpConnect(false, RawAddress::kAny)) { in Initialize()
77 instance_->CleanUp(); in Initialize()
85 CHECK(instance_ != nullptr); in CleanUp()
88 for (const auto& entry : instance_->device_map_) { in CleanUp()
90 instance_->avrc_->Close(entry.first); in CleanUp()
92 instance_->device_map_.clear(); in CleanUp()
93 instance_->feature_map_.clear(); in CleanUp()
95 instance_->weak_ptr_factory_.InvalidateWeakPtrs(); in CleanUp()
97 delete instance_; in CleanUp()
98 instance_ = nullptr; in CleanUp()
104 CHECK(instance_ == nullptr); in InitForTesting()
105 instance_ = handler; in InitForTesting()
118 auto connection_lambda = [](ConnectionHandler* instance_, in ConnectDevice()
127 instance_->connection_cb_.Run(std::shared_ptr<Device>()); in ConnectDevice()
130 instance_->feature_map_.emplace(bdaddr, features); in ConnectDevice()
131 instance_->AvrcpConnect(true, bdaddr); in ConnectDevice()
256 } else if (instance_->vol_ != nullptr) { in InitiatorControlCb()
257 instance_->vol_->DeviceConnected(newDevice->GetAddress()); in InitiatorControlCb()
325 auto sdp_lambda = [](ConnectionHandler* instance_, uint8_t handle, in AcceptorControlCb()
328 if (instance_->device_map_.find(handle) == in AcceptorControlCb()
329 instance_->device_map_.end()) { in AcceptorControlCb()
335 auto device = instance_->device_map_[handle]; in AcceptorControlCb()
336 instance_->feature_map_.emplace(device->GetAddress(), features); in AcceptorControlCb()
342 } else if (instance_->vol_ != nullptr) { in AcceptorControlCb()
343 instance_->vol_->DeviceConnected(device->GetAddress()); in AcceptorControlCb()