pacemaker  2.1.3-ea053b43a
Scalable High-Availability cluster resource manager
Macros | Typedefs | Functions
dbus.c File Reference
#include <crm_internal.h>
#include <crm/crm.h>
#include <dbus/dbus.h>
#include <pcmk-dbus.h>
Include dependency graph for dbus.c:

Go to the source code of this file.

Macros

#define ERR_NO_REQUEST   "org.clusterlabs.pacemaker.NoRequest"
 
#define ERR_NO_REPLY   "org.clusterlabs.pacemaker.NoReply"
 
#define ERR_INVALID_REPLY   "org.clusterlabs.pacemaker.InvalidReply"
 
#define ERR_INVALID_REPLY_METHOD   "org.clusterlabs.pacemaker.InvalidReply.Method"
 
#define ERR_INVALID_REPLY_SIGNAL   "org.clusterlabs.pacemaker.InvalidReply.Signal"
 
#define ERR_INVALID_REPLY_TYPE   "org.clusterlabs.pacemaker.InvalidReply.Type"
 
#define ERR_SEND_FAILED   "org.clusterlabs.pacemaker.SendFailed"
 
#define BUS_PROPERTY_IFACE   "org.freedesktop.DBus.Properties"
 

Typedefs

typedef void(* property_callback_func) (const char *name, const char *value, void *userdata)
 

Functions

DBusConnection * pcmk_dbus_connect (void)
 
void pcmk_dbus_disconnect (DBusConnection *connection)
 
bool pcmk_dbus_find_error (DBusPendingCall *pending, DBusMessage *reply, DBusError *ret)
 
DBusMessage * pcmk_dbus_send_recv (DBusMessage *msg, DBusConnection *connection, DBusError *error, int timeout)
 
DBusPendingCall * pcmk_dbus_send (DBusMessage *msg, DBusConnection *connection, void(*done)(DBusPendingCall *pending, void *user_data), void *user_data, int timeout)
 
bool pcmk_dbus_type_check (DBusMessage *msg, DBusMessageIter *field, int expected, const char *function, int line)
 
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)
 

Macro Definition Documentation

◆ BUS_PROPERTY_IFACE

#define BUS_PROPERTY_IFACE   "org.freedesktop.DBus.Properties"

Definition at line 563 of file dbus.c.

◆ ERR_INVALID_REPLY

#define ERR_INVALID_REPLY   "org.clusterlabs.pacemaker.InvalidReply"

Definition at line 308 of file dbus.c.

◆ ERR_INVALID_REPLY_METHOD

#define ERR_INVALID_REPLY_METHOD   "org.clusterlabs.pacemaker.InvalidReply.Method"

Definition at line 309 of file dbus.c.

◆ ERR_INVALID_REPLY_SIGNAL

#define ERR_INVALID_REPLY_SIGNAL   "org.clusterlabs.pacemaker.InvalidReply.Signal"

Definition at line 310 of file dbus.c.

◆ ERR_INVALID_REPLY_TYPE

#define ERR_INVALID_REPLY_TYPE   "org.clusterlabs.pacemaker.InvalidReply.Type"

Definition at line 311 of file dbus.c.

◆ ERR_NO_REPLY

#define ERR_NO_REPLY   "org.clusterlabs.pacemaker.NoReply"

Definition at line 307 of file dbus.c.

◆ ERR_NO_REQUEST

#define ERR_NO_REQUEST   "org.clusterlabs.pacemaker.NoRequest"

Definition at line 306 of file dbus.c.

◆ ERR_SEND_FAILED

#define ERR_SEND_FAILED   "org.clusterlabs.pacemaker.SendFailed"

Definition at line 312 of file dbus.c.

Typedef Documentation

◆ property_callback_func

typedef void(* property_callback_func) (const char *name, const char *value, void *userdata)

Definition at line 566 of file dbus.c.

Function Documentation

◆ pcmk_dbus_connect()

DBusConnection* pcmk_dbus_connect ( void  )

Definition at line 259 of file dbus.c.

◆ pcmk_dbus_disconnect()

void pcmk_dbus_disconnect ( DBusConnection *  connection)

Definition at line 295 of file dbus.c.

◆ pcmk_dbus_find_error()

bool pcmk_dbus_find_error ( DBusPendingCall *  pending,
DBusMessage *  reply,
DBusError *  ret 
)

Definition at line 330 of file dbus.c.

◆ pcmk_dbus_get_property()

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 at line 693 of file dbus.c.

◆ pcmk_dbus_send()

DBusPendingCall* pcmk_dbus_send ( DBusMessage *  msg,
DBusConnection *  connection,
void(*)(DBusPendingCall *pending, void *user_data)  done,
void *  user_data,
int  timeout 
)

Definition at line 476 of file dbus.c.

◆ pcmk_dbus_send_recv()

DBusMessage* pcmk_dbus_send_recv ( DBusMessage *  msg,
DBusConnection *  connection,
DBusError *  error,
int  timeout 
)

Definition at line 412 of file dbus.c.

◆ pcmk_dbus_type_check()

bool pcmk_dbus_type_check ( DBusMessage *  msg,
DBusMessageIter *  field,
int  expected,
const char *  function,
int  line 
)

Definition at line 516 of file dbus.c.