diff options
author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2008-09-09 15:01:31 -0300 |
---|---|---|
committer | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2008-09-09 15:01:31 -0300 |
commit | 0d526038144d38375bccfd8a21502b5176f64b35 (patch) | |
tree | 13cee01f803f93d6aa9fd3b25426aa977974ad71 /input | |
parent | 9105da247571f84a1682c65749c379ebeb327290 (diff) |
Input: Minor cleanup
Diffstat (limited to 'input')
-rw-r--r-- | input/device.h | 3 | ||||
-rw-r--r-- | input/manager.c | 3 | ||||
-rw-r--r-- | input/manager.h | 3 | ||||
-rw-r--r-- | input/server.c | 10 | ||||
-rw-r--r-- | input/server.h | 4 |
5 files changed, 7 insertions, 16 deletions
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 <bluetooth/bluetooth.h> #include <bluetooth/hci.h> -#include <bluetooth/hidp.h> #include <bluetooth/sdp.h> #include <bluetooth/sdp_lib.h> #include <gdbus.h> #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 <unistd.h> #include <bluetooth/bluetooth.h> -#include <bluetooth/l2cap.h> -#include <bluetooth/hidp.h> -#include <bluetooth/hci.h> #include <bluetooth/sdp.h> #include <glib.h> @@ -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); |