-static pa_bool_t role_match(pa_proplist *proplist, const char *role) {
- const char *ir;
- char *r;
- const char *state = NULL;
-
- if (!(ir = pa_proplist_gets(proplist, PA_PROP_DEVICE_INTENDED_ROLES)))
- return FALSE;
-
- while ((r = pa_split_spaces(ir, &state))) {
-
- if (pa_streq(role, r)) {
- pa_xfree(r);
- return TRUE;
- }
-
- pa_xfree(r);
- }
-
- return FALSE;
-}
-