diff options
author | Lennart Poettering <lennart@poettering.net> | 2004-06-14 20:30:50 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2004-06-14 20:30:50 +0000 |
commit | 5ce204829fe6706a5edaec50769abf7eed266656 (patch) | |
tree | da0930ee55ce9e99ecd8be799395221e112d2e3b /src/client.h | |
parent | c8cf0c1ce9cf1b38b302ae4a2a6fa798fef85f08 (diff) |
more cleanups
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@11 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/client.h')
-rw-r--r-- | src/client.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/client.h b/src/client.h index 7128a452..8d9e519c 100644 --- a/src/client.h +++ b/src/client.h @@ -9,13 +9,24 @@ struct client { const char *protocol_name; - void *userdata; - void (*kill)(struct client *c); + void *kill_userdata; + void (*kill)(struct client *c, void *userdata); struct core *core; }; struct client *client_new(struct core *c, const char *protocol_name, char *name); + +/* This function should be called only by the code that created the client */ void client_free(struct client *c); +/* The registrant of the client should call this function to set a + * callback function which is called when destruction of the client is + * requested */ +void client_set_kill_callback(struct client *c, void (*kill)(struct client *c, void *userdata), void *userdata); + +/* Code that didn't create the client should call this function to + * request destruction of the client */ +void client_kill(struct client *c); + #endif |