2006-02-16 23:11:28 +00:00
|
|
|
#ifndef foosubscribehfoo
|
|
|
|
|
#define foosubscribehfoo
|
2004-08-13 13:22:44 +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
|
2004-08-13 13:22:44 +00:00
|
|
|
by the Free Software Foundation; either version 2 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-08-13 13:22:44 +00:00
|
|
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
|
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 License
|
2006-06-19 21:53:48 +00:00
|
|
|
along with PulseAudio; if not, write to the Free Software
|
2004-08-13 13:22:44 +00:00
|
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
|
|
USA.
|
|
|
|
|
***/
|
|
|
|
|
|
2004-08-14 20:25:32 +00:00
|
|
|
#include <inttypes.h>
|
2004-08-13 13:22:44 +00:00
|
|
|
|
2006-06-19 21:53:48 +00:00
|
|
|
#include <pulse/def.h>
|
|
|
|
|
#include <pulse/context.h>
|
|
|
|
|
#include <pulse/cdecl.h>
|
2009-01-27 02:36:42 +01:00
|
|
|
#include <pulse/version.h>
|
2004-08-13 13:22:44 +00:00
|
|
|
|
2006-04-13 13:45:38 +00:00
|
|
|
/** \page subscribe Event Subscription
|
2006-04-09 19:31:09 +00:00
|
|
|
*
|
|
|
|
|
* \section overv_sec Overview
|
|
|
|
|
*
|
|
|
|
|
* The application can be notified, asynchronously, whenever the internal
|
|
|
|
|
* layout of the server changes. Possible notifications are desribed in the
|
|
|
|
|
* \ref pa_subscription_event_type and \ref pa_subscription_mask
|
|
|
|
|
* enumerations.
|
|
|
|
|
*
|
|
|
|
|
* The application sets the notification mask using pa_context_subscribe()
|
|
|
|
|
* and the function that will be called whenever a notification occurs using
|
|
|
|
|
* pa_context_set_subscribe_callback().
|
|
|
|
|
*/
|
|
|
|
|
|
2004-08-17 17:17:22 +00:00
|
|
|
/** \file
|
2006-04-09 19:31:09 +00:00
|
|
|
* Daemon introspection event subscription subsystem. */
|
2004-08-17 17:17:22 +00:00
|
|
|
|
2004-08-14 20:25:32 +00:00
|
|
|
PA_C_DECL_BEGIN
|
2004-08-13 13:22:44 +00:00
|
|
|
|
2006-02-20 17:09:39 +00:00
|
|
|
/** Subscription event callback prototype */
|
|
|
|
|
typedef void (*pa_context_subscribe_cb_t)(pa_context *c, pa_subscription_event_type_t t, uint32_t idx, void *userdata);
|
|
|
|
|
|
2004-08-17 17:17:22 +00:00
|
|
|
/** Enable event notification */
|
2006-02-20 17:09:39 +00:00
|
|
|
pa_operation* pa_context_subscribe(pa_context *c, pa_subscription_mask_t m, pa_context_success_cb_t cb, void *userdata);
|
2004-08-17 17:17:22 +00:00
|
|
|
|
|
|
|
|
/** Set the context specific call back function that is called whenever the state of the daemon changes */
|
2006-02-20 17:09:39 +00:00
|
|
|
void pa_context_set_subscribe_callback(pa_context *c, pa_context_subscribe_cb_t cb, void *userdata);
|
2004-08-13 13:22:44 +00:00
|
|
|
|
2004-08-14 20:25:32 +00:00
|
|
|
PA_C_DECL_END
|
2004-08-13 13:22:44 +00:00
|
|
|
|
|
|
|
|
#endif
|