Only handle register/unregister for now.
src/shared/mgmt.h src/shared/mgmt.c \
android/adapter.h android/adapter.c \
android/hid.h android/hid.c \
- android/ipc.h android/ipc.c
+ android/ipc.h android/ipc.c \
+ android/socket.h android/socket.c
android_bluetoothd_LDADD = lib/libbluetooth-internal.la @GLIB_LIBS@
log.c \
adapter.c \
hid.c \
+ socket.c \
ipc.c ipc.h \
../src/shared/mgmt.c \
../src/shared/util.c \
#include "src/shared/mgmt.h"
#include "adapter.h"
+#include "socket.h"
#include "hid.h"
#include "hal-msg.h"
#include "ipc.h"
goto error;
break;
+ case HAL_SERVICE_ID_SOCK:
+ if (!bt_socket_register(hal_notif_io,
+ bt_adapter_get_address()))
+ goto error;
+
+ break;
default:
DBG("service %u not supported", m->service_id);
goto error;
case HAL_SERVICE_ID_BLUETOOTH:
bt_adapter_unregister();
break;
+ case HAL_SERVICE_ID_SOCK:
+ bt_socket_unregister();
+ break;
default:
/* This would indicate bug in HAL, as unregister should not be
* called in init failed */
--- /dev/null
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2013 Intel Corporation. All rights reserved.
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include <glib.h>
+#include <stdbool.h>
+
+#include "lib/bluetooth.h"
+#include "log.h"
+#include "socket.h"
+
+bool bt_socket_register(GIOChannel *io, const bdaddr_t *addr)
+{
+ DBG("");
+
+ return true;
+}
+
+void bt_socket_unregister(void)
+{
+ DBG("");
+}
--- /dev/null
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2013 Intel Corporation. All rights reserved.
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+bool bt_socket_register(GIOChannel *io, const bdaddr_t *addr);
+void bt_socket_unregister(void);