root/lib/services/pcmk-dbus.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   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
  37 char *pcmk_dbus_get_property(
  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 */

/* [previous][next][first][last][top][bottom][index][help] */