2004-06-23 23:17:30 +00:00
|
|
|
#ifndef foopdispatchhfoo
|
|
|
|
|
#define foopdispatchhfoo
|
|
|
|
|
|
2004-07-16 19:56:36 +00:00
|
|
|
/***
|
2006-06-19 21:53:48 +00:00
|
|
|
This file is part of PulseAudio.
|
2007-01-04 13:43:45 +00:00
|
|
|
|
2007-02-13 15:35:19 +00:00
|
|
|
Copyright 2004-2006 Lennart Poettering
|
|
|
|
|
Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
|
|
|
|
|
|
2006-06-19 21:53:48 +00:00
|
|
|
PulseAudio is free software; you can redistribute it and/or modify
|
2004-11-14 14:58:54 +00:00
|
|
|
it under the terms of the GNU Lesser General Public License as
|
|
|
|
|
published by the Free Software Foundation; either version 2.1 of the
|
|
|
|
|
License, or (at your option) any later version.
|
2007-01-04 13:43:45 +00:00
|
|
|
|
2006-06-19 21:53:48 +00:00
|
|
|
PulseAudio is distributed in the hope that it will be useful, but
|
2004-07-16 19:56:36 +00:00
|
|
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2004-11-14 14:58:54 +00:00
|
|
|
Lesser General Public License for more details.
|
2007-01-04 13:43:45 +00:00
|
|
|
|
2004-11-14 14:58:54 +00:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
2006-06-19 21:53:48 +00:00
|
|
|
License along with PulseAudio; if not, write to the Free Software
|
2004-07-16 19:56:36 +00:00
|
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
|
|
USA.
|
|
|
|
|
***/
|
|
|
|
|
|
2004-06-23 23:17:30 +00:00
|
|
|
#include <inttypes.h>
|
2006-07-19 21:48:35 +00:00
|
|
|
|
2006-06-19 21:53:48 +00:00
|
|
|
#include <pulse/mainloop-api.h>
|
|
|
|
|
#include <pulse/def.h>
|
2006-07-19 21:48:35 +00:00
|
|
|
|
2006-06-19 21:53:48 +00:00
|
|
|
#include <pulsecore/tagstruct.h>
|
|
|
|
|
#include <pulsecore/packet.h>
|
2006-07-19 21:48:35 +00:00
|
|
|
#include <pulsecore/creds.h>
|
2006-07-19 17:44:19 +00:00
|
|
|
|
2006-01-11 01:17:39 +00:00
|
|
|
typedef struct pa_pdispatch pa_pdispatch;
|
2004-06-23 23:17:30 +00:00
|
|
|
|
2006-02-20 22:41:02 +00:00
|
|
|
typedef void (*pa_pdispatch_cb_t)(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
|
2006-02-24 15:12:42 +00:00
|
|
|
typedef void (*pa_pdispatch_drain_callback)(pa_pdispatch *pd, void *userdata);
|
2004-06-23 23:17:30 +00:00
|
|
|
|
2009-04-05 02:13:43 +03:00
|
|
|
pa_pdispatch* pa_pdispatch_new(pa_mainloop_api *m, pa_bool_t use_rtclock, const pa_pdispatch_cb_t*table, unsigned entries);
|
2006-01-11 01:17:39 +00:00
|
|
|
void pa_pdispatch_unref(pa_pdispatch *pd);
|
|
|
|
|
pa_pdispatch* pa_pdispatch_ref(pa_pdispatch *pd);
|
2004-06-23 23:17:30 +00:00
|
|
|
|
2006-07-19 21:48:35 +00:00
|
|
|
int pa_pdispatch_run(pa_pdispatch *pd, pa_packet*p, const pa_creds *creds, void *userdata);
|
2004-06-23 23:17:30 +00:00
|
|
|
|
2006-04-24 19:29:15 +00:00
|
|
|
void pa_pdispatch_register_reply(pa_pdispatch *pd, uint32_t tag, int timeout, pa_pdispatch_cb_t callback, void *userdata, pa_free_cb_t free_cb);
|
2004-07-07 00:22:46 +00:00
|
|
|
|
2006-01-11 01:17:39 +00:00
|
|
|
int pa_pdispatch_is_pending(pa_pdispatch *pd);
|
2004-07-07 00:22:46 +00:00
|
|
|
|
2006-01-11 01:17:39 +00:00
|
|
|
void pa_pdispatch_set_drain_callback(pa_pdispatch *pd, pa_pdispatch_drain_callback callback, void *userdata);
|
2004-06-23 23:17:30 +00:00
|
|
|
|
2004-07-07 22:02:15 +00:00
|
|
|
/* Remove all reply slots with the give userdata parameter */
|
2006-01-11 01:17:39 +00:00
|
|
|
void pa_pdispatch_unregister_reply(pa_pdispatch *pd, void *userdata);
|
2004-07-07 22:02:15 +00:00
|
|
|
|
2006-07-19 21:48:35 +00:00
|
|
|
const pa_creds * pa_pdispatch_creds(pa_pdispatch *pd);
|
2006-02-24 15:12:42 +00:00
|
|
|
|
2004-06-23 23:17:30 +00:00
|
|
|
#endif
|