interfaces: add event to notify of global bound id

Make it possible to know when a proxy is bound to a global id before
the global shows up in the registry. This makes it possible to match
locally created objects to the one appearing in the registry and
possibly avoid a second bind.
This commit is contained in:
Wim Taymans 2019-11-28 11:50:17 +01:00
parent b264ef0772
commit f56e4dbc4d
8 changed files with 81 additions and 3 deletions

View file

@ -62,6 +62,7 @@ static void test_core_abi(void)
void (*ping) (void *object, uint32_t id, int seq);
void (*error) (void *object, uint32_t id, int seq, int res, const char *error);
void (*remove_id) (void *object, uint32_t id);
void (*bound_id) (void *object, uint32_t id, uint32_t global_id);
void (*add_mem) (void *object, uint32_t id, uint32_t type, int fd, uint32_t flags);
void (*remove_mem) (void *object, uint32_t id);
} events = { PW_VERSION_CORE_PROXY_EVENTS, };
@ -84,6 +85,7 @@ static void test_core_abi(void)
TEST_FUNC(e, events, ping);
TEST_FUNC(e, events, error);
TEST_FUNC(e, events, remove_id);
TEST_FUNC(e, events, bound_id);
TEST_FUNC(e, events, add_mem);
TEST_FUNC(e, events, remove_mem);
spa_assert(PW_VERSION_CORE_PROXY_EVENTS == 0);