diff options
| author | Marcel Holtmann <marcel@holtmann.org> | 2007-01-24 05:45:11 +0000 | 
|---|---|---|
| committer | Marcel Holtmann <marcel@holtmann.org> | 2007-01-24 05:45:11 +0000 | 
| commit | 398f6814486536e5906c3723f23cdae9e3c4642a (patch) | |
| tree | e7a903fdb04b88478eeeaa1d2534176f59449651 /input/input-service.c | |
| parent | 3021d8e125537fd3b14a5d50e0710bce17f8d198 (diff) | |
Add support for service debugging
Diffstat (limited to 'input/input-service.c')
| -rw-r--r-- | input/input-service.c | 29 | 
1 files changed, 29 insertions, 0 deletions
| diff --git a/input/input-service.c b/input/input-service.c index f5568bb4..11e060d2 100644 --- a/input/input-service.c +++ b/input/input-service.c @@ -1426,3 +1426,32 @@ void input_dbus_exit(void)  	dbus_connection_unref(connection);  } + +void internal_service(const char *identifier) +{ +	DBusMessage *msg, *reply; +	const char *name = "Input Service Debug", *desc = ""; + +	info("Registering service"); + +	msg = dbus_message_new_method_call("org.bluez", "/org/bluez", +				"org.bluez.Database", "RegisterService"); +	if (!msg) { +		error("Can't create service register method"); +		return; +	} + +	dbus_message_append_args(msg, DBUS_TYPE_STRING, &identifier, +				DBUS_TYPE_STRING, &name, +				DBUS_TYPE_STRING, &desc, DBUS_TYPE_INVALID); + +	reply = dbus_connection_send_with_reply_and_block(connection, msg, -1, NULL); +	if (!reply) { +		error("Can't register service"); +		return; +	} + +	dbus_message_unref(reply); + +	dbus_connection_flush(connection); +} | 
