pacemaker 3.0.1-16e74fc4da
Scalable High-Availability cluster resource manager
Loading...
Searching...
No Matches
pcmk-dbus.h
Go to the documentation of this file.
1/*
2 * Copyright 2014-2024 the Pacemaker project contributors
3 *
4 * The version control history for this file may have further details.
5 *
6 * This source code is licensed under GNU Lesser General Public License
7 * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
8 */
9
10#ifndef PCMK__SERVICES_PCMK_DBUS__H
11#define PCMK__SERVICES_PCMK_DBUS__H
12
13#include <stdbool.h> // bool
14
15#include <dbus/dbus.h> // DBUS_TIMEOUT_USE_DEFAULT, DBusConnection, etc.
16#include <glib.h> // G_GNUC_INTERNAL, gchar
17
18#ifndef DBUS_TIMEOUT_USE_DEFAULT
19#define DBUS_TIMEOUT_USE_DEFAULT -1
20#endif
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26G_GNUC_INTERNAL
27DBusConnection *pcmk_dbus_connect(void);
28
29G_GNUC_INTERNAL
30void pcmk_dbus_disconnect(DBusConnection *connection);
31
32G_GNUC_INTERNAL
33DBusPendingCall *pcmk_dbus_send(DBusMessage *msg, DBusConnection *connection,
34 void(*done)(DBusPendingCall *pending, void *user_data), void *user_data, int timeout);
35
36G_GNUC_INTERNAL
37DBusMessage *pcmk_dbus_send_recv(DBusMessage *msg, DBusConnection *connection, DBusError *error, int timeout);
38
39G_GNUC_INTERNAL
40bool pcmk_dbus_type_check(DBusMessage *msg, DBusMessageIter *field, int expected, const char *function, int line);
41
42G_GNUC_INTERNAL
44 DBusConnection *connection, const char *target, const char *obj, const gchar * iface, const char *name,
45 void (*callback)(const char *name, const char *value, void *userdata), void *userdata,
46 DBusPendingCall **pending, int timeout);
47
48G_GNUC_INTERNAL
49bool pcmk_dbus_find_error(const DBusPendingCall *pending, DBusMessage *reply,
50 DBusError *error);
51
52#ifdef __cplusplus
53}
54#endif
55
56#endif // PCMK__SERVICES_PCMK_DBUS__H
const char * name
Definition cib.c:26
G_GNUC_INTERNAL DBusConnection * pcmk_dbus_connect(void)
Definition dbus.c:259
G_GNUC_INTERNAL DBusMessage * pcmk_dbus_send_recv(DBusMessage *msg, DBusConnection *connection, DBusError *error, int timeout)
Definition dbus.c:412
G_GNUC_INTERNAL bool pcmk_dbus_type_check(DBusMessage *msg, DBusMessageIter *field, int expected, const char *function, int line)
Definition dbus.c:516
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)
Definition dbus.c:330
G_GNUC_INTERNAL void pcmk_dbus_disconnect(DBusConnection *connection)
Definition dbus.c:295
G_GNUC_INTERNAL DBusPendingCall * pcmk_dbus_send(DBusMessage *msg, DBusConnection *connection, void(*done)(DBusPendingCall *pending, void *user_data), void *user_data, int timeout)
Definition dbus.c:476
unsigned int timeout
Definition pcmk_fence.c:34
const char * target
Definition pcmk_fence.c:31