summaryrefslogtreecommitdiffstats
path: root/src/pdispatch.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-07-07 00:22:46 +0000
committerLennart Poettering <lennart@poettering.net>2004-07-07 00:22:46 +0000
commite8d1185c4221fef9d712c1f375d8e592721b6943 (patch)
tree1fa6e0c9fb8543520f6223cc6fa23604c5cbccde /src/pdispatch.h
parentf8cbde54dab2783e2c6ba699dfaee9ef51b1e098 (diff)
draining ind native protocol
fixes in callback code on object destruction simple protocol git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@52 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pdispatch.h')
-rw-r--r--src/pdispatch.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/pdispatch.h b/src/pdispatch.h
index 73686700..35e93829 100644
--- a/src/pdispatch.h
+++ b/src/pdispatch.h
@@ -8,8 +8,10 @@
struct pa_pdispatch;
+/* It is safe to destroy the calling pdispatch object from all callbacks */
+
struct pa_pdispatch_command {
- int (*proc)(struct pa_pdispatch *pd, uint32_t command, uint32_t tag, struct pa_tagstruct *t, void *userdata);
+ void (*proc)(struct pa_pdispatch *pd, uint32_t command, uint32_t tag, struct pa_tagstruct *t, void *userdata);
};
struct pa_pdispatch* pa_pdispatch_new(struct pa_mainloop_api *m, const struct pa_pdispatch_command*table, unsigned entries);
@@ -17,6 +19,10 @@ void pa_pdispatch_free(struct pa_pdispatch *pd);
int pa_pdispatch_run(struct pa_pdispatch *pd, struct pa_packet*p, void *userdata);
-void pa_pdispatch_register_reply(struct pa_pdispatch *pd, uint32_t tag, int timeout, int (*cb)(struct pa_pdispatch *pd, uint32_t command, uint32_t tag, struct pa_tagstruct *t, void *userdata), void *userdata);
+void pa_pdispatch_register_reply(struct pa_pdispatch *pd, uint32_t tag, int timeout, void (*cb)(struct pa_pdispatch *pd, uint32_t command, uint32_t tag, struct pa_tagstruct *t, void *userdata), void *userdata);
+
+int pa_pdispatch_is_pending(struct pa_pdispatch *pd);
+
+void pa_pdispatch_set_drain_callback(struct pa_pdispatch *pd, void (*cb)(struct pa_pdispatch *pd, void *userdata), void *userdata);
#endif