OSDN Git Service

time: Remove useless files
authorJohan Hedberg <johan.hedberg@intel.com>
Fri, 14 Dec 2012 10:54:31 +0000 (12:54 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Fri, 14 Dec 2012 10:57:52 +0000 (12:57 +0200)
Makefile.plugins
profiles/time/main.c [deleted file]
profiles/time/manager.c [deleted file]
profiles/time/manager.h [deleted file]
profiles/time/server.c
profiles/time/server.h [deleted file]

index aa5fe79..a4295fe 100644 (file)
@@ -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 (file)
index 08abed2..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- *
- *  BlueZ - Bluetooth protocol stack for Linux
- *
- *  Copyright (C) 2011  Nokia Corporation
- *  Copyright (C) 2011  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 <stdint.h>
-#include <glib.h>
-#include <errno.h>
-
-#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 (file)
index 608a807..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- *
- *  BlueZ - Bluetooth protocol stack for Linux
- *
- *  Copyright (C) 2012  Nokia Corporation
- *  Copyright (C) 2012  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 <stdbool.h>
-
-#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 (file)
index 74641d6..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- *
- *  BlueZ - Bluetooth protocol stack for Linux
- *
- *  Copyright (C) 2012  Nokia Corporation
- *  Copyright (C) 2012  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
- *
- */
-
-int time_manager_init(void);
-void time_manager_exit(void);
index 0a17b83..e1169bc 100644 (file)
@@ -36,6 +36,7 @@
 #include <adapter.h>
 #include <device.h>
 #include <profile.h>
+#include <plugin.h>
 
 #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
 #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 (file)
index 44e2f61..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *
- *  BlueZ - Bluetooth protocol stack for Linux
- *
- *  Copyright (C) 2011  Nokia Corporation
- *  Copyright (C) 2011  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
- *
- */
-
-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);