/foundation/communication/bluetooth_service/services/bluetooth/server/src/ |
H A D | bluetooth_pan_server.cpp | 78 explicit SystemStateObserver(BluetoothPanServer::impl *pimpl) : pimpl_(pimpl) {} in SystemStateObserver() argument 112 pimpl = std::make_unique<impl>(); in BluetoothPanServer() 113 pimpl->observerImp_->SetObserver(&(pimpl->observers_)); in BluetoothPanServer() 114 pimpl->systemStateObserver_ = std::make_unique<impl::SystemStateObserver>(pimpl.get()); in BluetoothPanServer() 115 IAdapterManager::GetInstance()->RegisterSystemStateObserver(*(pimpl->systemStateObserver_)); in BluetoothPanServer() 117 pimpl->panService_ = pimpl in BluetoothPanServer() [all...] |
H A D | bluetooth_hid_host_server.cpp | 79 explicit SystemStateObserver(BluetoothHidHostServer::impl *pimpl) : pimpl_(pimpl) {}; in SystemStateObserver() argument 115 pimpl = std::make_unique<impl>(); in BluetoothHidHostServer() 116 pimpl->observerImp_->SetObserver(&(pimpl->observers_)); in BluetoothHidHostServer() 117 pimpl->systemStateObserver_ = std::make_unique<impl::SystemStateObserver>(pimpl.get()); in BluetoothHidHostServer() 118 IAdapterManager::GetInstance()->RegisterSystemStateObserver(*(pimpl->systemStateObserver_)); in BluetoothHidHostServer() 120 pimpl->hidHostService_ = pimpl in BluetoothHidHostServer() [all...] |
H A D | bluetooth_hfp_hf_server.cpp | 132 explicit HfpHfSystemObserver(BluetoothHfpHfServer::impl* pimpl) : pimpl_(pimpl) {}; in HfpHfSystemObserver() argument 170 pimpl = std::make_unique<impl>(); in BluetoothHfpHfServer() 171 pimpl->observerImp_->SetObserver(&(pimpl->observers_)); in BluetoothHfpHfServer() 172 pimpl->HfpHfSystemObserver_ = std::make_unique<impl::HfpHfSystemObserver>(pimpl.get()); in BluetoothHfpHfServer() 173 IAdapterManager::GetInstance()->RegisterSystemStateObserver(*(pimpl->HfpHfSystemObserver_)); in BluetoothHfpHfServer() 177 pimpl->HfpHfService_ = (IProfileHfpHf*)serviceMgr->GetProfileService(PROFILE_NAME_HFP_HF); in BluetoothHfpHfServer() 178 if (pimpl in BluetoothHfpHfServer() [all...] |
H A D | bluetooth_a2dp_sink_server.cpp | 65 SystemStateObserver(BluetoothA2dpSinkServer::impl *pimpl) : pimpl_(pimpl) {}; in SystemStateObserver() argument 110 pimpl = std::make_unique<impl>(); in BluetoothA2dpSinkServer() 111 pimpl->observerImp_->SetObserver(&(pimpl->observers_)); in BluetoothA2dpSinkServer() 112 pimpl->systemStateObserver_ = std::make_unique<impl::SystemStateObserver>(pimpl.get()); in BluetoothA2dpSinkServer() 113 IAdapterManager::GetInstance()->RegisterSystemStateObserver(*(pimpl->systemStateObserver_)); in BluetoothA2dpSinkServer() 117 pimpl->a2dpSnkService_ = (IProfileA2dpSnk *)serviceMgr->GetProfileService(PROFILE_NAME_A2DP_SINK); in BluetoothA2dpSinkServer() 118 if (pimpl in BluetoothA2dpSinkServer() [all...] |
H A D | bluetooth_hfp_ag_server.cpp | 101 explicit HfpAgSystemObserver(BluetoothHfpAgServer::impl* pimpl) : pimpl_(pimpl) {}; in HfpAgSystemObserver() argument 140 pimpl = std::make_unique<impl>(); in BluetoothHfpAgServer() 141 pimpl->observerImp_->SetObserver(&(pimpl->observers_)); in BluetoothHfpAgServer() 142 pimpl->HfpAgSystemObserver_ = std::make_unique<impl::HfpAgSystemObserver>(pimpl.get()); in BluetoothHfpAgServer() 143 IAdapterManager::GetInstance()->RegisterSystemStateObserver(*(pimpl->HfpAgSystemObserver_)); in BluetoothHfpAgServer() 147 pimpl->HfpAgService_ = (IProfileHfpAg*)serviceMgr->GetProfileService(PROFILE_NAME_HFP_AG); in BluetoothHfpAgServer() 148 if (pimpl in BluetoothHfpAgServer() [all...] |
H A D | bluetooth_gatt_client_server.cpp | 240 if (owner_.pimpl == nullptr || owner_.pimpl->clientService_ == nullptr) { in OnRemoteDied() 244 std::lock_guard<std::mutex> lck(owner_.pimpl->registerMutex_); in OnRemoteDied() 245 for (auto it = owner_.pimpl->callbacks_.begin(); it != owner_.pimpl->callbacks_.end(); ++it) { in OnRemoteDied() 253 owner_.pimpl->clientService_->Disconnect((*it)->GetAppId()); in OnRemoteDied() 254 owner_.pimpl->clientService_->DeregisterApplication((*it)->GetAppId()); in OnRemoteDied() 255 owner_.pimpl->callbacks_.erase(it); in OnRemoteDied() 272 BluetoothGattClientServer::BluetoothGattClientServer() : pimpl(new impl()) in BluetoothGattClientServer() 292 std::lock_guard<std::mutex> lck(pimpl in RegisterApplication() [all...] |
H A D | bluetooth_ble_central_manager_server.cpp | 83 explicit BleCentralManagerCallback(BluetoothBleCentralManagerServer::impl *pimpl) : pimpl_(pimpl) {}; in BleCentralManagerCallback() argument 259 explicit SystemStateObserver(BluetoothBleCentralManagerServer::impl *pimpl) : pimpl_(pimpl){}; in SystemStateObserver() argument 295 pimpl = std::make_unique<impl>(); in BluetoothBleCentralManagerServer() 297 pimpl->eventHandler_->PostSyncTask( in BluetoothBleCentralManagerServer() 299 pimpl->observerImp_->SetObserver(&(pimpl->observers_)); in BluetoothBleCentralManagerServer() 300 pimpl->systemStateObserver_ = std::make_unique<impl::SystemStateObserver>(pimpl in BluetoothBleCentralManagerServer() [all...] |
H A D | bluetooth_avrcp_tg_server.cpp | 155 pimpl = std::make_unique<impl>(); in BluetoothAvrcpTgServer() 160 pimpl = nullptr; in ~BluetoothAvrcpTgServer() 167 std::lock_guard<std::mutex> lock(pimpl->observerMutex_); in RegisterObserver() 174 pimpl->observers_.Register(observer, func); in RegisterObserver() 184 std::lock_guard<std::mutex> lock(pimpl->observerMutex_); in UnregisterObserver() 190 pimpl->observers_.Deregister(observer); in UnregisterObserver() 200 if (pimpl->IsEnabled()) { in SetActiveDevice() 201 pimpl->service_->SetActiveDevice(addr); in SetActiveDevice() 217 if (pimpl->IsEnabled()) { in Connect() 218 result = pimpl in Connect() [all...] |
H A D | bluetooth_a2dp_source_server.cpp | 107 SystemStateObserver(BluetoothA2dpSourceServer::impl *pimpl) : pimpl_(pimpl) {}; in SystemStateObserver() argument 153 pimpl = std::make_unique<impl>(); in BluetoothA2dpSourceServer() 154 pimpl->observerImp_->SetObserver(&(pimpl->observers_)); in BluetoothA2dpSourceServer() 155 pimpl->systemStateObserver_ = std::make_unique<impl::SystemStateObserver>(pimpl.get()); in BluetoothA2dpSourceServer() 156 IAdapterManager::GetInstance()->RegisterSystemStateObserver(*(pimpl->systemStateObserver_)); in BluetoothA2dpSourceServer() 160 pimpl->a2dpSrcService_ = (IProfileA2dpSrc *)serviceMgr->GetProfileService(PROFILE_NAME_A2DP_SRC); in BluetoothA2dpSourceServer() 161 if (pimpl in BluetoothA2dpSourceServer() [all...] |
H A D | bluetooth_gatt_server_server.cpp | 252 (unsigned long)owner_.pimpl->callbacks_.size()); in OnRemoteDied() 253 std::lock_guard<std::mutex> lck(owner_.pimpl->registerMutex_); in OnRemoteDied() 254 for (auto it = owner_.pimpl->callbacks_.begin(); it != owner_.pimpl->callbacks_.end(); ++it) { in OnRemoteDied() 262 if (owner_.pimpl->serverService_ != nullptr) { in OnRemoteDied() 263 int ret = owner_.pimpl->serverService_->DeregisterApplication(appId); in OnRemoteDied() 266 owner_.pimpl->callbacks_.erase(it); in OnRemoteDied() 313 std::lock_guard<std::mutex> lck(pimpl->registerMutex_); in AddService() 314 if (!pimpl->serverService_) { in AddService() 321 int ret = pimpl in AddService() [all...] |
H A D | bluetooth_ble_advertiser_server.cpp | 112 explicit SystemStateObserver(BluetoothBleAdvertiserServer::impl *pimpl) : pimpl_(pimpl) {}; in SystemStateObserver() argument 144 pimpl = std::make_unique<impl>(); in BluetoothBleAdvertiserServer() 145 pimpl->observerImp_->SetObserver(&(pimpl->observers_)); in BluetoothBleAdvertiserServer() 146 pimpl->systemStateObserver_ = std::make_unique<impl::SystemStateObserver>(pimpl.get()); in BluetoothBleAdvertiserServer() 147 IAdapterManager::GetInstance()->RegisterSystemStateObserver(*(pimpl->systemStateObserver_)); in BluetoothBleAdvertiserServer() 151 bleService->RegisterBleAdvertiserCallback(*pimpl->observerImp_.get()); in BluetoothBleAdvertiserServer() 157 IAdapterManager::GetInstance()->DeregisterSystemStateObserver(*(pimpl in ~BluetoothBleAdvertiserServer() [all...] |
/foundation/communication/bluetooth_service/services/bluetooth/service/src/ble/ |
H A D | ble_adapter.cpp | 60 std::lock_guard<std::mutex> lock(bleAdapter_.pimpl->mutexRemoteName_); 63 bleAdapter_.pimpl->remoteDeviceName_ = name; 64 bleAdapter_.pimpl->readCharacteristicFlag_ = true; 66 bleAdapter_.pimpl->readCharacteristicFlag_ = false; 68 bleAdapter_.pimpl->cvfull_.notify_all(); 149 BleAdapter::BleAdapter() : utility::Context(ADAPTER_NAME_BLE, "5.0"), pimpl(std::make_unique<BleAdapter::impl>(*this)) in BleAdapter() 158 pimpl->bleAdvertiser_ = nullptr; in ~BleAdapter() 159 pimpl->bleCentralManager_ = nullptr; in ~BleAdapter() 160 pimpl->bleSecurity_ = nullptr; in ~BleAdapter() 174 std::lock_guard<std::recursive_mutex> lk(pimpl in EnableTask() [all...] |
H A D | ble_advertiser_impl.cpp | 48 pimpl(std::make_unique<BleAdvertiserImpl::impl>()) in BleAdvertiserImpl() 52 pimpl->advParams_.advMinInterval = BLE_ADV_MIN_INTERVAL; in BleAdvertiserImpl() 53 pimpl->advParams_.advMaxInterval = BLE_ADV_MAX_INTERVAL; in BleAdvertiserImpl() 54 pimpl->advParams_.advType = ADV_TYPE_IND; in BleAdvertiserImpl() 55 pimpl->advParams_.channelMap = ADV_CHNL_ALL; in BleAdvertiserImpl() 56 pimpl->advParams_.advFilterPolicy = ADV_FILTER_ALLOW_SCAN_ANY_CON_ANY; in BleAdvertiserImpl() 57 pimpl->advParams_.peerAddrType = BLE_ADDR_TYPE_PUBLIC; in BleAdvertiserImpl() 64 for (auto iter = pimpl->advHandleSettingDatas_.begin(); iter != pimpl->advHandleSettingDatas_.end(); iter++) { in ~BleAdvertiserImpl() 70 pimpl in ~BleAdvertiserImpl() [all...] |
H A D | ble_properties.cpp | 44 BleProperties::BleProperties() : pimpl(std::make_unique<BleProperties::impl>()) in BleProperties() 54 return pimpl->deviceName_; in GetLocalName() 73 pimpl->deviceName_ = BleConfig::GetInstance().GetLocalName(); in SetLocalName() 74 if (newName != pimpl->deviceName_) { in SetLocalName() 75 pimpl->deviceName_ = newName; in SetLocalName() 85 return pimpl->macAddr_; in GetLocalAddress() 92 return pimpl->bondableMode_; in GetBondableMode() 99 if (pimpl->bondableMode_ == mode) { in SetBondableMode() 104 pimpl->bondableMode_ = GAP_BONDABLE_MODE_NON; in SetBondableMode() 107 pimpl in SetBondableMode() [all...] |
H A D | ble_central_manager_impl.cpp | 170 pimpl(std::make_unique<BleCentralManagerImpl::impl>()) in BleCentralManagerImpl() 174 pimpl->bleCentralManagerImpl_ = this; in BleCentralManagerImpl() 175 pimpl->scanParams_.ownAddrType = BLE_ADDR_TYPE_PUBLIC; in BleCentralManagerImpl() 176 pimpl->scanParams_.scanFilterPolicy = BLE_SCAN_FILTER_ALLOW_ALL; in BleCentralManagerImpl() 190 if (pimpl->timer_ != nullptr) { in ~BleCentralManagerImpl() 191 pimpl->timer_->Stop(); in ~BleCentralManagerImpl() 192 pimpl->timer_ = nullptr; in ~BleCentralManagerImpl() 254 isStart ? centralManager->pimpl->advDataCache_.SetAdvData(peerAddr->type, rawAddress, std::move(datas)) in AdvertisingReport() 255 : centralManager->pimpl->advDataCache_.AppendAdvData(peerAddr->type, rawAddress, std::move(datas)); in AdvertisingReport() 262 centralManager->pimpl in AdvertisingReport() [all...] |
/foundation/communication/bluetooth/frameworks/inner/src/ |
H A D | bluetooth_gatt_client.cpp | 136 clientSptr->pimpl->DiscoverStart(); 149 clientSptr->pimpl->CleanConnectionInfo(); 153 std::lock_guard<std::mutex> lck(clientSptr->pimpl->connStateMutex_); 154 clientSptr->pimpl->connectionState_ = newState; 156 WPTR_GATT_CBACK(clientSptr->pimpl->callback_, OnConnectionStateChanged, newState, state); 167 std::lock_guard<std::mutex> lock(clientSptr->pimpl->gattServicesMutex_); 168 for (auto &svc : clientSptr->pimpl->gattServices_) { 172 WPTR_GATT_CBACK(clientSptr->pimpl->callback_, OnCharacteristicChanged, character); 188 std::lock_guard<std::mutex> lock(clientSptr->pimpl->requestInformation_.mutex_); 189 clientSptr->pimpl [all...] |
H A D | bluetooth_socket.cpp | 331 if (!clientSptr->pimpl) { 343 SPTR_SOCKET_CBACK(clientSptr->pimpl->observer_, OnConnectionStateChanged, callbackConnectParam); 404 : pimpl(new ClientSocket::impl(bda, uuid, type, auth)) in ClientSocket() 408 : pimpl(new ClientSocket::impl(fd, address, type)) in ClientSocket() 413 : pimpl(new ClientSocket::impl(bda, uuid, type, auth, observer)) in ClientSocket() 422 CHECK_AND_RETURN_LOG_RET(pimpl != nullptr, false, "pimpl is nullptr!"); in Init() 423 return pimpl->Init(weak_from_this()); in Init() 429 CHECK_AND_RETURN_LOG_RET(pimpl != nullptr, BT_ERR_DEVICE_DISCONNECTED, "pimpl i in Connect() [all...] |
H A D | bluetooth_gatt_server.cpp | 113 if (!serverSptr->pimpl) { in GetServerSptr() 129 std::lock_guard<std::mutex> lock(serverSptr->pimpl->serviceListMutex_); 130 auto gattcharacter = serverSptr->pimpl->FindCharacteristic(characteristic.handle_); 133 std::lock_guard<std::mutex> lck(serverSptr->pimpl->requestListMutex_); 134 auto ret = serverSptr->pimpl->requests_.emplace( 142 if (serverSptr->pimpl->callback_) { 143 serverSptr->pimpl->callback_->OnCharacteristicReadRequest( 147 serverSptr->pimpl->BuildRequestId(REQUEST_TYPE_CHARACTERISTICS_READ, device.transport_)); 167 std::lock_guard<std::mutex> lock(serverSptr->pimpl->serviceListMutex_); 168 auto gattcharacter = serverSptr->pimpl [all...] |
/foundation/communication/bluetooth_service/services/bluetooth/service/src/common/ |
H A D | profile_config.cpp | 39 ProfileConfig::ProfileConfig() : pimpl(std::make_unique<impl>()){}; in ProfileConfig() 45 std::lock_guard<std::mutex> lock(pimpl->mutex_); in Load() 46 if (pimpl->parse_.Load(pimpl->filePath_)) { in Load() 52 return pimpl->parse_.Load(pimpl->filePath_); in Load() 58 std::ifstream fin(pimpl->fileBasePath_, std::ios::in | std::ios::binary); in Reload() 62 std::ofstream fout(pimpl->filePath_, std::ios::out | std::ios::trunc); in Reload() 73 std::lock_guard<std::mutex> lock(pimpl->mutex_); in GetValue() 74 return pimpl in GetValue() [all...] |
H A D | profile_service_manager.cpp | 103 : pimpl(std::make_unique<ProfileServiceManager::impl>(dispatch)) in ProfileServiceManager() 106 pimpl->contextCallback_ = std::make_unique<ProfileServicesContextCallback>(*this); in ProfileServiceManager() 135 profile->GetContext()->RegisterCallback(*(pimpl->contextCallback_)); in CreateClassicProfileServices() 136 pimpl->startedProfiles_.SetProfile(BTTransport::ADAPTER_BREDR, sp.name_, profile); in CreateClassicProfileServices() 137 pimpl->profilesState_.SetProfile(BTTransport::ADAPTER_BREDR, sp.name_, ServiceStateID::TURN_OFF); in CreateClassicProfileServices() 151 if (pimpl->startedProfiles_.Find(BTTransport::ADAPTER_BREDR, sp.name_, bredrProfile)) { in CreateBleProfileServices() 154 pimpl->startedProfiles_.SetProfile(BTTransport::ADAPTER_BLE, sp.name_, bredrProfile); in CreateBleProfileServices() 156 pimpl->profilesState_.SetProfile(BTTransport::ADAPTER_BLE, sp.name_, ServiceStateID::TURN_OFF); in CreateBleProfileServices() 163 newProfile->GetContext()->RegisterCallback(*(pimpl->contextCallback_)); in CreateBleProfileServices() 164 pimpl in CreateBleProfileServices() [all...] |
H A D | adapter_manager.cpp | 187 AdapterManager::AdapterManager() : pimpl(std::make_unique<AdapterManager::impl>()) in AdapterManager() 190 pimpl->sysStateMachine_.Init(*this); in AdapterManager() 227 ProfileServiceManager::Initialize(*pimpl->dispatcher_); in Start() 229 IPowerManager::Initialize(*pimpl->dispatcher_); in Start() 236 pimpl->dispatcher_->PostTask(std::bind(&utility::StateMachine::ProcessMessage, &(pimpl->sysStateMachine_), msg)); in Start() 311 std::lock_guard<std::recursive_mutex> lock(pimpl->syncMutex_); in Stop() 312 pimpl->stopPromise_ = std::move(stopPromise); in Stop() 316 pimpl->dispatcher_->PostTask( in Stop() 317 std::bind(&utility::StateMachine::ProcessMessage, &(pimpl in Stop() [all...] |
H A D | adapter_config.cpp | 37 AdapterConfig::AdapterConfig() : pimpl(std::make_unique<impl>()) in AdapterConfig() 45 if (pimpl->parse_.Load(pimpl->filePath_)) { in Load() 51 return pimpl->parse_.Load(pimpl->filePath_); in Load() 57 std::ifstream fin(pimpl->fileBasePath_, std::ios::in | std::ios::binary); in Reload() 61 std::ofstream fout(pimpl->filePath_, std::ios::out | std::ios::trunc); in Reload() 71 return pimpl->parse_.GetValue(section, property, value); in GetValue() 75 return pimpl->parse_.GetValue(section, property, value); in GetValue() 79 return pimpl in GetValue() [all...] |
H A D | adapter_device_config.cpp | 44 AdapterDeviceConfig::AdapterDeviceConfig() : pimpl(std::make_unique<impl>()){}; in AdapterDeviceConfig() 52 if (pimpl->parse_.Load(pimpl->filePath_)) { in Load() 58 return pimpl->parse_.Load(pimpl->filePath_); in Load() 64 std::ifstream fin(pimpl->fileBasePath_, std::ios::in | std::ios::binary); in Reload() 68 std::ofstream fout(pimpl->filePath_, std::ios::out | std::ios::trunc); in Reload() 79 return pimpl->parse_.Save(); in Save() 85 return pimpl->parse_.SetValue(section, property, value); in SetValue() 91 return pimpl in SetValue() [all...] |
H A D | adapter_device_info.cpp | 44 AdapterDeviceInfo::AdapterDeviceInfo() : pimpl(std::make_unique<impl>()){}; in AdapterDeviceInfo() 52 if (pimpl->parse_.Load(pimpl->filePath_)) { in Load() 58 return pimpl->parse_.Load(pimpl->filePath_); in Load() 64 std::ifstream fin(pimpl->fileBasePath_, std::ios::in | std::ios::binary); in Reload() 68 std::ofstream fout(pimpl->filePath_, std::ios::out | std::ios::trunc); in Reload() 79 return pimpl->parse_.GetValue(section, property, value); in GetValue() 85 return pimpl->parse_.GetValue(section, property, value); in GetValue() 91 return pimpl in GetValue() [all...] |
/foundation/communication/bluetooth_service/services/bluetooth/service/src/util/ |
H A D | xml_parse.cpp | 246 XmlParse::XmlParse() : pimpl() in XmlParse() 248 pimpl = std::make_unique<impl>(); in XmlParse() 249 pimpl->doc_ = NULL; in XmlParse() 254 xmlFreeDoc(pimpl->doc_); in ~XmlParse() 265 if (pimpl->doc_ != NULL) { in Parse() 266 xmlFreeDoc(pimpl->doc_); in Parse() 268 pimpl->doc_ = xmlReadFile(this->filePath_.c_str(), "UTF-8", XML_PARSE_NOBLANKS); in Parse() 269 if (pimpl->doc_ == NULL) { in Parse() 277 int result = xmlSaveFormatFileEnc(this->filePath_.c_str(), pimpl->doc_, "UTF-8", 1); in Save() 287 xmlNodePtr getPropertyNode = pimpl in GetValue() [all...] |