hooks: enforce version on hook emission

Pass the minimum required version to the hook emission and only call
events when the handler is recent enough.
Add some macros to make event emission easier to read.
This commit is contained in:
Wim Taymans 2018-08-01 21:41:25 +02:00
parent a72e3cefd7
commit a63523650d
27 changed files with 250 additions and 155 deletions

View file

@ -29,6 +29,8 @@ extern "C" {
struct pw_protocol_native_connection_events {
#define PW_VERSION_PROTOCOL_NATIVE_CONNECTION_EVENTS 0
uint32_t version;
void (*destroy) (void *data);
void (*error) (void *data, int error);