From e1cbe31eaa4d1d687d6bbc87ab42c4bfa1b70c84 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 14 Dec 2012 13:02:22 +0200 Subject: [PATCH] alert: Remove useless files --- Makefile.plugins | 4 +--- profiles/alert/main.c | 50 ---------------------------------------- profiles/alert/manager.c | 40 -------------------------------- profiles/alert/manager.h | 26 --------------------- profiles/alert/server.c | 20 +++++++++++++--- profiles/alert/server.h | 26 --------------------- 6 files changed, 18 insertions(+), 148 deletions(-) delete mode 100644 profiles/alert/main.c delete mode 100644 profiles/alert/manager.c delete mode 100644 profiles/alert/manager.h delete mode 100644 profiles/alert/server.h diff --git a/Makefile.plugins b/Makefile.plugins index a4295fef1..ca3d4eae7 100644 --- a/Makefile.plugins +++ b/Makefile.plugins @@ -91,9 +91,7 @@ builtin_sources += profiles/deviceinfo/main.c \ if EXPERIMENTAL builtin_modules += alert -builtin_sources += profiles/alert/main.c profiles/alert/server.h \ - profiles/alert/server.c profiles/alert/manager.h \ - profiles/alert/manager.c +builtin_sources += profiles/alert/server.c builtin_modules += time builtin_sources += profiles/time/server.c diff --git a/profiles/alert/main.c b/profiles/alert/main.c deleted file mode 100644 index b9df0d4d6..000000000 --- a/profiles/alert/main.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * - * BlueZ - Bluetooth protocol stack for Linux - * - * Copyright (C) 2011 Nokia Corporation - * Copyright (C) 2011 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 -#include - -#include "plugin.h" -#include "hcid.h" -#include "log.h" -#include "manager.h" - -static int alert_init(void) -{ - return alert_manager_init(); -} - -static void alert_exit(void) -{ - alert_manager_exit(); -} - -BLUETOOTH_PLUGIN_DEFINE(alert, VERSION, - BLUETOOTH_PLUGIN_PRIORITY_DEFAULT, - alert_init, alert_exit) diff --git a/profiles/alert/manager.c b/profiles/alert/manager.c deleted file mode 100644 index eb2d62708..000000000 --- a/profiles/alert/manager.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * - * BlueZ - Bluetooth protocol stack for Linux - * - * Copyright (C) 2012 Nokia Corporation - * Copyright (C) 2012 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 "manager.h" -#include "server.h" - -int alert_manager_init(void) -{ - return alert_server_init(); -} - -void alert_manager_exit(void) -{ - alert_server_exit(); -} diff --git a/profiles/alert/manager.h b/profiles/alert/manager.h deleted file mode 100644 index e4c6bd026..000000000 --- a/profiles/alert/manager.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * - * BlueZ - Bluetooth protocol stack for Linux - * - * Copyright (C) 2012 Nokia Corporation - * Copyright (C) 2012 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 - * - */ - -int alert_manager_init(void); -void alert_manager_exit(void); diff --git a/profiles/alert/server.c b/profiles/alert/server.c index 2e8c452fa..8df469a2c 100644 --- a/profiles/alert/server.c +++ b/profiles/alert/server.c @@ -33,6 +33,7 @@ #include #include +#include "plugin.h" #include "dbus-common.h" #include "attrib/att.h" #include "adapter.h" @@ -43,7 +44,6 @@ #include "attrib/gattrib.h" #include "attrib-server.h" #include "attrib/gatt.h" -#include "server.h" #include "profile.h" #include "error.h" #include "textfile.h" @@ -974,7 +974,7 @@ static const GDBusMethodTable alert_methods[] = { { } }; -int alert_server_init(void) +static int alert_server_init(void) { if (!g_dbus_register_interface(btd_get_dbus_connection(), ALERT_OBJECT_PATH, ALERT_INTERFACE, @@ -990,10 +990,24 @@ int alert_server_init(void) return 0; } -void alert_server_exit(void) +static void alert_server_exit(void) { btd_profile_unregister(&alert_profile); g_dbus_unregister_interface(btd_get_dbus_connection(), ALERT_OBJECT_PATH, ALERT_INTERFACE); } + +static int alert_init(void) +{ + return alert_server_init(); +} + +static void alert_exit(void) +{ + alert_server_exit(); +} + +BLUETOOTH_PLUGIN_DEFINE(alert, VERSION, + BLUETOOTH_PLUGIN_PRIORITY_DEFAULT, + alert_init, alert_exit) diff --git a/profiles/alert/server.h b/profiles/alert/server.h deleted file mode 100644 index e59bdb174..000000000 --- a/profiles/alert/server.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * - * BlueZ - Bluetooth protocol stack for Linux - * - * Copyright (C) 2011 Nokia Corporation - * Copyright (C) 2011 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 - * - */ - -int alert_server_init(void); -void alert_server_exit(void); -- 2.47.3