pacemaker  2.0.4-2deceaa
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 (C) 2014-2016 Andrew Beekhof <andrew@beekhof.net>
3  *
4  * This source code is licensed under GNU Lesser General Public License
5  * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
6  */
7 
8 #ifndef PCMK_DBUS__H
9 # define PCMK_DBUS__H
10 
11 # include <dbus/dbus.h>
12 
13 # ifndef DBUS_TIMEOUT_USE_DEFAULT
14 # define DBUS_TIMEOUT_USE_DEFAULT -1
15 # endif
16 
17 G_GNUC_INTERNAL
18 DBusConnection *pcmk_dbus_connect(void);
19 
20 G_GNUC_INTERNAL
21 void pcmk_dbus_connection_setup_with_select(DBusConnection *c);
22 
23 G_GNUC_INTERNAL
24 void pcmk_dbus_disconnect(DBusConnection *connection);
25 
26 G_GNUC_INTERNAL
27 DBusPendingCall *pcmk_dbus_send(DBusMessage *msg, DBusConnection *connection,
28  void(*done)(DBusPendingCall *pending, void *user_data), void *user_data, int timeout);
29 
30 G_GNUC_INTERNAL
31 DBusMessage *pcmk_dbus_send_recv(DBusMessage *msg, DBusConnection *connection, DBusError *error, int timeout);
32 
33 G_GNUC_INTERNAL
34 bool pcmk_dbus_type_check(DBusMessage *msg, DBusMessageIter *field, int expected, const char *function, int line);
35 
36 G_GNUC_INTERNAL
38  DBusConnection *connection, const char *target, const char *obj, const gchar * iface, const char *name,
39  void (*callback)(const char *name, const char *value, void *userdata), void *userdata,
40  DBusPendingCall **pending, int timeout);
41 
42 G_GNUC_INTERNAL
43 bool pcmk_dbus_find_error(DBusPendingCall *pending, DBusMessage *reply,
44  DBusError *error);
45 
46 #endif /* PCMK_DBUS__H */
void pcmk_dbus_disconnect(DBusConnection *connection)
Definition: dbus.c:55
void pcmk_dbus_connection_setup_with_select(DBusConnection *c)
Definition: dbus.c:654
bool pcmk_dbus_find_error(DBusPendingCall *pending, DBusMessage *reply, DBusError *ret)
Definition: dbus.c:76
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)
Definition: dbus.c:408
DBusPendingCall * pcmk_dbus_send(DBusMessage *msg, DBusConnection *connection, void(*done)(DBusPendingCall *pending, void *user_data), void *user_data, int timeout)
Definition: dbus.c:223
DBusConnection * pcmk_dbus_connect(void)
Definition: dbus.c:36
const char * target
Definition: pcmk_fence.c:28
bool pcmk_dbus_type_check(DBusMessage *msg, DBusMessageIter *field, int expected, const char *function, int line)
Definition: dbus.c:270
char * name
Definition: pcmk_fence.c:30
unsigned int timeout
Definition: pcmk_fence.c:31
DBusMessage * pcmk_dbus_send_recv(DBusMessage *msg, DBusConnection *connection, DBusError *error, int timeout)
Definition: dbus.c:159