pulse-server: make separate index

Separate the id (the pipewire object id) from the index (what we send to
the client to identify the objects).
This commit is contained in:
Wim Taymans 2022-01-17 11:28:40 +01:00
parent 955e4287ab
commit 0904a35ba8
19 changed files with 235 additions and 210 deletions

View file

@ -44,6 +44,7 @@ struct pw_manager_object;
struct selector {
bool (*type) (struct pw_manager_object *o);
uint32_t id;
uint32_t index;
const char *key;
const char *value;
void (*accumulate) (struct selector *sel, struct pw_manager_object *o);
@ -52,6 +53,7 @@ struct selector {
};
struct pw_manager_object *select_object(struct pw_manager *m, struct selector *s);
uint32_t id_to_index(struct pw_manager *m, uint32_t id);
void select_best(struct selector *s, struct pw_manager_object *o);
/* ========================================================================== */