From 0d526038144d38375bccfd8a21502b5176f64b35 Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Tue, 9 Sep 2008 15:01:31 -0300 Subject: Input: Minor cleanup --- input/device.h | 3 +++ input/manager.c | 3 --- input/manager.h | 3 --- input/server.c | 10 ++-------- input/server.h | 4 ++-- 5 files changed, 7 insertions(+), 16 deletions(-) (limited to 'input') diff --git a/input/device.h b/input/device.h index 030c75ad..b89a3302 100644 --- a/input/device.h +++ b/input/device.h @@ -21,6 +21,9 @@ * */ +#define HSP_HS_UUID "00001108-0000-1000-8000-00805F9B34FB" +#define HID_UUID "00001124-0000-1000-8000-00805f9b34fb" + #define L2CAP_PSM_HIDP_CTRL 0x11 #define L2CAP_PSM_HIDP_INTR 0x13 diff --git a/input/manager.c b/input/manager.c index 578d56e4..9e548369 100644 --- a/input/manager.c +++ b/input/manager.c @@ -29,20 +29,17 @@ #include #include -#include #include #include #include #include "logging.h" -#include "textfile.h" #include "../src/adapter.h" #include "../src/device.h" #include "device.h" #include "server.h" -#include "manager.h" static int idle_timeout = 0; diff --git a/input/manager.h b/input/manager.h index f50975c8..953095fd 100644 --- a/input/manager.h +++ b/input/manager.h @@ -21,8 +21,5 @@ * */ -#define HSP_HS_UUID "00001108-0000-1000-8000-00805F9B34FB" -#define HID_UUID "00001124-0000-1000-8000-00805f9b34fb" - int input_manager_init(DBusConnection *conn, GKeyFile *config); void input_manager_exit(void); diff --git a/input/server.c b/input/server.c index d097d26a..c0ed1f7a 100644 --- a/input/server.c +++ b/input/server.c @@ -28,9 +28,6 @@ #include #include -#include -#include -#include #include #include @@ -40,10 +37,8 @@ #include "adapter.h" #include "device.h" -#include "server.h" #include "glib-helper.h" -static const char *HID_UUID = "00001124-0000-1000-8000-00805f9b34fb"; static GSList *servers = NULL; struct server { bdaddr_t src; @@ -123,7 +118,7 @@ static void connect_event_cb(GIOChannel *chan, int err, const bdaddr_t *src, return; } -int server_start(bdaddr_t *src) +int server_start(const bdaddr_t *src) { struct server *server; GIOChannel *ctrl_io, *intr_io; @@ -143,7 +138,6 @@ int server_start(bdaddr_t *src) if (!intr_io) { error("Failed to listen on interrupt channel"); g_io_channel_unref(ctrl_io); - ctrl_io = NULL; return -1; } g_io_channel_set_close_on_unref(intr_io, TRUE); @@ -158,7 +152,7 @@ int server_start(bdaddr_t *src) return 0; } -void server_stop(bdaddr_t *src) +void server_stop(const bdaddr_t *src) { struct server *server; GSList *l; diff --git a/input/server.h b/input/server.h index 33a681c4..0ef7f5b7 100644 --- a/input/server.h +++ b/input/server.h @@ -21,5 +21,5 @@ * */ -int server_start(bdaddr_t *src); -void server_stop(bdaddr_t *src); +int server_start(const bdaddr_t *src); +void server_stop(const bdaddr_t *src); -- cgit