X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fdbus.h;h=2aaeb4745ff776afd200a2e3f56cacca18cd2d14;hb=08672cb5071af320127f6fe8d0916f62bedd82f3;hp=7c0da3320b33714749db9ee17af8fb1b1aa79c5b;hpb=c4e2ceae941d02de5574becbfd3b4db15de2eda3;p=elogind.git diff --git a/src/dbus.h b/src/dbus.h index 7c0da3320..2aaeb4745 100644 --- a/src/dbus.h +++ b/src/dbus.h @@ -24,9 +24,18 @@ #include +#ifndef DBUS_ERROR_UNKNOWN_OBJECT +#define DBUS_ERROR_UNKNOWN_OBJECT "org.freedesktop.DBus.Error.UnknownObject" +#endif + +#ifndef DBUS_ERROR_UNKNOWN_INTERFACE +#define DBUS_ERROR_UNKNOWN_INTERFACE "org.freedesktop.DBus.Error.UnknownInterface" +#endif + #include "manager.h" typedef int (*BusPropertyCallback)(Manager *m, DBusMessageIter *iter, const char *property, void *data); +typedef int (*BusPropertySetCallback)(Manager *m, DBusMessageIter *iter, const char *property); typedef struct BusProperty { const char *interface; /* interface of the property */ @@ -34,6 +43,7 @@ typedef struct BusProperty { BusPropertyCallback append; /* Function that is called to serialize this property */ const char *signature; const void *data; /* The data of this property */ + BusPropertySetCallback set; /* Function that is called to set this property */ } BusProperty; #define BUS_PROPERTIES_INTERFACE \ @@ -47,6 +57,11 @@ typedef struct BusProperty { " \n" \ " \n" \ " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ " \n" \ " \n" \ " \n" \ @@ -69,7 +84,7 @@ typedef struct BusProperty { " \n" \ "\n" -int bus_init(Manager *m); +int bus_init(Manager *m, bool try_bus_connect); void bus_done(Manager *m); unsigned bus_dispatch(Manager *m);