milan-avb: mrp: expose applicant/registrar state accessors

This commit is contained in:
hackerman-kl 2026-04-25 07:44:43 +02:00 committed by Wim Taymans
parent ca039e5e25
commit e7f2fc9ab0
2 changed files with 15 additions and 0 deletions

View file

@ -361,6 +361,18 @@ void avb_mrp_attribute_add_listener(struct avb_mrp_attribute *attr, struct spa_h
spa_hook_list_append(&a->listener_list, listener, events, data);
}
uint8_t avb_mrp_attribute_get_applicant_state(const struct avb_mrp_attribute *attr)
{
const struct attribute *a = SPA_CONTAINER_OF(attr, const struct attribute, attr);
return a->applicant_state;
}
uint8_t avb_mrp_attribute_get_registrar_state(const struct avb_mrp_attribute *attr)
{
const struct attribute *a = SPA_CONTAINER_OF(attr, const struct attribute, attr);
return a->registrar_state;
}
void avb_mrp_attribute_update_state(struct avb_mrp_attribute *attr, uint64_t now,
int event)
{

View file

@ -134,6 +134,9 @@ void avb_mrp_attribute_leave(struct avb_mrp_attribute *attr, uint64_t now);
void avb_mrp_attribute_add_listener(struct avb_mrp_attribute *attr, struct spa_hook *listener,
const struct avb_mrp_attribute_events *events, void *data);
uint8_t avb_mrp_attribute_get_applicant_state(const struct avb_mrp_attribute *attr);
uint8_t avb_mrp_attribute_get_registrar_state(const struct avb_mrp_attribute *attr);
struct avb_mrp_parse_info {
#define AVB_VERSION_MRP_PARSE_INFO 0
uint32_t version;