summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2006-09-29 20:41:26 +0000
committerMarcel Holtmann <marcel@holtmann.org>2006-09-29 20:41:26 +0000
commit25a54727617df3aa30aa52c4a1de662c3f012f74 (patch)
tree7de88b38d1b09baa513b84d673178d50173c2257
parent2819d47a0f1fe44e788392db1b7322d5ef7f7d1e (diff)
Update the test interface framework
-rw-r--r--hcid/dbus-test.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/hcid/dbus-test.c b/hcid/dbus-test.c
index 65389f39..d29012fe 100644
--- a/hcid/dbus-test.c
+++ b/hcid/dbus-test.c
@@ -33,7 +33,25 @@
#include "hcid.h"
#include "dbus.h"
-static DBusHandlerResult audit_device(DBusConnection *conn,
+static DBusHandlerResult audit_remote_device(DBusConnection *conn,
+ DBusMessage *msg, void *data)
+{
+ DBusMessage *reply;
+ const char *address;
+
+ if (!dbus_message_get_args(msg, NULL,
+ DBUS_TYPE_STRING, &address,
+ DBUS_TYPE_INVALID))
+ return error_invalid_arguments(conn, msg);
+
+ reply = dbus_message_new_method_return(msg);
+ if (!reply)
+ return DBUS_HANDLER_RESULT_NEED_MEMORY;
+
+ return send_reply_and_unref(conn, reply);
+}
+
+static DBusHandlerResult cancel_audit_remote_device(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBusMessage *reply;
@@ -52,7 +70,8 @@ static DBusHandlerResult audit_device(DBusConnection *conn,
}
static struct service_data methods[] = {
- { "AuditRemoteDevice", audit_device },
+ { "AuditRemoteDevice", audit_remote_device },
+ { "CancelAuditRemoteDevice", cancel_audit_remote_device },
{ NULL, NULL }
};