Lines Matching refs:psm
41 bool bluetooth::shim::legacy::PsmManager::IsPsmRegistered(uint16_t psm) const { in IsPsmRegistered()
42 return psm_to_callback_map_.find(psm) != psm_to_callback_map_.end(); in IsPsmRegistered()
45 bool bluetooth::shim::legacy::PsmManager::HasClient(uint16_t psm) const { in HasClient()
46 return IsPsmRegistered(psm) && psm_to_callback_map_.at(psm) != nullptr; in HasClient()
50 uint16_t psm, const tL2CAP_APPL_INFO* callbacks) { in RegisterPsm() argument
51 CHECK(!HasClient(psm)); in RegisterPsm()
52 psm_to_callback_map_[psm] = callbacks; in RegisterPsm()
55 void bluetooth::shim::legacy::PsmManager::RegisterPsm(uint16_t psm) { in RegisterPsm() argument
56 RegisterPsm(psm, nullptr); in RegisterPsm()
59 void bluetooth::shim::legacy::PsmManager::UnregisterPsm(uint16_t psm) { in UnregisterPsm() argument
60 CHECK(IsPsmRegistered(psm)); in UnregisterPsm()
61 psm_to_callback_map_.erase(psm); in UnregisterPsm()
65 uint16_t psm) { in Callbacks() argument
66 CHECK(HasClient(psm)); in Callbacks()
67 return psm_to_callback_map_[psm]; in Callbacks()
167 uint16_t psm, const tL2CAP_APPL_INFO* callbacks, bool enable_snoop, in RegisterService() argument
169 if (Classic().IsPsmRegistered(psm)) { in RegisterService()
170 LOG_WARN("Service is already registered psm:%hd", psm); in RegisterService()
174 LOG_INFO("Disable snooping on psm basis unsupported psm:%d", psm); in RegisterService()
177 LOG_DEBUG("Registering service on psm:%hd", psm); in RegisterService()
186 psm, use_ertm, required_mtu, in RegisterService()
194 if (registered_psm != psm) { in RegisterService()
195 LOG_WARN("Unable to register psm:%hd", psm); in RegisterService()
197 LOG_DEBUG("Successfully registered psm:%hd", psm); in RegisterService()
203 void bluetooth::shim::legacy::L2cap::UnregisterService(uint16_t psm) { in UnregisterService() argument
204 if (!Classic().IsPsmRegistered(psm)) { in UnregisterService()
205 LOG_WARN("Service must be registered in order to unregister psm:%hd", psm); in UnregisterService()
209 if (entry.second == psm) { in UnregisterService()
211 psm, entry.first); in UnregisterService()
215 LOG_DEBUG("Unregistering service on psm:%hd", psm); in UnregisterService()
219 psm, std::move(unregister_promise)); in UnregisterService()
221 Classic().UnregisterPsm(psm); in UnregisterService()
225 uint16_t psm, const RawAddress& raw_address) { in CreateConnection() argument
226 if (!Classic().IsPsmRegistered(psm)) { in CreateConnection()
227 LOG_WARN("Service must be registered in order to connect psm:%hd", psm); in CreateConnection()
233 LOG_DEBUG("Initiating local connection to psm:%hd address:%s", psm, in CreateConnection()
237 psm, raw_address.ToString(), in CreateConnection()
247 psm, raw_address.ToString().c_str()); in CreateConnection()
252 psm, raw_address.ToString().c_str(), cid); in CreateConnection()
254 cid_to_psm_map_[cid] = psm; in CreateConnection()
260 std::string string_address, uint16_t psm, uint16_t cid, uint16_t remote_cid, in OnLocalInitiatedConnectionCreated() argument
268 string_address.c_str(), psm, cid); in OnLocalInitiatedConnectionCreated()
270 Classic().Callbacks(psm)->pL2CA_ConnectCfm_Cb( in OnLocalInitiatedConnectionCreated()
284 std::string string_address, uint16_t psm, uint16_t cid, in OnRemoteInitiatedConnectionCreated() argument
292 string_address.c_str(), psm, cid); in OnRemoteInitiatedConnectionCreated()
295 cid_to_psm_map_[cid] = psm; in OnRemoteInitiatedConnectionCreated()
298 Classic().Callbacks(psm)->pL2CA_ConnectInd_Cb(raw_address, cid, psm, in OnRemoteInitiatedConnectionCreated()