diff options
Diffstat (limited to 'src/sbus/sssd_dbus.h')
-rw-r--r-- | src/sbus/sssd_dbus.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/sbus/sssd_dbus.h b/src/sbus/sssd_dbus.h index 3bf70c8cc..0fd499cbe 100644 --- a/src/sbus/sssd_dbus.h +++ b/src/sbus/sssd_dbus.h @@ -27,6 +27,7 @@ struct sbus_interface; struct sbus_request; #include <dbus/dbus.h> +#include "util/util.h" typedef int (*sbus_msg_handler_fn)(struct sbus_request *dbus_req, void *instance_data); @@ -253,6 +254,21 @@ int sbus_request_fail_and_finish(struct sbus_request *dbus_req, const DBusError *error); /* + * Construct a new DBusError instance which can be consumed by functions such + * as @sbus_request_fail_and_finish(). + * + * The @error is a string constant representing a DBus error as documented at + * http://dbus.freedesktop.org/doc/api/html/group__DBusProtocol.html. + * The parameter @err_msg is a human-readable error representation (or + * NULL for none). The returned DBusError is a talloc context and the err_msg + * is duplicated using the returned DBusError instance as a talloc parent. + */ +DBusError *sbus_error_new(TALLOC_CTX *mem_ctx, + const char *dbus_err_name, + const char *fmt, + ...) SSS_ATTRIBUTE_PRINTF(3,4); + +/* * Parse a DBus method call request. * * If parsing the method call message does not succeed, then an error is |