Diff between 28d3ed1ea79ba0b1a7ea9bcb16e6fe969d9fda71 and 8877f4c4f4d256883b25e2ee3176ab79436887d7

Changed Files

File Additions Deletions Status
Makefile.am +1 -0 modified
time/main.c +3 -3 modified
time/manager.c +40 -0 added
time/manager.h +26 -0 added

Full Patch

diff --git a/Makefile.am b/Makefile.am
index 5009ca8..05da00c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -224,6 +224,7 @@ builtin_sources += thermometer/main.c \
 			thermometer/thermometer.h thermometer/thermometer.c \
 			alert/main.c alert/server.h alert/server.c \
 			time/main.c time/server.h time/server.c \
+			time/manager.h time/manager.c \
 			plugins/gatt-example.c \
 			proximity/main.c proximity/manager.h proximity/manager.c \
 			proximity/monitor.h proximity/monitor.c \
diff --git a/time/main.c b/time/main.c
index d876725..9ef5bf1 100644
--- a/time/main.c
+++ b/time/main.c
@@ -33,7 +33,7 @@
 #include "plugin.h"
 #include "hcid.h"
 #include "log.h"
-#include "server.h"
+#include "manager.h"
 
 static int time_init(void)
 {
@@ -42,7 +42,7 @@ static int time_init(void)
 		return -ENOTSUP;
 	}
 
-	return time_server_init();
+	return time_manager_init();
 }
 
 static void time_exit(void)
@@ -50,7 +50,7 @@ static void time_exit(void)
 	if (!main_opts.gatt_enabled)
 		return;
 
-	time_server_exit();
+	time_manager_exit();
 }
 
 BLUETOOTH_PLUGIN_DEFINE(time, VERSION,
diff --git a/time/manager.c b/time/manager.c
new file mode 100644
index 0000000..5bda1a3
--- /dev/null
+++ b/time/manager.c
@@ -0,0 +1,40 @@
+/*
+ *
+ *  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 "manager.h"
+#include "server.h"
+
+int time_manager_init(void)
+{
+	return time_server_init();
+}
+
+void time_manager_exit(void)
+{
+	time_server_exit();
+}
diff --git a/time/manager.h b/time/manager.h
new file mode 100644
index 0000000..74641d6
--- /dev/null
+++ b/time/manager.h
@@ -0,0 +1,26 @@
+/*
+ *
+ *  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);