summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--acinclude.m412
-rw-r--r--common/Makefile.am13
-rw-r--r--common/hal-dummy.c47
-rw-r--r--common/hal-libhal.c149
-rw-r--r--common/hal.h35
-rw-r--r--configure.in1
-rw-r--r--daemon/Makefile.am2
-rw-r--r--daemon/hal-namespace.txt26
8 files changed, 4 insertions, 281 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 10643eed..d9af20b7 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -128,12 +128,6 @@ AC_DEFUN([AC_PATH_ALSA], [
AC_SUBST(ALSA_LIBS)
])
-AC_DEFUN([AC_PATH_HAL], [
- PKG_CHECK_MODULES(HAL, hal >= 0.5.8, hal_found=yes, hal_found=no)
- AC_SUBST(HAL_CFLAGS)
- AC_SUBST(HAL_LIBS)
-])
-
AC_DEFUN([AC_PATH_USB], [
PKG_CHECK_MODULES(USB, libusb, usb_found=yes, usb_found=no)
AC_SUBST(USB_CFLAGS)
@@ -161,7 +155,6 @@ AC_DEFUN([AC_ARG_BLUEZ], [
pie_enable=no
sndfile_enable=${sndfile_found}
inotify_enable=${inotify_found}
- hal_enable=${hal_found}
usb_enable=${usb_found}
alsa_enable=${alsa_found}
glib_enable=no
@@ -222,10 +215,6 @@ AC_DEFUN([AC_ARG_BLUEZ], [
inotify_enable=${enableval}
])
- AC_ARG_ENABLE(hal, AC_HELP_STRING([--enable-hal], [enable HAL support]), [
- hal_enable=${enableval}
- ])
-
AC_ARG_ENABLE(usb, AC_HELP_STRING([--enable-usb], [enable USB support]), [
usb_enable=${enableval}
])
@@ -355,7 +344,6 @@ AC_DEFUN([AC_ARG_BLUEZ], [
AM_CONDITIONAL(SNDFILE, test "${sndfile_enable}" = "yes" && test "${sndfile_found}" = "yes")
AM_CONDITIONAL(INOTIFY, test "${inotify_enable}" = "yes" && test "${inotify_found}" = "yes")
- AM_CONDITIONAL(HAL, test "${hal_enable}" = "yes" && test "${hal_found}" = "yes")
AM_CONDITIONAL(USB, test "${usb_enable}" = "yes" && test "${usb_found}" = "yes")
AM_CONDITIONAL(SBC, test "${alsa_enable}" = "yes" || test "${gstreamer_enable}" = "yes")
AM_CONDITIONAL(ALSA, test "${alsa_enable}" = "yes" && test "${alsa_found}" = "yes")
diff --git a/common/Makefile.am b/common/Makefile.am
index c231319b..7dac6b6a 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -1,10 +1,4 @@
-if HAL
-hal_sources = hal-libhal.c
-else
-hal_sources = hal-dummy.c
-endif
-
if INOTIFY
notify_sources = notify-inotify.c
else
@@ -16,8 +10,8 @@ noinst_LIBRARIES = libhelper.a
libhelper_a_SOURCES = oui.h oui.c dbus.h dbus.c \
textfile.h textfile.c logging.h logging.c \
dbus-helper.h dbus-helper.c error.h error.c \
- glib-helper.h glib-helper.c sdp-xml.h sdp-xml.c sdp-glib.c \
- hal.h $(hal_sources) notify.h $(notify_sources)
+ glib-helper.h glib-helper.c notify.h $(notify_sources) \
+ sdp-xml.h sdp-xml.c sdp-glib.c
noinst_PROGRAMS = test_textfile
@@ -25,7 +19,6 @@ test_textfile_LDADD = libhelper.a
AM_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@
-EXTRA_DIST = ppoll.h uinput.h hal-dummy.c hal-libhal.c \
- notify-dummy.c notify-inotify.c
+EXTRA_DIST = ppoll.h uinput.h notify-dummy.c notify-inotify.c
MAINTAINERCLEANFILES = Makefile.in
diff --git a/common/hal-dummy.c b/common/hal-dummy.c
deleted file mode 100644
index a049cda9..00000000
--- a/common/hal-dummy.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- *
- * BlueZ - Bluetooth protocol stack for Linux
- *
- * Copyright (C) 2006-2008 Marcel Holtmann <marcel@holtmann.org>
- *
- *
- * 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
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "hal.h"
-
-int hal_init(DBusConnection *conn)
-{
- return 0;
-}
-
-void hal_cleanup(void)
-{
-}
-
-int hal_create_device(struct hal_device *device)
-{
- return 0;
-}
-
-int hal_remove_device(struct hal_device *device)
-{
- return 0;
-}
diff --git a/common/hal-libhal.c b/common/hal-libhal.c
deleted file mode 100644
index 63b5677e..00000000
--- a/common/hal-libhal.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- *
- * BlueZ - Bluetooth protocol stack for Linux
- *
- * Copyright (C) 2006-2008 Marcel Holtmann <marcel@holtmann.org>
- *
- *
- * 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
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <errno.h>
-
-#include <dbus/dbus.h>
-#include <hal/libhal.h>
-
-#include "logging.h"
-#include "dbus.h"
-
-#include "hal.h"
-
-static LibHalContext *hal_ctx = NULL;
-
-static DBusHandlerResult filter_function(DBusConnection *connection,
- DBusMessage *message, void *userdata)
-{
- info("filter_function: sender=%s destination=%s obj_path=%s interface=%s method=%s",
- dbus_message_get_sender (message),
- dbus_message_get_destination (message),
- dbus_message_get_path (message),
- dbus_message_get_interface (message),
- dbus_message_get_member (message));
-
- return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
-}
-
-int hal_init(DBusConnection *conn)
-{
- hal_ctx = libhal_ctx_new();
- if (!hal_ctx)
- return -ENOMEM;
-
- dbus_connection_add_filter(conn, filter_function, NULL, NULL);
-
- if (libhal_ctx_set_dbus_connection(hal_ctx, conn) == FALSE) {
- error("Failed to connect HAL via system bus");
- libhal_ctx_free(hal_ctx);
- hal_ctx = NULL;
- return -EIO;
- }
-
- if (libhal_ctx_init(hal_ctx, NULL) == FALSE) {
- error("Unable to init HAL context");
- libhal_ctx_free(hal_ctx);
- hal_ctx = NULL;
- return -EIO;
- }
-
- return 0;
-}
-
-void hal_cleanup(void)
-{
- if (!hal_ctx)
- return;
-
- libhal_ctx_shutdown(hal_ctx, NULL);
-
- libhal_ctx_free(hal_ctx);
-
- hal_ctx = NULL;
-}
-
-int hal_create_device(struct hal_device *device)
-{
- DBusError err;
- char udi[128], *dev;
- char *str = "00000000-0000-1000-8000-00805f9b34fb";
-
- dev = libhal_new_device(hal_ctx, NULL);
-
- if (libhal_device_set_property_string(hal_ctx, dev,
- "bluetooth.uuid", str, NULL) == FALSE) {
- error("Failed to add UUID property");
- }
-
- if (libhal_device_set_property_bool(hal_ctx, dev,
- "bluetooth.is_connected", FALSE, NULL) == FALSE) {
- error("Failed to add connected state property");
- }
-
- if (libhal_device_add_capability(hal_ctx, dev,
- "bluetooth", NULL) == FALSE) {
- error("Failed to add device capability");
- }
-
- sprintf(udi, "/org/freedesktop/Hal/devices/bluetooth_test");
-
- dbus_error_init(&err);
- if (libhal_device_claim_interface(hal_ctx, dev,
- "org.freedesktop.Hal.Device.MyBluetooth",
- " <method name=\"Connect\">\n"
- " </method>\n"
- " <method name=\"Disconnect\">\n"
- " </method>\n",
- &err) == FALSE) {
- error("Failed to claim to interface: ", err.message);
- dbus_error_free(&err);
- }
-
- if (libhal_device_commit_to_gdl(hal_ctx, dev, udi, NULL) == FALSE) {
- error("Failed to create HAL device");
- }
-
- free(dev);
-
- return 0;
-}
-
-int hal_remove_device(struct hal_device *device)
-{
- char udi[128];
-
- sprintf(udi, "/org/freedesktop/Hal/devices/bluetooth_test");
-
- if (libhal_remove_device(hal_ctx, udi, NULL) == FALSE) {
- error("Failed to remove HAL device");
- }
-
- return 0;
-}
diff --git a/common/hal.h b/common/hal.h
deleted file mode 100644
index 075ceb17..00000000
--- a/common/hal.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *
- * BlueZ - Bluetooth protocol stack for Linux
- *
- * Copyright (C) 2006-2008 Marcel Holtmann <marcel@holtmann.org>
- *
- *
- * 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 <dbus/dbus.h>
-
-int hal_init(DBusConnection *conn);
-void hal_cleanup(void);
-
-struct hal_device {
- char *udi;
- char uuid[37];
-};
-
-int hal_create_device(struct hal_device *);
-int hal_remove_device(struct hal_device *);
diff --git a/configure.in b/configure.in
index df0da408..d5b5e542 100644
--- a/configure.in
+++ b/configure.in
@@ -30,7 +30,6 @@ AC_PATH_GMODULE
AC_PATH_DBUS
AC_PATH_ALSA
AC_PATH_GSTREAMER
-AC_PATH_HAL
AC_PATH_USB
AC_PATH_INOTIFY
AC_PATH_SNDFILE
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index 214b2449..8b2bba31 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -36,6 +36,6 @@ AM_CFLAGS = @BLUEZ_CFLAGS@ @DBUS_CFLAGS@ @GLIB_CFLAGS@
INCLUDES = -I$(top_srcdir)/common -I$(top_srcdir)/sdpd
EXTRA_DIST = bluetooth.conf echo.service \
- test-manager test-database hal-namespace.txt
+ test-manager test-database
MAINTAINERCLEANFILES = Makefile.in
diff --git a/daemon/hal-namespace.txt b/daemon/hal-namespace.txt
deleted file mode 100644
index 8e724838..00000000
--- a/daemon/hal-namespace.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-HAL namespace description for Bluetooth
-***************************************
-
-Copyright (C) 2006-2007 Marcel Holtmann <marcel@holtmann.org>
-
-
-bluetooth namespace
-===================
-
-bluetooth.uuid (string) Service or device UUID (128-bit)
-
-bluetooth.name (string) Service or device name
-
-bluetooth.description (string) Service or device description
-
-bluetooth.address (string) Remote device address
-
-bluetooth.is_connected (bool) Connection status of service or device
-
-
-bluetooth methods
-=================
-
-org.freedesktop.Hal.Device.Bluetooth.Connect Connect to service or device
-
-org.freedesktop.Hal.Device.Bluetooth.Disconnect Disconnect from service or device