Mercurial > audlegacy-plugins
comparison src/bluetooth/agent.c @ 2867:dc22e3d2e56e
fixed bonding an allready bonded device bug
author | Paula Stanciu <paula.stanciu@gmail.com> |
---|---|
date | Thu, 07 Aug 2008 12:11:09 +0300 |
parents | 671cdfc2d62d |
children | 455e6e37feae |
comparison
equal
deleted
inserted
replaced
2863:dd8b44fbfd6f | 2867:dc22e3d2e56e |
---|---|
197 dbus_g_method_return(input->context, passkey); | 197 dbus_g_method_return(input->context, passkey); |
198 } else { | 198 } else { |
199 GError *error; | 199 GError *error; |
200 error = g_error_new(AGENT_ERROR, AGENT_ERROR_REJECT, | 200 error = g_error_new(AGENT_ERROR, AGENT_ERROR_REJECT, |
201 "Pairing request rejected"); | 201 "Pairing request rejected"); |
202 printf("passkey error\n"); | |
202 dbus_g_method_return_error(input->context, error); | 203 dbus_g_method_return_error(input->context, error); |
203 } | 204 } |
204 | 205 |
205 input_free(input); | 206 input_free(input); |
206 } | 207 } |
337 | 338 |
338 | 339 |
339 /* translators: Whether to grant access to a particular service | 340 /* translators: Whether to grant access to a particular service |
340 * to the device mentioned */ | 341 * to the device mentioned */ |
341 | 342 |
342 // g_signal_connect(G_OBJECT(dialog), "response", | 343 /* g_signal_connect(G_OBJECT(dialog), "response", |
343 // G_CALLBACK(auth_callback), input); | 344 G_CALLBACK(auth_callback), input); |
344 | 345 |
345 //enable_blinking(); | 346 enable_blinking(); |
347 */ | |
346 } | 348 } |
347 | 349 |
348 typedef struct { | 350 typedef struct { |
349 GObject parent; | 351 GObject parent; |
350 } PasskeyAgent; | 352 } PasskeyAgent; |
390 | 392 |
391 dbus_g_connection_register_g_object(connection, path, G_OBJECT(agent)); | 393 dbus_g_connection_register_g_object(connection, path, G_OBJECT(agent)); |
392 g_printf("new passkey agent \n"); | 394 g_printf("new passkey agent \n"); |
393 return agent; | 395 return agent; |
394 } | 396 } |
395 | |
396 | |
397 | |
398 static gboolean passkey_agent_request(PasskeyAgent *agent, | 397 static gboolean passkey_agent_request(PasskeyAgent *agent, |
399 const char *path, const char *address, | 398 const char *path, const char *address, |
400 DBusGMethodInvocation *context) | 399 DBusGMethodInvocation *context) |
401 { | 400 { |
402 printf("passkey_agent request\n"); | 401 printf("passkey_agent request\n"); |
814 device = g_strdup(address); | 813 device = g_strdup(address); |
815 | 814 |
816 text = g_strdup_printf(_("Removed bonding with %s"), device); | 815 text = g_strdup_printf(_("Removed bonding with %s"), device); |
817 | 816 |
818 g_free(device); | 817 g_free(device); |
818 printf("bonding removed"); | |
819 | 819 |
820 // show_notification(adapter ? adapter : _("Bluetooth device"), | 820 // show_notification(adapter ? adapter : _("Bluetooth device"), |
821 // text, NULL, 6000, NULL); | 821 // text, NULL, 6000, NULL); |
822 | 822 |
823 g_free(text); | 823 g_free(text); |