2004-06-23 23:17:30 +00:00
|
|
|
#ifndef foopdispatchhfoo
|
|
|
|
|
#define foopdispatchhfoo
|
|
|
|
|
|
|
|
|
|
#include <inttypes.h>
|
|
|
|
|
#include "tagstruct.h"
|
|
|
|
|
#include "packet.h"
|
|
|
|
|
#include "mainloop-api.h"
|
|
|
|
|
|
2004-07-03 23:35:12 +00:00
|
|
|
struct pa_pdispatch;
|
2004-06-23 23:17:30 +00:00
|
|
|
|
2004-07-03 23:35:12 +00:00
|
|
|
struct pa_pdispatch_command {
|
|
|
|
|
int (*proc)(struct pa_pdispatch *pd, uint32_t command, uint32_t tag, struct pa_tagstruct *t, void *userdata);
|
2004-06-23 23:17:30 +00:00
|
|
|
};
|
|
|
|
|
|
2004-07-03 23:35:12 +00:00
|
|
|
struct pa_pdispatch* pa_pdispatch_new(struct pa_mainloop_api *m, const struct pa_pdispatch_command*table, unsigned entries);
|
|
|
|
|
void pa_pdispatch_free(struct pa_pdispatch *pd);
|
2004-06-23 23:17:30 +00:00
|
|
|
|
2004-07-03 23:35:12 +00:00
|
|
|
int pa_pdispatch_run(struct pa_pdispatch *pd, struct pa_packet*p, void *userdata);
|
2004-06-23 23:17:30 +00:00
|
|
|
|
2004-07-03 23:35:12 +00:00
|
|
|
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);
|
2004-06-23 23:17:30 +00:00
|
|
|
|
|
|
|
|
#endif
|