chiark / gitweb /
dbus-common: Add helper method to handle no-reply messages
[elogind.git] / src / shared / dbus-common.h
index 7294206bc42c317d84f97d131d873050e02e7859..3b7ae16934546193af550307249407dc6d2ce24c 100644 (file)
@@ -22,6 +22,7 @@
 ***/
 
 #include <dbus/dbus.h>
+#include <inttypes.h>
 
 #ifndef DBUS_ERROR_UNKNOWN_OBJECT
 #define DBUS_ERROR_UNKNOWN_OBJECT "org.freedesktop.DBus.Error.UnknownObject"
@@ -112,6 +113,10 @@ typedef struct BusBoundProperties {
         const void *const base;          /* base pointer to which the offset must be added to reach data */
 } BusBoundProperties;
 
+dbus_bool_t bus_maybe_send_reply (DBusConnection   *c,
+                                  DBusMessage *message,
+                                  DBusMessage *reply);
+
 DBusHandlerResult bus_send_error_reply(
                 DBusConnection *c,
                 DBusMessage *message,
@@ -214,5 +219,8 @@ int bus_method_call_with_reply(DBusConnection *bus,
                                DBusError *return_error,
                                int first_arg_type, ...);
 
-void dbus_message_unref_p(DBusMessage **reply);
-#define _cleanup_dbus_msg_unref_ __attribute__((cleanup(dbus_message_unref_p)))
+const char *bus_message_get_sender_with_fallback(DBusMessage *m);
+
+void bus_message_unrefp(DBusMessage **reply);
+
+#define _cleanup_dbus_message_unref_ __attribute__((cleanup(bus_message_unrefp)))