diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 06:53:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 06:53:20 +0000 |
commit | e5a812082ae033afb1eed82c0f2df3d0f6bdc93f (patch) | |
tree | a6716c9275b4b413f6c9194798b34b91affb3cc7 /lib/services/pcmk-dbus.h | |
parent | Initial commit. (diff) | |
download | pacemaker-e5a812082ae033afb1eed82c0f2df3d0f6bdc93f.tar.xz pacemaker-e5a812082ae033afb1eed82c0f2df3d0f6bdc93f.zip |
Adding upstream version 2.1.6.upstream/2.1.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/services/pcmk-dbus.h')
-rw-r--r-- | lib/services/pcmk-dbus.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/lib/services/pcmk-dbus.h b/lib/services/pcmk-dbus.h new file mode 100644 index 0000000..a9d0cbc --- /dev/null +++ b/lib/services/pcmk-dbus.h @@ -0,0 +1,45 @@ +/* + * Copyright 2014-2022 the Pacemaker project contributors + * + * The version control history for this file may have further details. + * + * This source code is licensed under GNU Lesser General Public License + * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. + */ + +#ifndef PCMK_DBUS__H +# define PCMK_DBUS__H + +# include <dbus/dbus.h> + +# ifndef DBUS_TIMEOUT_USE_DEFAULT +# define DBUS_TIMEOUT_USE_DEFAULT -1 +# endif + +G_GNUC_INTERNAL +DBusConnection *pcmk_dbus_connect(void); + +G_GNUC_INTERNAL +void pcmk_dbus_disconnect(DBusConnection *connection); + +G_GNUC_INTERNAL +DBusPendingCall *pcmk_dbus_send(DBusMessage *msg, DBusConnection *connection, + void(*done)(DBusPendingCall *pending, void *user_data), void *user_data, int timeout); + +G_GNUC_INTERNAL +DBusMessage *pcmk_dbus_send_recv(DBusMessage *msg, DBusConnection *connection, DBusError *error, int timeout); + +G_GNUC_INTERNAL +bool pcmk_dbus_type_check(DBusMessage *msg, DBusMessageIter *field, int expected, const char *function, int line); + +G_GNUC_INTERNAL +char *pcmk_dbus_get_property( + DBusConnection *connection, const char *target, const char *obj, const gchar * iface, const char *name, + void (*callback)(const char *name, const char *value, void *userdata), void *userdata, + DBusPendingCall **pending, int timeout); + +G_GNUC_INTERNAL +bool pcmk_dbus_find_error(const DBusPendingCall *pending, DBusMessage *reply, + DBusError *error); + +#endif /* PCMK_DBUS__H */ |