pacemaker  2.1.0-7c3f660
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pcmk-dbus.h
Go to the documentation of this file.
1 /*
2  * Copyright 2014-2020 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_DBUS__H
11 # define PCMK_DBUS__H
12 
13 # include <dbus/dbus.h>
14 
15 # ifndef DBUS_TIMEOUT_USE_DEFAULT
16 # define DBUS_TIMEOUT_USE_DEFAULT -1
17 # endif
18 
19 G_GNUC_INTERNAL
20 DBusConnection *pcmk_dbus_connect(void);
21 
22 G_GNUC_INTERNAL
23 void pcmk_dbus_disconnect(DBusConnection *connection);
24 
25 G_GNUC_INTERNAL
26 DBusPendingCall *pcmk_dbus_send(DBusMessage *msg, DBusConnection *connection,
27  void(*done)(DBusPendingCall *pending, void *user_data), void *user_data, int timeout);
28 
29 G_GNUC_INTERNAL
30 DBusMessage *pcmk_dbus_send_recv(DBusMessage *msg, DBusConnection *connection, DBusError *error, int timeout);
31 
32 G_GNUC_INTERNAL
33 bool pcmk_dbus_type_check(DBusMessage *msg, DBusMessageIter *field, int expected, const char *function, int line);
34 
35 G_GNUC_INTERNAL
37  DBusConnection *connection, const char *target, const char *obj, const gchar * iface, const char *name,
38  void (*callback)(const char *name, const char *value, void *userdata), void *userdata,
39  DBusPendingCall **pending, int timeout);
40 
41 G_GNUC_INTERNAL
42 bool pcmk_dbus_find_error(DBusPendingCall *pending, DBusMessage *reply,
43  DBusError *error);
44 
45 #endif /* PCMK_DBUS__H */
void pcmk_dbus_disconnect(DBusConnection *connection)
Definition: dbus.c:296
bool pcmk_dbus_find_error(DBusPendingCall *pending, DBusMessage *reply, DBusError *ret)
Definition: dbus.c:331
DBusPendingCall * pcmk_dbus_send(DBusMessage *msg, DBusConnection *connection, void(*done)(DBusPendingCall *pending, void *user_data), void *user_data, int timeout)
Definition: dbus.c:477
DBusConnection * pcmk_dbus_connect(void)
Definition: dbus.c:260
const char * target
Definition: pcmk_fence.c:29
bool pcmk_dbus_type_check(DBusMessage *msg, DBusMessageIter *field, int expected, const char *function, int line)
Definition: dbus.c:517
char * pcmk_dbus_get_property(DBusConnection *connection, const char *target, const char *obj, const gchar *iface, const char *name, property_callback_func callback, void *userdata, DBusPendingCall **pending, int timeout)
Definition: dbus.c:694
char * name
Definition: pcmk_fence.c:31
unsigned int timeout
Definition: pcmk_fence.c:32
DBusMessage * pcmk_dbus_send_recv(DBusMessage *msg, DBusConnection *connection, DBusError *error, int timeout)
Definition: dbus.c:413