]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/dbus-util.h
remap: Change remapping function argument type from void to int16_t / float as approp...
[pulseaudio] / src / pulsecore / dbus-util.h
index f35e66cb2dcee2ce3b120749ab532537478f3d1a..090a73f90e24f4c1cdc1bd71ac9712e78b6216a5 100644 (file)
 
 #include <dbus/dbus.h>
 
-#include <pulsecore/llist.h>
+#include <pulse/gccmacro.h>
 #include <pulse/mainloop-api.h>
 #include <pulse/proplist.h>
 
+#include <pulsecore/llist.h>
+
 /* A wrap connection is not shared or refcounted, it is available in client side */
 typedef struct pa_dbus_wrap_connection pa_dbus_wrap_connection;
 
-pa_dbus_wrap_connection* pa_dbus_wrap_connection_new(pa_mainloop_api *mainloop, pa_bool_t use_rtclock, DBusBusType type, DBusError *error);
+pa_dbus_wrap_connection* pa_dbus_wrap_connection_new(pa_mainloop_api *mainloop, bool use_rtclock, DBusBusType type, DBusError *error);
 pa_dbus_wrap_connection* pa_dbus_wrap_connection_new_from_existing(
         pa_mainloop_api *mainloop,
-        pa_bool_t use_rtclock,
+        bool use_rtclock,
         DBusConnection *conn);
 void pa_dbus_wrap_connection_free(pa_dbus_wrap_connection* conn);
 
@@ -65,6 +67,14 @@ 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);
 
+/* When receiving a DBusMessage with type DBUS_MESSAGE_TYPE_ERROR, the
+ * DBusMessage may or may not contain an error message (a human-readable
+ * explanation of what went wrong). Extracting the error message from the
+ * DBusMessage object is a bit tedious, so here's a helper function that does
+ * that. If the DBusMessage doesn't contain any error message,
+ * "<no explanation>" is returned. */
+const char *pa_dbus_get_error_message(DBusMessage *m);
+
 /* Sends an error message as the reply to the given message. */
 void pa_dbus_send_error(
         DBusConnection *c,