- Update cable plugin for gudev changes

This commit is contained in:
Bastien Nocera 2009-09-16 10:07:26 +00:00
parent b454c9722a
commit b2b27334d6
2 changed files with 18 additions and 14 deletions

View File

@ -1,4 +1,4 @@
From 0f3b73be98d0f933970b87eda3fc6128de3788ab Mon Sep 17 00:00:00 2001 From 0cb2225079979cc3c85c02a981ebad7742c1ff72 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net> From: Bastien Nocera <hadess@hadess.net>
Date: Tue, 1 Sep 2009 17:32:48 +0100 Date: Tue, 1 Sep 2009 17:32:48 +0100
Subject: [PATCH] Add sixaxis cable-pairing plugin Subject: [PATCH] Add sixaxis cable-pairing plugin
@ -10,15 +10,15 @@ When a Sixaxis device is plugged in, events are filtered, and
the device is selected, poked around to set the default Bluetooth the device is selected, poked around to set the default Bluetooth
address, and added to the database of the current default adapter. address, and added to the database of the current default adapter.
--- ---
Makefile.am | 11 ++- Makefile.am | 9 ++
acinclude.m4 | 16 +++ acinclude.m4 | 16 +++
configure.ac | 1 + configure.ac | 1 +
plugins/cable.c | 361 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ plugins/cable.c | 362 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 388 insertions(+), 1 deletions(-) 4 files changed, 388 insertions(+), 0 deletions(-)
create mode 100644 plugins/cable.c create mode 100644 plugins/cable.c
diff --git a/Makefile.am b/Makefile.am diff --git a/Makefile.am b/Makefile.am
index 09eb7ec..cc8381e 100644 index 09eb7ec..ad6fe25 100644
--- a/Makefile.am --- a/Makefile.am
+++ b/Makefile.am +++ b/Makefile.am
@@ -162,6 +162,15 @@ builtin_modules += service @@ -162,6 +162,15 @@ builtin_modules += service
@ -104,10 +104,10 @@ index 9e5279d..8b17659 100644
diff --git a/plugins/cable.c b/plugins/cable.c diff --git a/plugins/cable.c b/plugins/cable.c
new file mode 100644 new file mode 100644
index 0000000..9179c62 index 0000000..6e81ba0
--- /dev/null --- /dev/null
+++ b/plugins/cable.c +++ b/plugins/cable.c
@@ -0,0 +1,361 @@ @@ -0,0 +1,362 @@
+/* +/*
+ * + *
+ * BlueZ - Bluetooth protocol stack for Linux + * BlueZ - Bluetooth protocol stack for Linux
@ -418,10 +418,11 @@ index 0000000..9179c62
+static gboolean device_event_idle(GUdevDevice *device) +static gboolean device_event_idle(GUdevDevice *device)
+{ +{
+ handle_device_plug(device); + handle_device_plug(device);
+ g_object_unref (device);
+ return FALSE; + return FALSE;
+} +}
+ +
+static void device_event_cb(GUdevClient *client, +static void uevent_cb(GUdevClient *client,
+ const char *action, + const char *action,
+ GUdevDevice *device, + GUdevDevice *device,
+ gpointer user_data) + gpointer user_data)
@ -450,8 +451,8 @@ index 0000000..9179c62
+ +
+ /* Listen for newly connected devices */ + /* Listen for newly connected devices */
+ g_signal_connect(G_OBJECT(client), + g_signal_connect(G_OBJECT(client),
+ "device-event", + "uevent",
+ G_CALLBACK(device_event_cb), + G_CALLBACK(uevent_cb),
+ NULL); + NULL);
+ +
+ return 0; + return 0;

View File

@ -1,7 +1,7 @@
Summary: Bluetooth utilities Summary: Bluetooth utilities
Name: bluez Name: bluez
Version: 4.53 Version: 4.53
Release: 1%{?dist} Release: 2%{?dist}
License: GPLv2+ License: GPLv2+
Group: Applications/System Group: Applications/System
Source: http://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.gz Source: http://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.gz
@ -271,6 +271,9 @@ fi
%config(noreplace) %{_sysconfdir}/sysconfig/pand %config(noreplace) %{_sysconfdir}/sysconfig/pand
%changelog %changelog
* Wed Sep 16 2009 Bastien Nocera <bnocera@redhat.com> 4.53-2
- Update cable plugin for gudev changes
* Thu Sep 10 2009 Bastien Nocera <bnocera@redhat.com> 4.53-1 * Thu Sep 10 2009 Bastien Nocera <bnocera@redhat.com> 4.53-1
- Update to 4.53 - Update to 4.53