Lines Matching defs:p_list
316 tGATT_HDL_LIST_ELEM *p_list = NULL;
318 p_list = p_list_info->p_first;
320 while (p_list != NULL)
322 if (p_list->in_use && p_list->asgn_range.s_handle == handle)
324 return(p_list);
326 p_list = p_list->p_next;
344 tGATT_HDL_LIST_ELEM *p_list = NULL;
346 p_list = p_list_info->p_first;
348 while (p_list != NULL)
350 if ( gatt_uuid_compare (*p_app_uuid128, p_list->asgn_range.app_uuid128)
351 && gatt_uuid_compare (*p_svc_uuid, p_list->asgn_range.svc_uuid)
352 && (svc_inst == p_list->asgn_range.svc_inst) )
355 return(p_list);
357 p_list = p_list->p_next;
416 BOOLEAN gatt_is_last_attribute(tGATT_SRV_LIST_INFO *p_list, tGATT_SRV_LIST_ELEM *p_start, tBT_UUID value)
423 p_list->p_last_primary = NULL;
453 void gatt_update_last_pri_srv_info(tGATT_SRV_LIST_INFO *p_list)
455 tGATT_SRV_LIST_ELEM *p_srv= p_list->p_first;
457 p_list->p_last_primary = NULL;
463 p_list->p_last_primary = p_srv;
497 BOOLEAN gatt_add_a_srv_to_list(tGATT_SRV_LIST_INFO *p_list, tGATT_SRV_LIST_ELEM *p_new)
507 if (!p_list->p_first)
510 p_list->p_first =
511 p_list->p_last = p_new;
517 p_old = p_list->p_first;
522 p_list->p_last->p_next = p_new;
523 p_list->p_last;
525 p_list->p_last = p_new;
536 p_list->p_first = p_new;
547 p_list->count++;
549 gatt_update_last_pri_srv_info(p_list);
563 BOOLEAN gatt_remove_a_srv_from_list(tGATT_SRV_LIST_INFO *p_list, tGATT_SRV_LIST_ELEM *p_remove)
565 if (!p_remove || !p_list->p_first)
567 GATT_TRACE_DEBUG0("p_remove==NULL || p_list->p_first==NULL");
573 p_list->p_first = p_remove->p_next;
579 p_list->p_last = p_remove->p_prev;
587 p_list->count--;
588 gatt_update_last_pri_srv_info(p_list);
603 BOOLEAN gatt_add_an_item_to_list(tGATT_HDL_LIST_INFO *p_list, tGATT_HDL_LIST_ELEM *p_new)
612 if (!p_list->p_first)
615 p_list->p_first =
616 p_list->p_last = p_new;
622 p_old = p_list->p_first;
627 p_list->p_last->p_next = p_new;
628 p_new->p_prev = p_list->p_last;
630 p_list->p_last = p_new;
639 if (p_old == p_list->p_first)
640 p_list->p_first = p_new;
653 p_list->count++;
667 BOOLEAN gatt_remove_an_item_from_list(tGATT_HDL_LIST_INFO *p_list, tGATT_HDL_LIST_ELEM *p_remove)
669 if (!p_remove || !p_list->p_first)
671 GATT_TRACE_DEBUG0("p_remove==NULL || p_list->p_first==NULL");
677 p_list->p_first = p_remove->p_next;
683 p_list->p_last = p_remove->p_prev;
691 p_list->count--;
1261 UINT8 gatt_sr_alloc_rcb(tGATT_HDL_LIST_ELEM *p_list )
1274 memcpy (&p_sreg->app_uuid, &p_list->asgn_range.app_uuid128, sizeof(tBT_UUID));
1276 p_sreg->service_instance = p_list->asgn_range.svc_inst;
1277 p_sreg->type = p_list->asgn_range.is_primary ? GATT_UUID_PRI_SERVICE: GATT_UUID_SEC_SERVICE;
1278 p_sreg->s_hdl = p_list->asgn_range.s_handle;
1279 p_sreg->e_hdl = p_list->asgn_range.e_handle;
1280 p_sreg->p_db = &p_list->svc_db;