aboutsummaryrefslogtreecommitdiffstats
path: root/meta-ivi/recipes-connectivity/bluez5/bluez5/0001-plugins-Add-initial-code-for-service-plugin.patch
blob: 08a865176aa1105c7aeaf13237d51b638b7dc99f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
From 44c5dc231eb4ad036356d717c9948701227a673f Mon Sep 17 00:00:00 2001
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: Sun, 5 Jan 2014 18:02:56 +0200
Subject: [PATCH 01/12] plugins: Add initial code for service plugin

This plugin will be used to control services individually.
---
 Makefile.plugins  |  8 ++++++++
 configure.ac      |  4 ++++
 plugins/service.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 56 insertions(+)
 create mode 100644 plugins/service.c

diff --git a/Makefile.plugins b/Makefile.plugins
index 3ab7c1c18..8c707252e 100644
--- a/Makefile.plugins
+++ b/Makefile.plugins
@@ -110,3 +110,11 @@ plugins_sixaxis_la_LDFLAGS = $(AM_LDFLAGS) -module -avoid-version \
 						-no-undefined @UDEV_LIBS@
 plugins_sixaxis_la_CFLAGS = $(AM_CFLAGS) -fvisibility=hidden @UDEV_CFLAGS@
 endif
+
+if SERVICE
+plugin_LTLIBRARIES += plugins/service.la
+plugins_service_la_SOURCES = plugins/service.c
+plugins_service_la_LDFLAGS = $(AM_LDFLAGS) -module -avoid-version \
+                                           -no-undefined
+plugins_service_la_CFLAGS = $(AM_CFLAGS) -fvisibility=hidden
+endif
diff --git a/configure.ac b/configure.ac
index ec810fcf4..173b7f834 100644
--- a/configure.ac
+++ b/configure.ac
@@ -328,6 +328,10 @@ AC_ARG_ENABLE(sixaxis, AC_HELP_STRING([--enable-sixaxis],
 AM_CONDITIONAL(SIXAXIS, test "${enable_sixaxis}" = "yes" &&
 					 test "${enable_udev}" != "no")
 
+AC_ARG_ENABLE(service, AC_HELP_STRING([--enable-service],
+		[enable service plugin]), [enable_service=${enableval}])
+AM_CONDITIONAL(SERVICE, test "${enable_service}" = "yes")
+
 AC_ARG_ENABLE(logger, AC_HELP_STRING([--enable-logger],
 		[enable HCI logger service]), [enable_logger=${enableval}])
 AM_CONDITIONAL(LOGGER, test "${enable_logger}" = "yes")
diff --git a/plugins/service.c b/plugins/service.c
new file mode 100644
index 000000000..3a236dffe
--- /dev/null
+++ b/plugins/service.c
@@ -0,0 +1,44 @@
+/*
+ *
+ *  BlueZ - Bluetooth protocol stack for Linux
+ *
+ *  Copyright (C) 2014  Intel Corporation.
+ *
+ *
+ *  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 "src/plugin.h"
+#include "src/log.h"
+
+static int service_init(void)
+{
+	DBG("");
+
+	return 0;
+}
+
+static void service_exit(void)
+{
+	DBG("");
+}
+
+BLUETOOTH_PLUGIN_DEFINE(service, VERSION, BLUETOOTH_PLUGIN_PRIORITY_DEFAULT,
+			service_init, service_exit)
-- 
2.17.1