summaryrefslogtreecommitdiffstats
path: root/src/modules/dbus-util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/dbus-util.h')
-rw-r--r--src/modules/dbus-util.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/modules/dbus-util.h b/src/modules/dbus-util.h
index 0ab87809..fd974673 100644
--- a/src/modules/dbus-util.h
+++ b/src/modules/dbus-util.h
@@ -25,6 +25,7 @@
#include <dbus/dbus.h>
#include <pulsecore/core.h>
+#include <pulsecore/llist.h>
typedef struct pa_dbus_connection pa_dbus_connection;
@@ -40,4 +41,27 @@ void pa_dbus_connection_unref(pa_dbus_connection *conn);
int pa_dbus_add_matches(DBusConnection *c, DBusError *error, ...) PA_GCC_SENTINEL;
void pa_dbus_remove_matches(DBusConnection *c, ...) PA_GCC_SENTINEL;
+typedef struct pa_dbus_pending pa_dbus_pending;
+
+struct userdata; /* We leave the actual definition to the caller */
+
+struct pa_dbus_pending {
+ DBusMessage *message;
+ DBusPendingCall *pending;
+
+ void *context_data;
+ void *call_data;
+
+ PA_LLIST_FIELDS(pa_dbus_pending);
+};
+
+pa_dbus_pending *pa_dbus_pending_new(DBusMessage *m, DBusPendingCall *pending, void *context_data, void *call_data);
+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);
+
#endif