mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-18 10:19:24 +01:00
dbus: Add more error reporting functions
Report error for - invalid dbus arguments - if object already exists - if object is not found
This commit is contained in:
parent
5fb648d9fc
commit
0403be7fee
18
src/dbus.c
18
src/dbus.c
@ -102,6 +102,24 @@ struct l_dbus_message *dbus_error_not_available(struct l_dbus_message *msg)
|
||||
"Operation not available");
|
||||
}
|
||||
|
||||
struct l_dbus_message *dbus_error_invalid_args(struct l_dbus_message *msg)
|
||||
{
|
||||
return l_dbus_message_new_error(msg, IWD_SERVICE ".InvalidArgs",
|
||||
"Argument type is wrong");
|
||||
}
|
||||
|
||||
struct l_dbus_message *dbus_error_already_exists(struct l_dbus_message *msg)
|
||||
{
|
||||
return l_dbus_message_new_error(msg, IWD_SERVICE ".AlreadyExists",
|
||||
"Object already exists");
|
||||
}
|
||||
|
||||
struct l_dbus_message *dbus_error_not_found(struct l_dbus_message *msg)
|
||||
{
|
||||
return l_dbus_message_new_error(msg, IWD_SERVICE ".NotFound",
|
||||
"Object not found");
|
||||
}
|
||||
|
||||
void dbus_pending_reply(struct l_dbus_message **msg,
|
||||
struct l_dbus_message *reply)
|
||||
{
|
||||
|
@ -50,6 +50,9 @@ struct l_dbus_message *dbus_error_busy(struct l_dbus_message *msg);
|
||||
struct l_dbus_message *dbus_error_failed(struct l_dbus_message *msg);
|
||||
struct l_dbus_message *dbus_error_aborted(struct l_dbus_message *msg);
|
||||
struct l_dbus_message *dbus_error_not_available(struct l_dbus_message *msg);
|
||||
struct l_dbus_message *dbus_error_invalid_args(struct l_dbus_message *msg);
|
||||
struct l_dbus_message *dbus_error_already_exists(struct l_dbus_message *msg);
|
||||
struct l_dbus_message *dbus_error_not_found(struct l_dbus_message *msg);
|
||||
|
||||
bool dbus_init(bool enable_debug);
|
||||
bool dbus_exit(void);
|
||||
|
Loading…
Reference in New Issue
Block a user