Mercurial > audlegacy-plugins
diff src/bluetooth/agent.c @ 2840:50507763fd31
working basic pairing / bounding
author | Paula Stanciu <paula.stanciu@gmail.com> |
---|---|
date | Fri, 18 Jul 2008 11:46:56 +0300 |
parents | 22a5075fc7f7 |
children | 9637eab5a3dd |
line wrap: on
line diff
--- a/src/bluetooth/agent.c Wed Jul 16 20:57:17 2008 +0300 +++ b/src/bluetooth/agent.c Fri Jul 18 11:46:56 2008 +0300 @@ -54,7 +54,7 @@ agent_window = NULL; } -void run_agent() +void gui_agent() { if (!agent_window) { @@ -280,6 +280,8 @@ enable_blinking(); */ +printf("passkey callback\n"); +passkey_callback(GTK_RESPONSE_ACCEPT,input); } static void confirm_dialog(const char *path, const char *address, @@ -362,6 +364,7 @@ static void passkey_agent_init(PasskeyAgent *obj) { +g_printf("passkeyagent init\n"); } static void passkey_agent_class_init(PasskeyAgentClass *klass) @@ -381,7 +384,7 @@ agent = g_object_new(PASSKEY_AGENT_OBJECT_TYPE, NULL); dbus_g_connection_register_g_object(connection, path, G_OBJECT(agent)); - + g_printf("new passkey agent \n"); return agent; } @@ -391,7 +394,8 @@ const char *path, const char *address, DBusGMethodInvocation *context) { - DBusGProxy *object; + printf("passkey_agent request\n"); + DBusGProxy *object; const char *adapter = NULL, *name = NULL; gchar *device, *line; @@ -414,7 +418,7 @@ device = g_strdup(address); passkey_dialog(path, address, device, context); - + printf ("pairing request for device :%s",address); /* translators: this is a popup telling you a particular device * has asked for pairing */ line = g_strdup_printf(_("Pairing request for '%s'"), device); @@ -730,7 +734,7 @@ agent = auth_agent_new(AUTH_AGENT_PATH); - return 0; + return 0; } void cleanup_agents(void) @@ -742,7 +746,8 @@ void show_agents(void) { - //close_notification(); +printf("show_agents\n"); +//close_notification(); // g_list_foreach(input_list, show_dialog, NULL); @@ -753,3 +758,11 @@ { auto_authorize = value; } +void run_agents() +{ + setup_agents(bus); + + register_agents(); + +} +