Lines Matching refs:obj
314 static struct obj_t obj = { variable
331 net_buf_simple_reset(obj.content); in setup_icon_object()
338 net_buf_simple_add_u8(obj.content, k); in setup_icon_object()
341 return obj.content->len; in setup_icon_object()
349 net_buf_simple_reset(obj.content); in setup_segments_object()
362 if (tot_size + seg_size > obj.content->size) { in setup_segments_object()
366 net_buf_simple_add_u8(obj.content, seg->name_len); in setup_segments_object()
367 net_buf_simple_add_mem(obj.content, seg->name, in setup_segments_object()
369 net_buf_simple_add_le32(obj.content, seg->pos); in setup_segments_object()
375 LOG_HEXDUMP_DBG(obj.content->data, obj.content->len, "Segments Object"); in setup_segments_object()
376 LOG_DBG("Segments object length: %d", obj.content->len); in setup_segments_object()
381 return obj.content->len; in setup_segments_object()
393 net_buf_simple_reset(obj.content); in setup_track_object()
400 net_buf_simple_add_u8(obj.content, k); in setup_track_object()
403 return obj.content->len; in setup_track_object()
421 net_buf_simple_reset(obj.content); in setup_parent_group_object()
428 while (group && (next_size <= obj.content->size)) { in setup_parent_group_object()
429 net_buf_simple_add_u8(obj.content, type); in setup_parent_group_object()
430 net_buf_simple_add_le48(obj.content, group->id); in setup_parent_group_object()
434 if (next_size > obj.content->size) { in setup_parent_group_object()
437 LOG_HEXDUMP_DBG(obj.content->data, obj.content->len, "Parent Group Object"); in setup_parent_group_object()
438 LOG_DBG("Group object length: %d", obj.content->len); in setup_parent_group_object()
440 return obj.content->len; in setup_parent_group_object()
453 net_buf_simple_reset(obj.content); in setup_group_object()
460 while (track && (next_size <= obj.content->size)) { in setup_group_object()
461 net_buf_simple_add_u8(obj.content, type); in setup_group_object()
462 net_buf_simple_add_le48(obj.content, track->id); in setup_group_object()
466 if (next_size > obj.content->size) { in setup_group_object()
469 LOG_HEXDUMP_DBG(obj.content->data, obj.content->len, "Group Object"); in setup_group_object()
470 LOG_DBG("Group object length: %d", obj.content->len); in setup_group_object()
472 return obj.content->len; in setup_group_object()
484 obj.add_type = MPL_OBJ_ICON; in add_icon_object()
485 obj.desc = &created_desc; in add_icon_object()
487 obj.desc->size.alloc = obj.desc->size.cur = setup_icon_object(); in add_icon_object()
488 obj.desc->name = icon_name; in add_icon_object()
489 BT_OTS_OBJ_SET_PROP_READ(obj.desc->props); in add_icon_object()
491 add_param.size = obj.desc->size.alloc; in add_icon_object()
513 obj.add_type = MPL_OBJ_TRACK_SEGMENTS; in add_current_track_segments_object()
514 obj.desc = &created_desc; in add_current_track_segments_object()
516 obj.desc->size.alloc = obj.desc->size.cur = setup_segments_object(pl->group->track); in add_current_track_segments_object()
517 obj.desc->name = pl->group->track->title; in add_current_track_segments_object()
518 BT_OTS_OBJ_SET_PROP_READ(obj.desc->props); in add_current_track_segments_object()
520 add_param.size = obj.desc->size.alloc; in add_current_track_segments_object()
547 obj.add_type = MPL_OBJ_TRACK; in add_track_object()
548 obj.add_track = track; in add_track_object()
549 obj.desc = &created_desc; in add_track_object()
551 obj.desc->size.alloc = obj.desc->size.cur = setup_track_object(track); in add_track_object()
552 obj.desc->name = track->title; in add_track_object()
553 BT_OTS_OBJ_SET_PROP_READ(obj.desc->props); in add_track_object()
555 add_param.size = obj.desc->size.alloc; in add_track_object()
577 obj.add_type = MPL_OBJ_PARENT_GROUP; in add_parent_group_object()
578 obj.desc = &created_desc; in add_parent_group_object()
580 obj.desc->size.alloc = obj.desc->size.cur = setup_parent_group_object(pl->group); in add_parent_group_object()
581 obj.desc->name = pl->group->parent->title; in add_parent_group_object()
582 BT_OTS_OBJ_SET_PROP_READ(obj.desc->props); in add_parent_group_object()
584 add_param.size = obj.desc->size.alloc; in add_parent_group_object()
611 obj.add_type = MPL_OBJ_GROUP; in add_group_object()
612 obj.add_group = group; in add_group_object()
613 obj.desc = &created_desc; in add_group_object()
615 obj.desc->size.alloc = obj.desc->size.cur = setup_group_object(group); in add_group_object()
616 obj.desc->name = group->title; in add_group_object()
617 BT_OTS_OBJ_SET_PROP_READ(obj.desc->props); in add_group_object()
619 add_param.size = obj.desc->size.alloc; in add_group_object()
703 if (atomic_test_and_set_bit(obj.flags, MPL_OBJ_FLAG_BUSY)) { in on_obj_selected()
737 atomic_clear_bit(obj.flags, MPL_OBJ_FLAG_BUSY); in on_obj_selected()
741 obj.selected_id = id; in on_obj_selected()
742 atomic_clear_bit(obj.flags, MPL_OBJ_FLAG_BUSY); in on_obj_selected()
753 *created_desc = *obj.desc; in on_obj_created()
757 if (obj.add_type == MPL_OBJ_ICON) { in on_obj_created()
758 obj.add_type = MPL_OBJ_NONE; in on_obj_created()
767 if (obj.add_type == MPL_OBJ_TRACK_SEGMENTS) { in on_obj_created()
768 obj.add_type = MPL_OBJ_NONE; in on_obj_created()
777 if (obj.add_type == MPL_OBJ_TRACK) { in on_obj_created()
778 obj.add_type = MPL_OBJ_NONE; in on_obj_created()
779 obj.add_track->id = id; in on_obj_created()
780 obj.add_track = NULL; in on_obj_created()
788 if (obj.add_type == MPL_OBJ_PARENT_GROUP) { in on_obj_created()
790 obj.add_type = MPL_OBJ_NONE; in on_obj_created()
792 } else if (obj.add_type == MPL_OBJ_GROUP) { in on_obj_created()
794 obj.add_type = MPL_OBJ_NONE; in on_obj_created()
795 obj.add_group->id = id; in on_obj_created()
796 obj.add_group = NULL; in on_obj_created()
812 if (atomic_test_and_set_bit(obj.flags, MPL_OBJ_FLAG_BUSY)) { in on_object_send()
825 if (id != obj.selected_id) { in on_object_send()
827 atomic_clear_bit(obj.flags, MPL_OBJ_FLAG_BUSY); in on_object_send()
833 atomic_clear_bit(obj.flags, MPL_OBJ_FLAG_BUSY); in on_object_send()
837 if (offset >= obj.content->len) { in on_object_send()
839 atomic_clear_bit(obj.flags, MPL_OBJ_FLAG_BUSY); in on_object_send()
844 if (len > obj.content->len - offset) { in on_object_send()
849 *data = &obj.content->data[offset]; in on_object_send()
850 atomic_clear_bit(obj.flags, MPL_OBJ_FLAG_BUSY); in on_object_send()
852 return MIN(len, obj.content->len - offset); in on_object_send()
2339 if (atomic_test_and_set_bit(obj.flags, MPL_OBJ_FLAG_BUSY)) { in media_proxy_pl_init()
2347 atomic_clear_bit(obj.flags, MPL_OBJ_FLAG_BUSY); in media_proxy_pl_init()
2365 net_buf_simple_init(obj.content, 0); in media_proxy_pl_init()
2371 atomic_clear_bit(obj.flags, MPL_OBJ_FLAG_BUSY); in media_proxy_pl_init()
2379 atomic_clear_bit(obj.flags, MPL_OBJ_FLAG_BUSY); in media_proxy_pl_init()
2389 atomic_clear_bit(obj.flags, MPL_OBJ_FLAG_BUSY); in media_proxy_pl_init()
2393 atomic_clear_bit(obj.flags, MPL_OBJ_FLAG_BUSY); in media_proxy_pl_init()