From d335e3f5f4dd07b00d5ff87aebb05b543f35db8c Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 12 Mar 2008 00:02:25 +0000 Subject: Add skeleton for telephony abstraction --- hcid/Makefile.am | 3 ++- hcid/telephony.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ hcid/telephony.h | 26 ++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 hcid/telephony.c create mode 100644 hcid/telephony.h diff --git a/hcid/Makefile.am b/hcid/Makefile.am index cb6e6a8f..7ccc4b11 100644 --- a/hcid/Makefile.am +++ b/hcid/Makefile.am @@ -20,7 +20,8 @@ libhciserver_a_SOURCES = hcid.h security.c storage.c \ dbus-common.c dbus-common.h dbus-error.c dbus-error.h \ dbus-database.c dbus-database.h dbus-security.c dbus-security.h \ dbus-service.c dbus-service.h dbus-test.c dbus-test.h \ - dbus-hci.h dbus-hci.c dbus-sdp.c dbus-sdp.h + dbus-hci.h dbus-hci.c dbus-sdp.c dbus-sdp.h \ + telephony.h telephony.c if HCID sbin_PROGRAMS = hcid diff --git a/hcid/telephony.c b/hcid/telephony.c new file mode 100644 index 00000000..f68b97de --- /dev/null +++ b/hcid/telephony.c @@ -0,0 +1,44 @@ +/* + * + * BlueZ - Bluetooth protocol stack for Linux + * + * Copyright (C) 2004-2008 Marcel Holtmann + * + * + * 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 +#endif + +#include + +#include "telephony.h" + +static GSList *drivers = NULL; + +int bt_telephony_register_driver(struct bt_telephony_driver *driver) +{ + drivers = g_slist_append(drivers, driver); + + return 0; +} + +void bt_telephony_unregister_driver(struct bt_telephony_driver *driver) +{ + drivers = g_slist_remove(drivers, driver); +} diff --git a/hcid/telephony.h b/hcid/telephony.h new file mode 100644 index 00000000..b360a621 --- /dev/null +++ b/hcid/telephony.h @@ -0,0 +1,26 @@ +/* + * + * BlueZ - Bluetooth protocol stack for Linux + * + * Copyright (C) 2004-2008 Marcel Holtmann + * + * + * 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 + * + */ + +struct bt_telephony_driver { + const char *name; +}; -- cgit