From: Johan Hedberg Date: Fri, 14 Dec 2012 10:54:31 +0000 (+0200) Subject: time: Remove useless files X-Git-Tag: android-x86-4.4-r3~10199 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=5be0c6f3b004cc1ff3c3950221375fb1af94bdac;p=android-x86%2Fexternal-bluetooth-bluez.git time: Remove useless files --- diff --git a/Makefile.plugins b/Makefile.plugins index aa5fe79be..a4295fef1 100644 --- a/Makefile.plugins +++ b/Makefile.plugins @@ -96,9 +96,7 @@ builtin_sources += profiles/alert/main.c profiles/alert/server.h \ profiles/alert/manager.c builtin_modules += time -builtin_sources += profiles/time/main.c profiles/time/server.h \ - profiles/time/server.c profiles/time/manager.c \ - profiles/time/manager.h +builtin_sources += profiles/time/server.c builtin_modules += proximity builtin_sources += profiles/proximity/main.c profiles/proximity/manager.h \ diff --git a/profiles/time/main.c b/profiles/time/main.c deleted file mode 100644 index 08abed222..000000000 --- a/profiles/time/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 time_init(void) -{ - return time_manager_init(); -} - -static void time_exit(void) -{ - time_manager_exit(); -} - -BLUETOOTH_PLUGIN_DEFINE(time, VERSION, - BLUETOOTH_PLUGIN_PRIORITY_DEFAULT, - time_init, time_exit) diff --git a/profiles/time/manager.c b/profiles/time/manager.c deleted file mode 100644 index 608a807be..000000000 --- a/profiles/time/manager.c +++ /dev/null @@ -1,53 +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 - -#include "manager.h" -#include "adapter.h" -#include "device.h" -#include "profile.h" -#include "server.h" - -struct btd_profile time_profile = { - .name = "gatt-time-server", - .adapter_probe = time_server_init, - .adapter_remove = time_server_exit, -}; - -int time_manager_init(void) -{ - btd_profile_register(&time_profile); - - return 0; -} - -void time_manager_exit(void) -{ - btd_profile_unregister(&time_profile); -} diff --git a/profiles/time/manager.h b/profiles/time/manager.h deleted file mode 100644 index 74641d63f..000000000 --- a/profiles/time/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 time_manager_init(void); -void time_manager_exit(void); diff --git a/profiles/time/server.c b/profiles/time/server.c index 0a17b83dc..e1169bcba 100644 --- a/profiles/time/server.c +++ b/profiles/time/server.c @@ -36,6 +36,7 @@ #include #include #include +#include #include "attrib/gattrib.h" #include "attrib/att.h" @@ -44,7 +45,6 @@ #include "attrib-server.h" #include "attrib/gatt-service.h" #include "log.h" -#include "server.h" #define CURRENT_TIME_SVC_UUID 0x1805 #define REF_TIME_UPDATE_SVC_UUID 0x1806 @@ -54,6 +54,25 @@ #define TIME_UPDATE_STAT_CHR_UUID 0x2A17 #define CT_TIME_CHR_UUID 0x2A2B +enum { + UPDATE_RESULT_SUCCESSFUL = 0, + UPDATE_RESULT_CANCELED = 1, + UPDATE_RESULT_NO_CONN = 2, + UPDATE_RESULT_ERROR = 3, + UPDATE_RESULT_TIMEOUT = 4, + UPDATE_RESULT_NOT_ATTEMPTED = 5, +}; + +enum { + UPDATE_STATE_IDLE = 0, + UPDATE_STATE_PENDING = 1, +}; + +enum { + GET_REFERENCE_UPDATE = 1, + CANCEL_REFERENCE_UPDATE = 2, +}; + static int encode_current_time(uint8_t value[10]) { struct timespec tp; @@ -212,7 +231,7 @@ static gboolean register_ref_time_update_service(struct btd_adapter *adapter) GATT_OPT_INVALID); } -int time_server_init(struct btd_profile *p, struct btd_adapter *adapter) +static int time_server_init(struct btd_profile *p, struct btd_adapter *adapter) { const char *path = adapter_get_path(adapter); @@ -231,9 +250,31 @@ int time_server_init(struct btd_profile *p, struct btd_adapter *adapter) return 0; } -void time_server_exit(struct btd_profile *p, struct btd_adapter *adapter) +static void time_server_exit(struct btd_profile *p, + struct btd_adapter *adapter) { const char *path = adapter_get_path(adapter); DBG("path %s", path); } + +struct btd_profile time_profile = { + .name = "gatt-time-server", + .adapter_probe = time_server_init, + .adapter_remove = time_server_exit, +}; + +static int time_init(void) +{ + btd_profile_register(&time_profile); + return 0; +} + +static void time_exit(void) +{ + btd_profile_unregister(&time_profile); +} + +BLUETOOTH_PLUGIN_DEFINE(time, VERSION, + BLUETOOTH_PLUGIN_PRIORITY_DEFAULT, + time_init, time_exit) diff --git a/profiles/time/server.h b/profiles/time/server.h deleted file mode 100644 index 44e2f61a9..000000000 --- a/profiles/time/server.h +++ /dev/null @@ -1,45 +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 - * - */ - -enum { - UPDATE_RESULT_SUCCESSFUL = 0, - UPDATE_RESULT_CANCELED = 1, - UPDATE_RESULT_NO_CONN = 2, - UPDATE_RESULT_ERROR = 3, - UPDATE_RESULT_TIMEOUT = 4, - UPDATE_RESULT_NOT_ATTEMPTED = 5, -}; - -enum { - UPDATE_STATE_IDLE = 0, - UPDATE_STATE_PENDING = 1, -}; - -enum { - GET_REFERENCE_UPDATE = 1, - CANCEL_REFERENCE_UPDATE = 2, -}; - -int time_server_init(struct btd_profile *p, struct btd_adapter *adapter); -void time_server_exit(struct btd_profile *p, struct btd_adapter *adapter);