Home | History | Annotate | Download | only in gatt

Lines Matching refs:service

87   for (const tBTA_GATTC_SERVICE& service : cache) {
88 LOG(ERROR) << "Service: s_handle=" << loghex(service.s_handle)
89 << ", e_handle=" << loghex(service.e_handle)
90 << ", inst=" << loghex(service.handle)
91 << ", uuid=" << service.uuid;
93 if (service.characteristics.empty()) {
98 for (const tBTA_GATTC_CHARACTERISTIC& c : service.characteristics) {
153 for (tBTA_GATTC_SERVICE& service : services) {
154 if (handle >= service.s_handle && handle <= service.e_handle)
155 return &service;
161 /** Add a service into GATT database */
166 VLOG(1) << "Add a service into GATT DB";
184 << ": Add a characteristic into service. handle:" << +value_handle
188 tBTA_GATTC_SERVICE* service =
190 if (!service) {
192 "service!";
200 if (service->e_handle < value_handle) service->e_handle = value_handle;
202 service->characteristics.emplace_back(
218 tBTA_GATTC_SERVICE* service =
220 if (!service) {
221 LOG(ERROR) << "Illegal action to add descriptor for non-existing service!";
225 if (service->characteristics.empty()) {
232 tBTA_GATTC_CHARACTERISTIC* char_node = &service->characteristics.front();
233 for (auto it = service->characteristics.begin();
234 it != service->characteristics.end(); it++) {
248 VLOG(1) << __func__ << ": add included service, handle=" << loghex(handle)
252 tBTA_GATTC_SERVICE* service =
254 if (!service) {
255 LOG(ERROR) << "Illegal action to add incl srvc for non-existing service!";
263 << ": Illegal action to add non-existing included service!";
267 service->included_svc.emplace_back(tBTA_GATTC_INCLUDED_SVC{
270 .owning_service = service,
275 /** Start primary service discovery */
297 // if there are more characteristics in the service
303 // end at the end of current service
315 /** process the service discovery complete event */
324 /* start expore a service if there is service not been explored */
326 auto& service = *p_srvc_cb->pending_service;
327 VLOG(1) << "Start service discovery";
330 tGATT_DISC_PARAM param = {.s_handle = service.s_handle,
331 .e_handle = service.e_handle};
336 /* no service found at all, the end of server discovery*/
366 /* all characteristic has been explored, start with next service if any */
377 LOG(ERROR) << "invalid included service s_handle=" << loghex(s_handle)
382 for (tBTA_GATTC_SERVICE& service : services) {
383 if (service.s_handle == s_handle || service.e_handle == e_handle)
404 LOG(ERROR) << "GATT service discovery is done on unknown connection";
411 /* find a service record, report it */
423 VLOG(1) << "Found ATT service uuid=" << service_uuid
430 /* discover services result, add services into a service list */
448 /* start discover primary service */
460 * Description Start DSP Service Discovert
508 /* discover services result, add services into a service list */
515 /* add included service into service list if it's secondary or it never
516 showed up in the primary service search */
575 auto& service = *p_srvc_cb->pending_service;
579 tGATT_DISC_PARAM param = {.s_handle = service.s_handle,
580 .e_handle = service.e_handle};
589 auto& service = *p_srvc_cb->pending_service;
590 if (!service.characteristics.empty()) {
592 p_srvc_cb->pending_char = service.characteristics.begin();
596 /* start next service */
608 /** search local cache for matching service record */
610 for (const tBTA_GATTC_SERVICE& service : p_clcb->p_srcb->srvc_cache) {
611 if (p_uuid && *p_uuid != service.uuid) continue;
614 VLOG(1) << __func__ << "found service " << service.uuid
615 << ", inst:" << +service.handle << " handle:" << +service.s_handle;
622 cb_data.srvc_res.service_uuid.inst_id = service.handle;
623 cb_data.srvc_res.service_uuid.uuid = service.uuid;
664 tBTA_GATTC_SERVICE* service =
667 if (!service) return NULL;
669 for (tBTA_GATTC_CHARACTERISTIC& charac : service->characteristics) {
688 const tBTA_GATTC_SERVICE* service =
691 if (!service) {
695 for (const tBTA_GATTC_CHARACTERISTIC& charac : service->characteristics) {
716 tBTA_GATTC_SERVICE* service =
719 if (!service) return NULL;
721 for (tBTA_GATTC_CHARACTERISTIC& charac : service->characteristics) {
775 for (const tBTA_GATTC_SERVICE& service : services) {
776 if (service.s_handle < start_handle) continue;
778 if (service.e_handle > end_handle) break;
782 for (const tBTA_GATTC_CHARACTERISTIC& charac : service.characteristics) {
788 db_size += service.included_svc.size();
829 for (const tBTA_GATTC_SERVICE& service : p_srvc_cb->srvc_cache) {
830 if (service.s_handle < start_handle) continue;
832 if (service.e_handle > end_handle) break;
835 service.is_primary ? BTGATT_DB_PRIMARY_SERVICE
837 0 /* att_handle */, service.s_handle,
838 service.e_handle, service.s_handle, service.uuid,
842 for (const tBTA_GATTC_CHARACTERISTIC& charac : service.characteristics) {
857 for (const tBTA_GATTC_INCLUDED_SVC& p_isvc : service.included_svc) {
988 for (const tBTA_GATTC_SERVICE& service : p_srvc_cb->srvc_cache) {
990 service.s_handle, service.e_handle, service.uuid,
992 service.is_primary);
995 for (const tBTA_GATTC_SERVICE& service : p_srvc_cb->srvc_cache) {
996 for (const tBTA_GATTC_CHARACTERISTIC& charac : service.characteristics) {
1008 for (const tBTA_GATTC_INCLUDED_SVC& p_isvc : service.included_svc) {