summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlisses Furquim <ulissesf@gmail.com>2006-11-01 17:13:17 +0000
committerUlisses Furquim <ulissesf@gmail.com>2006-11-01 17:13:17 +0000
commit66335427fb76c0f43b69cd77e74f0664b1119c04 (patch)
tree9b13451f3958bf43b6603dd8100410ebe100a1eb
parent001689d4b42a6fa28eb757347211544e127206a1 (diff)
Add Rejected error function and export others
-rw-r--r--hcid/dbus-error.c11
-rw-r--r--hcid/dbus-error.h3
2 files changed, 12 insertions, 2 deletions
diff --git a/hcid/dbus-error.c b/hcid/dbus-error.c
index b6cc86d0..4db8a8cf 100644
--- a/hcid/dbus-error.c
+++ b/hcid/dbus-error.c
@@ -78,6 +78,13 @@ DBusHandlerResult error_not_authorized(DBusConnection *conn, DBusMessage *msg)
"Not authorized"));
}
+DBusHandlerResult error_rejected(DBusConnection *conn, DBusMessage *msg)
+{
+ return send_message_and_unref(conn,
+ dbus_message_new_error(msg, ERROR_INTERFACE ".Rejected",
+ "Rejected"));
+}
+
DBusHandlerResult error_out_of_memory(DBusConnection *conn, DBusMessage *msg)
{
return send_message_and_unref(conn,
@@ -140,7 +147,7 @@ static DBusHandlerResult error_already_exists(DBusConnection *conn, DBusMessage
dbus_message_new_error(msg, ERROR_INTERFACE ".AlreadyExists", str));
}
-static DBusHandlerResult error_does_not_exist(DBusConnection *conn, DBusMessage *msg, const char *str)
+DBusHandlerResult error_does_not_exist(DBusConnection *conn, DBusMessage *msg, const char *str)
{
return send_message_and_unref(conn,
dbus_message_new_error(msg, ERROR_INTERFACE ".DoesNotExist", str));
@@ -152,7 +159,7 @@ static DBusHandlerResult error_in_progress(DBusConnection *conn, DBusMessage *ms
dbus_message_new_error(msg, ERROR_INTERFACE ".InProgress", str));
}
-static DBusHandlerResult error_canceled(DBusConnection *conn, DBusMessage *msg, const char *str)
+DBusHandlerResult error_canceled(DBusConnection *conn, DBusMessage *msg, const char *str)
{
return send_message_and_unref(conn,
dbus_message_new_error(msg, ERROR_INTERFACE ".Canceled", str));
diff --git a/hcid/dbus-error.h b/hcid/dbus-error.h
index 2ce50d68..92b4f47b 100644
--- a/hcid/dbus-error.h
+++ b/hcid/dbus-error.h
@@ -31,12 +31,15 @@ DBusHandlerResult error_not_ready(DBusConnection *conn, DBusMessage *msg);
DBusHandlerResult error_invalid_arguments(DBusConnection *conn, DBusMessage *msg);
DBusHandlerResult error_unknown_method(DBusConnection *conn, DBusMessage *msg);
DBusHandlerResult error_not_authorized(DBusConnection *conn, DBusMessage *msg);
+DBusHandlerResult error_rejected(DBusConnection *conn, DBusMessage *msg);
DBusHandlerResult error_out_of_memory(DBusConnection *conn, DBusMessage *msg);
DBusHandlerResult error_no_such_adapter(DBusConnection *conn, DBusMessage *msg);
DBusHandlerResult error_not_available(DBusConnection *conn, DBusMessage *msg);
DBusHandlerResult error_not_supported(DBusConnection *conn, DBusMessage *msg);
DBusHandlerResult error_request_deferred(DBusConnection *conn, DBusMessage *msg);
DBusHandlerResult error_not_connected(DBusConnection *conn, DBusMessage *msg);
+DBusHandlerResult error_does_not_exist(DBusConnection *conn, DBusMessage *msg, const char *str);
+DBusHandlerResult error_canceled(DBusConnection *conn, DBusMessage *msg, const char *str);
DBusHandlerResult error_not_in_progress(DBusConnection *conn, DBusMessage *msg, const char *str);
DBusHandlerResult error_unsupported_major_class(DBusConnection *conn, DBusMessage *msg);
DBusHandlerResult error_connection_attempt_failed(DBusConnection *conn, DBusMessage *msg, int err);