summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2007-03-09 15:33:38 +0000
committerMarcel Holtmann <marcel@holtmann.org>2007-03-09 15:33:38 +0000
commit3406c27e758f3dfa182f6fdfcc878bc3a53e3c98 (patch)
tree7342d8f0af4facc2407bd2253f8d4c82cc9702c1
parent6e3cd312032917facce3e8ef35812b713c16db2b (diff)
Add skeleton for network service
-rw-r--r--acinclude.m47
-rw-r--r--network/Makefile.am15
-rw-r--r--network/connection.c28
-rw-r--r--network/connection.h22
-rw-r--r--network/main.c2
-rw-r--r--network/manager.c28
-rw-r--r--network/manager.h22
-rw-r--r--network/server.c28
-rw-r--r--network/server.h22
9 files changed, 171 insertions, 3 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 58bf8637..d8fafb3e 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -150,6 +150,7 @@ AC_DEFUN([AC_ARG_BLUEZ], [
usb_enable=${usb_found}
glib_enable=no
obex_enable=${openobex_found}
+ network_enable=no
input_enable=no
sync_enable=no
echo_enable=no
@@ -181,6 +182,7 @@ AC_DEFUN([AC_ARG_BLUEZ], [
AC_ARG_ENABLE(all, AC_HELP_STRING([--enable-all], [enable all extra options below]), [
dbus_enable=${enableval}
obex_enable=${enableval}
+ network_enable=${enableval}
input_enable=${enableval}
sync_enable=${enableval}
echo_enable=${enableval}
@@ -218,6 +220,10 @@ AC_DEFUN([AC_ARG_BLUEZ], [
obex_enable=${enableval}
])
+ AC_ARG_ENABLE(network, AC_HELP_STRING([--enable-network], [enable network service]), [
+ network_enable=${enableval}
+ ])
+
AC_ARG_ENABLE(input, AC_HELP_STRING([--enable-input], [enable input service]), [
input_enable=${enableval}
])
@@ -316,6 +322,7 @@ AC_DEFUN([AC_ARG_BLUEZ], [
AM_CONDITIONAL(INOTIFY, test "${inotify_enable}" = "yes" && test "${inotify_found}" = "yes")
AM_CONDITIONAL(USB, test "${usb_enable}" = "yes" && test "${usb_found}" = "yes")
AM_CONDITIONAL(OBEX, test "${obex_enable}" = "yes" && test "${openobex_found}" = "yes")
+ AM_CONDITIONAL(NETWORKSERVICE, test "${network_enable}" = "yes")
AM_CONDITIONAL(INPUTSERVICE, test "${input_enable}" = "yes")
AM_CONDITIONAL(SYNCSERVICE, test "${sync_enable}" = "yes" && test "${opensync_found}" = "yes")
AM_CONDITIONAL(ECHOSERVICE, test "${echo_enable}" = "yes")
diff --git a/network/Makefile.am b/network/Makefile.am
index 362c7af6..fe6e3110 100644
--- a/network/Makefile.am
+++ b/network/Makefile.am
@@ -1,15 +1,26 @@
+if NETWORKSERVICE
+if CONFIGFILES
+confdir = $(sysconfdir)/bluetooth
+
+conf_DATA = network.service
+endif
+
servicedir = $(libdir)/bluetooth
noinst_PROGRAMS = bluetoothd-service-network
-bluetoothd_service_network_SOURCES = main.c
+bluetoothd_service_network_SOURCES = main.c \
+ manager.h manager.c server.h server.c connection.h connection.c
LDADD = $(top_builddir)/common/libhelper.a \
- @DBUS_LIBS@ @BLUEZ_LIBS@
+ @DBUS_LIBS@ @BLUEZ_LIBS@
+endif
AM_CFLAGS = @BLUEZ_CFLAGS@ @DBUS_CFLAGS@
INCLUDES = -I$(top_srcdir)/common
+EXTRA_DIST = network.service network-api.txt
+
MAINTAINERCLEANFILES = Makefile.in
diff --git a/network/connection.c b/network/connection.c
new file mode 100644
index 00000000..bd733cb2
--- /dev/null
+++ b/network/connection.c
@@ -0,0 +1,28 @@
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2004-2007 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 "connection.h"
diff --git a/network/connection.h b/network/connection.h
new file mode 100644
index 00000000..e87dd676
--- /dev/null
+++ b/network/connection.h
@@ -0,0 +1,22 @@
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2004-2007 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
+ *
+ */
diff --git a/network/main.c b/network/main.c
index c04bb251..7f643c58 100644
--- a/network/main.c
+++ b/network/main.c
@@ -2,7 +2,7 @@
*
* BlueZ - Bluetooth protocol stack for Linux
*
- * Copyright (C) 2005-2006 Marcel Holtmann <marcel@holtmann.org>
+ * Copyright (C) 2004-2007 Marcel Holtmann <marcel@holtmann.org>
*
*
* This program is free software; you can redistribute it and/or modify
diff --git a/network/manager.c b/network/manager.c
new file mode 100644
index 00000000..90d20927
--- /dev/null
+++ b/network/manager.c
@@ -0,0 +1,28 @@
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2004-2007 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"
diff --git a/network/manager.h b/network/manager.h
new file mode 100644
index 00000000..e87dd676
--- /dev/null
+++ b/network/manager.h
@@ -0,0 +1,22 @@
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2004-2007 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
+ *
+ */
diff --git a/network/server.c b/network/server.c
new file mode 100644
index 00000000..b8fe0382
--- /dev/null
+++ b/network/server.c
@@ -0,0 +1,28 @@
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2004-2007 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 "server.h"
diff --git a/network/server.h b/network/server.h
new file mode 100644
index 00000000..e87dd676
--- /dev/null
+++ b/network/server.h
@@ -0,0 +1,22 @@
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2004-2007 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
+ *
+ */