Lines Matching refs:obj
157 struct bt_gatt_ots_object *obj = NULL; in ots_obj_name_write() local
188 rc = bt_gatt_ots_obj_manager_first_obj_get(ots->obj_manager, &obj); in ots_obj_name_write()
190 if (obj != ots->cur_obj && strcmp(name, obj->metadata.name) == 0) { in ots_obj_name_write()
194 rc = bt_gatt_ots_obj_manager_next_obj_get(ots->obj_manager, obj, &obj); in ots_obj_name_write()
300 struct bt_gatt_ots_object **obj) in bt_ots_obj_add_internal() argument
357 if (obj) { in bt_ots_obj_add_internal()
358 *obj = new_obj; in bt_ots_obj_add_internal()
368 struct bt_gatt_ots_object *obj; in bt_ots_obj_add() local
370 err = bt_ots_obj_add_internal(ots, NULL, param, &obj); in bt_ots_obj_add()
375 name_len = strlen(obj->metadata.name); in bt_ots_obj_add()
379 (void)bt_ots_obj_delete(ots, obj->id); in bt_ots_obj_add()
383 if (obj->metadata.size.cur > param->size) { in bt_ots_obj_add()
386 (void)bt_ots_obj_delete(ots, obj->id); in bt_ots_obj_add()
390 return obj->id; in bt_ots_obj_add()
396 struct bt_gatt_ots_object *obj; in bt_ots_obj_delete() local
404 err = bt_gatt_ots_obj_manager_obj_get(ots->obj_manager, id, &obj); in bt_ots_obj_delete()
409 if (obj->state.type != BT_GATT_OTS_OBJECT_IDLE_STATE) { in bt_ots_obj_delete()
420 err = ots->cb->obj_deleted(ots, NULL, obj->id); in bt_ots_obj_delete()
426 err = bt_gatt_ots_obj_manager_obj_delete(obj); in bt_ots_obj_delete()
431 if (ots->cur_obj == obj) { in bt_ots_obj_delete()
597 struct bt_gatt_ots_object *obj; in ots_delete_empty_name_objects() local
603 obj = next_obj; in ots_delete_empty_name_objects()
608 err = bt_gatt_ots_obj_manager_next_obj_get(ots->obj_manager, obj, &next_obj); in ots_delete_empty_name_objects()
610 if (strlen(obj->metadata.name) == 0) { in ots_delete_empty_name_objects()
611 bt_ots_obj_id_to_str(obj->id, id_str, sizeof(id_str)); in ots_delete_empty_name_objects()
615 ots->cb->obj_deleted(ots, conn, obj->id); in ots_delete_empty_name_objects()
618 if (bt_gatt_ots_obj_manager_obj_delete(obj)) { in ots_delete_empty_name_objects()