summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'hcid/dbus-common.c')
-rw-r--r--hcid/dbus-common.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/hcid/dbus-common.c b/hcid/dbus-common.c
index dd46ccd8..9b60b8dd 100644
--- a/hcid/dbus-common.c
+++ b/hcid/dbus-common.c
@@ -287,6 +287,30 @@ int name_listener_remove(DBusConnection *connection, const char *name,
return 0;
}
+static char simple_xml[] = DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE "<node></node>";
+
+DBusHandlerResult simple_introspect(DBusConnection *conn, DBusMessage *msg, void *data)
+{
+ DBusMessage *reply;
+ const char *path, *ptr = simple_xml;
+
+ path = dbus_message_get_path(msg);
+
+ info("Introspect path:%s", path);
+
+ if (!dbus_message_has_signature(msg, DBUS_TYPE_INVALID_AS_STRING))
+ return error_invalid_arguments(conn, msg);
+
+ reply = dbus_message_new_method_return(msg);
+ if (!reply)
+ return DBUS_HANDLER_RESULT_NEED_MEMORY;
+
+ dbus_message_append_args(reply, DBUS_TYPE_STRING, &ptr,
+ DBUS_TYPE_INVALID);
+
+ return send_reply_and_unref(conn, reply);
+}
+
service_handler_func_t find_service_handler(struct service_data *handlers, DBusMessage *msg)
{
struct service_data *current;