diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2012-12-15 01:33:54 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2012-12-15 01:33:54 +0100 |
commit | 0ab621bb86df7097c06178bf091b768e5b2e7a2b (patch) | |
tree | 9f0fd9f0c4163bacaec1e9c78934baf364ff0473 /client | |
parent | d8d4b4f0c0ed5ddce7df3cf7ddad8322a9787c45 (diff) | |
download | bluez-0ab621bb86df7097c06178bf091b768e5b2e7a2b.tar.gz |
client: Use constants for agent path and interface strings
Diffstat (limited to 'client')
-rw-r--r-- | client/agent.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/client/agent.c b/client/agent.c index 0a82e2191..0deae1b5a 100644 --- a/client/agent.c +++ b/client/agent.c @@ -32,6 +32,9 @@ #include "display.h" #include "agent.h" +#define AGENT_PATH "/org/bluez/agent" +#define AGENT_INTERFACE "org.bluez.Agent1" + static gboolean agent_registered = FALSE; static DBusMessage *release_agent(DBusConnection *conn, @@ -39,8 +42,7 @@ static DBusMessage *release_agent(DBusConnection *conn, { agent_registered = FALSE; - g_dbus_unregister_interface(conn, "/org/bluez/agent", - "org.bluez.Agent1"); + g_dbus_unregister_interface(conn, AGENT_PATH, AGENT_INTERFACE); return dbus_message_new_method_return(msg); } @@ -57,8 +59,8 @@ void agent_register(DBusConnection *conn, GDBusProxy *manager) return; } - if (g_dbus_register_interface(conn, "/org/bluez/agent", - "org.bluez.Agent1", methods, + if (g_dbus_register_interface(conn, AGENT_PATH, + AGENT_INTERFACE, methods, NULL, NULL, NULL, NULL) == FALSE) { printf("Failed to register agent object\n"); return; @@ -74,8 +76,8 @@ void agent_unregister(DBusConnection *conn, GDBusProxy *manager) return; } - if (g_dbus_unregister_interface(conn, "/org/bluez/agent", - "org.bluez.Agent1") == FALSE) { + if (g_dbus_unregister_interface(conn, AGENT_PATH, + AGENT_INTERFACE) == FALSE) { printf("Failed to unregister agent object\n"); return; } |