[gnome-bluetooth] settings: Add warning when RequestPasskey is called



commit 50779f3368f4d70b28d238fc3fde584074f69bdb
Author: Bastien Nocera <hadess hadess net>
Date:   Fri May 13 11:27:20 2016 +0200

    settings: Add warning when RequestPasskey is called
    
    We should really implement it though.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=766364

 lib/bluetooth-settings-widget.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/lib/bluetooth-settings-widget.c b/lib/bluetooth-settings-widget.c
index a98da5e..fc23696 100644
--- a/lib/bluetooth-settings-widget.c
+++ b/lib/bluetooth-settings-widget.c
@@ -606,6 +606,17 @@ bail:
        g_free (name);
 }
 
+static void
+passkey_callback (GDBusMethodInvocation *invocation,
+                 GDBusProxy            *device,
+                 gpointer               data)
+{
+       g_warning ("RequestPasskey(): not implemented");
+       g_dbus_method_invocation_return_dbus_error (invocation,
+                                                   "org.bluez.Error.Rejected",
+                                                   "RequestPasskey not implemented");
+}
+
 static gboolean
 cancel_callback (GDBusMethodInvocation *invocation,
                 gpointer               user_data)
@@ -1803,6 +1814,7 @@ setup_pairing_agent (BluetoothSettingsWidget *self)
        g_object_add_weak_pointer (G_OBJECT (priv->agent), (gpointer *) (&priv->agent));
 
        bluetooth_agent_set_pincode_func (priv->agent, pincode_callback, self);
+       bluetooth_agent_set_passkey_func (priv->agent, passkey_callback, self);
        bluetooth_agent_set_display_func (priv->agent, display_callback, self);
        bluetooth_agent_set_display_pincode_func (priv->agent, display_pincode_callback, self);
        bluetooth_agent_set_cancel_func (priv->agent, cancel_callback, self);


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