summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
authorEduardo Rocha <eduardo.rocha@openbossa.org>2006-03-21 18:59:22 +0000
committerEduardo Rocha <eduardo.rocha@openbossa.org>2006-03-21 18:59:22 +0000
commitb2b1d151eae38ccaf0e326ca382158c5d1f58ffb (patch)
treeeaf07293fcbf099b053982969bc047f232eac13e /hcid
parent7255e34fec1aaadccafa84e8897e8e9df2337387 (diff)
InterfaceVersion added.
Diffstat (limited to 'hcid')
-rw-r--r--hcid/dbus-manager.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/hcid/dbus-manager.c b/hcid/dbus-manager.c
index c6d3cc35..e9856bf2 100644
--- a/hcid/dbus-manager.c
+++ b/hcid/dbus-manager.c
@@ -39,6 +39,21 @@
#include "hcid.h"
#include "dbus.h"
+static DBusHandlerResult handle_mgr_interface_version_req(DBusConnection *conn, DBusMessage *msg, void *data)
+{
+ DBusMessage *reply;
+ dbus_uint32_t version = 0;
+
+ reply = dbus_message_new_method_return(msg);
+ if (!reply)
+ return error_out_of_memory(conn, msg);
+
+ dbus_message_append_args(reply, DBUS_TYPE_UINT32, &version,
+ DBUS_TYPE_INVALID);
+
+ return send_reply_and_unref(conn, reply);
+}
+
static DBusHandlerResult handle_mgr_list_devices_req(DBusConnection *conn, DBusMessage *msg, void *data)
{
DBusMessageIter iter;
@@ -128,8 +143,9 @@ static DBusHandlerResult handle_mgr_default_adapter_req(DBusConnection *conn, DB
}
static struct service_data mgr_services[] = {
- { "ListAdapters", handle_mgr_list_devices_req },
- { "DefaultAdapter", handle_mgr_default_adapter_req },
+ { "InterfaceVersion", handle_mgr_interface_version_req },
+ { "ListAdapters", handle_mgr_list_devices_req },
+ { "DefaultAdapter", handle_mgr_default_adapter_req },
{ NULL, NULL }
};