2006-08-06 16:16:50 +00:00
|
|
|
#ifndef foodbusutilhfoo
|
|
|
|
|
#define foodbusutilhfoo
|
|
|
|
|
|
|
|
|
|
/***
|
|
|
|
|
This file is part of PulseAudio.
|
2007-01-04 13:43:45 +00:00
|
|
|
|
2007-02-13 15:35:19 +00:00
|
|
|
Copyright 2006 Shams E. King
|
|
|
|
|
|
2006-08-06 16:16:50 +00:00
|
|
|
PulseAudio is free software; you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU Lesser General Public License as published
|
2009-03-03 20:23:02 +00:00
|
|
|
by the Free Software Foundation; either version 2.1 of the License,
|
2006-08-06 16:16:50 +00:00
|
|
|
or (at your option) any later version.
|
2007-01-04 13:43:45 +00:00
|
|
|
|
2006-08-06 16:16:50 +00:00
|
|
|
PulseAudio is distributed in the hope that it will be useful, but
|
|
|
|
|
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
|
|
|
|
2006-08-06 16:16:50 +00:00
|
|
|
You should have received a copy of the GNU Lesser General Public License
|
|
|
|
|
along with PulseAudio; if not, write to the Free Software
|
|
|
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
|
|
USA.
|
|
|
|
|
***/
|
|
|
|
|
|
|
|
|
|
#include <dbus/dbus.h>
|
|
|
|
|
|
2009-01-29 16:26:34 +01:00
|
|
|
#include <pulsecore/llist.h>
|
2009-03-19 01:35:02 +02:00
|
|
|
#include <pulse/mainloop-api.h>
|
2009-01-24 01:25:11 +01:00
|
|
|
|
2009-03-19 01:35:02 +02:00
|
|
|
/* A wrap connection is not shared or refcounted, it is available in client side */
|
|
|
|
|
typedef struct pa_dbus_wrap_connection pa_dbus_wrap_connection;
|
2006-08-06 16:16:50 +00:00
|
|
|
|
2009-04-05 02:13:43 +03:00
|
|
|
pa_dbus_wrap_connection* pa_dbus_wrap_connection_new(pa_mainloop_api *mainloop, pa_bool_t use_rtclock, DBusBusType type, DBusError *error);
|
2009-03-19 01:35:02 +02:00
|
|
|
void pa_dbus_wrap_connection_free(pa_dbus_wrap_connection* conn);
|
2006-08-06 16:16:50 +00:00
|
|
|
|
2009-03-19 01:35:02 +02:00
|
|
|
DBusConnection* pa_dbus_wrap_connection_get(pa_dbus_wrap_connection *conn);
|
2006-08-06 16:16:50 +00:00
|
|
|
|
2009-01-29 03:30:50 +01:00
|
|
|
int pa_dbus_add_matches(DBusConnection *c, DBusError *error, ...) PA_GCC_SENTINEL;
|
|
|
|
|
void pa_dbus_remove_matches(DBusConnection *c, ...) PA_GCC_SENTINEL;
|
|
|
|
|
|
2009-01-29 16:26:34 +01:00
|
|
|
typedef struct pa_dbus_pending pa_dbus_pending;
|
|
|
|
|
|
|
|
|
|
struct pa_dbus_pending {
|
2009-03-20 19:30:37 +01:00
|
|
|
DBusConnection *connection;
|
2009-01-29 16:26:34 +01:00
|
|
|
DBusMessage *message;
|
|
|
|
|
DBusPendingCall *pending;
|
|
|
|
|
|
|
|
|
|
void *context_data;
|
|
|
|
|
void *call_data;
|
|
|
|
|
|
|
|
|
|
PA_LLIST_FIELDS(pa_dbus_pending);
|
|
|
|
|
};
|
|
|
|
|
|
2009-03-20 19:30:37 +01:00
|
|
|
pa_dbus_pending *pa_dbus_pending_new(DBusConnection *c, DBusMessage *m, DBusPendingCall *pending, void *context_data, void *call_data);
|
2009-01-29 16:26:34 +01:00
|
|
|
void pa_dbus_pending_free(pa_dbus_pending *p);
|
|
|
|
|
|
|
|
|
|
/* Sync up a list of pa_dbus_pending_call objects */
|
|
|
|
|
void pa_dbus_sync_pending_list(pa_dbus_pending **p);
|
|
|
|
|
|
|
|
|
|
/* Free up a list of pa_dbus_pending_call objects */
|
|
|
|
|
void pa_dbus_free_pending_list(pa_dbus_pending **p);
|
|
|
|
|
|
2006-08-06 16:16:50 +00:00
|
|
|
#endif
|