diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2014-05-16 00:18:55 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-05-22 17:36:31 +0200 |
commit | c5a592920fab217fdb3aaa897e68f5643de88dc4 (patch) | |
tree | 8621ff17093f6ef2851f54cd2581d72104a99a4c /src/sbus/sssd_dbus.h | |
parent | 5de968e80ade1c02d1907834dcff95e9fc9ad10a (diff) | |
download | sssd-c5a592920fab217fdb3aaa897e68f5643de88dc4.tar.gz sssd-c5a592920fab217fdb3aaa897e68f5643de88dc4.tar.xz sssd-c5a592920fab217fdb3aaa897e68f5643de88dc4.zip |
SBUS: Add several error constant definitions
Several error constants we use were added in later DBus versions. This
patch conditionally #defines them.
Reviewed-by: Stef Walter <stefw@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Diffstat (limited to 'src/sbus/sssd_dbus.h')
-rw-r--r-- | src/sbus/sssd_dbus.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/sbus/sssd_dbus.h b/src/sbus/sssd_dbus.h index 9c236479e..4ae64f054 100644 --- a/src/sbus/sssd_dbus.h +++ b/src/sbus/sssd_dbus.h @@ -30,6 +30,26 @@ struct sbus_request; #include <sys/types.h> #include "util/util.h" +/* Older platforms (such as RHEL-6) might not have these error constants + * defined */ +#ifndef DBUS_ERROR_UNKNOWN_INTERFACE +/** Interface you invoked a method on isn't known by the object. */ +#define DBUS_ERROR_UNKNOWN_INTERFACE \ + "org.freedesktop.DBus.Error.UnknownInterface" +#endif /* DBUS_ERROR_UNKNOWN_INTERFACE */ + +#ifndef DBUS_ERROR_UNKNOWN_PROPERTY +/** Property you tried to access isn't known by the object. */ +#define DBUS_ERROR_UNKNOWN_PROPERTY \ + "org.freedesktop.DBus.Error.UnknownProperty" +#endif /* DBUS_ERROR_UNKNOWN_PROPERTY */ + +#ifndef DBUS_ERROR_PROPERTY_READ_ONLY +/** Property you tried to set is read-only. */ +#define DBUS_ERROR_PROPERTY_READ_ONLY \ + "org.freedesktop.DBus.Error.PropertyReadOnly" +#endif /* DBUS_ERROR_PROPERTY_READ_ONLY */ + typedef int (*sbus_msg_handler_fn)(struct sbus_request *dbus_req, void *instance_data); |