X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Fdbus-common.h;h=7294206bc42c317d84f97d131d873050e02e7859;hb=e98055de981b568c31f18f470181ae166b56f172;hp=9ae35df9c515376edc38756604f9d4f39e485b17;hpb=eecd1362f7f4de432483b5d77c56726c3621a83a;p=elogind.git diff --git a/src/shared/dbus-common.h b/src/shared/dbus-common.h index 9ae35df9c..7294206bc 100644 --- a/src/shared/dbus-common.h +++ b/src/shared/dbus-common.h @@ -1,7 +1,6 @@ /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ -#ifndef foodbuscommonhfoo -#define foodbuscommonhfoo +#pragma once /*** This file is part of systemd. @@ -205,4 +204,15 @@ DBusHandlerResult bus_exit_idle_filter(DBusConnection *bus, DBusMessage *m, void pid_t bus_get_unix_process_id(DBusConnection *connection, const char *name, DBusError *error); -#endif +bool bus_error_is_no_service(const DBusError *error); +int bus_method_call_with_reply(DBusConnection *bus, + const char *destination, + const char *path, + const char *interface, + const char *method, + DBusMessage **return_reply, + 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)))