[gnome-bluetooth] wizard: Add support for non-SSP keyboards



commit 9b00b66aecc507918bc6442f45b447c7a1c90b5e
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Nov 25 12:31:40 2013 +0100

    wizard: Add support for non-SSP keyboards
    
    Add support for pairing pre-Bluetooth 2.1 keyboards.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=712387

 wizard/main.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/wizard/main.c b/wizard/main.c
index 3b92557..f9a9c61 100644
--- a/wizard/main.c
+++ b/wizard/main.c
@@ -407,6 +407,21 @@ display_callback (GDBusMethodInvocation *invocation,
 }
 
 static gboolean
+display_pincode_callback (GDBusMethodInvocation *invocation,
+                         GDBusProxy *device,
+                         const char *pincode,
+                         gpointer user_data)
+{
+       GError *error;
+
+       error = g_error_new (AGENT_ERROR, AGENT_ERROR_REJECT,
+                            "Agent callback cancelled");
+       g_dbus_method_invocation_take_error (invocation, error);
+
+       return TRUE;
+}
+
+static gboolean
 cancel_callback (GDBusMethodInvocation *invocation,
                 gpointer user_data)
 {
@@ -1018,6 +1033,7 @@ int main (int argc, char **argv)
 
        bluetooth_agent_set_pincode_func(agent, pincode_callback, NULL);
        bluetooth_agent_set_display_func(agent, display_callback, NULL);
+       bluetooth_agent_set_display_pincode_func(agent, display_pincode_callback, NULL);
        bluetooth_agent_set_cancel_func(agent, cancel_callback, NULL);
        bluetooth_agent_set_confirm_func(agent, confirm_callback, NULL);
        bluetooth_agent_set_authorize_func(agent, authorize_callback, NULL);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]