summaryrefslogtreecommitdiffstats
path: root/src/pdispatch.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-06-23 23:17:30 +0000
committerLennart Poettering <lennart@poettering.net>2004-06-23 23:17:30 +0000
commitacb25b35102dfca08f66e155560f6c99cb8fa841 (patch)
tree2ae84c77727548a15eabbe5ad624dc1fd29af30b /src/pdispatch.h
parenteecf602476ff5b51bdc08f8fd0e4aa70d2b0ef5a (diff)
main part of the native protocol
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@31 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pdispatch.h')
-rw-r--r--src/pdispatch.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/pdispatch.h b/src/pdispatch.h
new file mode 100644
index 00000000..466da9a4
--- /dev/null
+++ b/src/pdispatch.h
@@ -0,0 +1,22 @@
+#ifndef foopdispatchhfoo
+#define foopdispatchhfoo
+
+#include <inttypes.h>
+#include "tagstruct.h"
+#include "packet.h"
+#include "mainloop-api.h"
+
+struct pdispatch;
+
+struct pdispatch_command {
+ int (*proc)(struct pdispatch *pd, uint32_t command, uint32_t tag, struct tagstruct *t, void *userdata);
+};
+
+struct pdispatch* pdispatch_new(struct pa_mainloop_api *m, const struct pdispatch_command*table, unsigned entries);
+void pdispatch_free(struct pdispatch *pd);
+
+int pdispatch_run(struct pdispatch *pd, struct packet*p, void *userdata);
+
+void pdispatch_register_reply(struct pdispatch *pd, uint32_t tag, int timeout, int (*cb)(struct pdispatch *pd, uint32_t command, uint32_t tag, struct tagstruct *t, void *userdata), void *userdata);
+
+#endif