summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-service.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2007-03-21 20:25:22 +0000
committerMarcel Holtmann <marcel@holtmann.org>2007-03-21 20:25:22 +0000
commitcf9b9a475788329f44c7e521d036ac647b56b8cb (patch)
tree11ceac8442993843587f51b7358dad04929ff1cb /hcid/dbus-service.c
parentbdbad0d759c9f5c8092afd2cac4e1a76722b4517 (diff)
Implement full Service.GetInfo() support
Diffstat (limited to 'hcid/dbus-service.c')
-rw-r--r--hcid/dbus-service.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/hcid/dbus-service.c b/hcid/dbus-service.c
index fc1592c1..fe4f24df 100644
--- a/hcid/dbus-service.c
+++ b/hcid/dbus-service.c
@@ -108,6 +108,7 @@ static DBusHandlerResult get_info(DBusConnection *conn,
DBusMessage *reply;
DBusMessageIter iter;
DBusMessageIter dict;
+ dbus_bool_t running;
reply = dbus_message_new_method_return(msg);
if (!reply)
@@ -120,9 +121,15 @@ static DBusHandlerResult get_info(DBusConnection *conn,
DBUS_TYPE_STRING_AS_STRING DBUS_TYPE_VARIANT_AS_STRING
DBUS_DICT_ENTRY_END_CHAR_AS_STRING, &dict);
- append_dict_entry(&dict, "identifier", DBUS_TYPE_STRING, service->ident);
+ append_dict_entry(&dict, "identifier", DBUS_TYPE_STRING, &service->ident);
+
+ append_dict_entry(&dict, "name", DBUS_TYPE_STRING, &service->name);
+
+ append_dict_entry(&dict, "description", DBUS_TYPE_STRING, &service->descr);
+
+ running = (service->external || service->bus_name) ? TRUE : FALSE;
- append_dict_entry(&dict, "name", DBUS_TYPE_STRING, service->name);
+ append_dict_entry(&dict, "running", DBUS_TYPE_BOOLEAN, &running);
dbus_message_iter_close_container(&iter, &dict);