diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2007-01-25 11:56:21 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2007-01-25 11:56:21 +0000 |
commit | 6df9fdf35996a69d5f711abb061c1671675872b0 (patch) | |
tree | cd6cdf3e2efc088901f53abcc73c46cf6c40bd70 /hcid/dbus-service.c | |
parent | e0f6cbcb6eb3bbb8a87a6c9c7cd7af8c61fb559e (diff) |
Implement Service.IsExternal method
Diffstat (limited to 'hcid/dbus-service.c')
-rw-r--r-- | hcid/dbus-service.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/hcid/dbus-service.c b/hcid/dbus-service.c index c6cc99f0..6ff18f2e 100644 --- a/hcid/dbus-service.c +++ b/hcid/dbus-service.c @@ -442,6 +442,23 @@ static DBusHandlerResult is_running(DBusConnection *conn, return send_message_and_unref(conn, reply); } +static DBusHandlerResult is_external(DBusConnection *conn, + DBusMessage *msg, void *data) +{ + struct service *service = data; + DBusMessage *reply; + + reply = dbus_message_new_method_return(msg); + if (!reply) + return DBUS_HANDLER_RESULT_NEED_MEMORY; + + dbus_message_append_args(reply, + DBUS_TYPE_BOOLEAN, &service->external, + DBUS_TYPE_INVALID); + + return send_message_and_unref(conn, reply); +} + static DBusHandlerResult list_users(DBusConnection *conn, DBusMessage *msg, void *data) { @@ -547,6 +564,7 @@ static struct service_data services_methods[] = { { "Start", start }, { "Stop", stop }, { "IsRunning", is_running }, + { "IsExternal", is_external }, { "ListUsers", list_users }, { "RemoveUser", remove_user }, { "SetTrusted", set_trusted }, |