pulse-server: add operation with custom callback

Add an operation with a custom callback when the roundtrip completed.
This commit is contained in:
Wim Taymans 2022-02-17 16:56:21 +01:00
parent ae14ef7a49
commit 7ddcc91461
2 changed files with 19 additions and 2 deletions

View file

@ -35,9 +35,14 @@ struct operation {
struct spa_list link;
struct client *client;
uint32_t tag;
void (*callback) (void *data, struct client *client, uint32_t tag);
void *data;
};
int operation_new(struct client *client, uint32_t tag);
int operation_new_cb(struct client *client, uint32_t tag,
void (*callback) (void *data, struct client *client, uint32_t tag),
void *data);
void operation_free(struct operation *o);
void operation_complete(struct operation *o);