summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2006-03-08 19:10:50 +0000
committerMarcel Holtmann <marcel@holtmann.org>2006-03-08 19:10:50 +0000
commite284789bd1748eb82035c54c9b3e6027010568b8 (patch)
tree10afb3ddf7e3f8dc73411a47fe90a2ce81d7e7df /hcid
parentb1d57917a789e9b713f6a7faefba2f72285505c0 (diff)
Add skeleton for common D-Bus functions
Diffstat (limited to 'hcid')
-rw-r--r--hcid/Makefile.am7
-rw-r--r--hcid/dbus-common.c29
2 files changed, 32 insertions, 4 deletions
diff --git a/hcid/Makefile.am b/hcid/Makefile.am
index 089e662b..1cc46c9f 100644
--- a/hcid/Makefile.am
+++ b/hcid/Makefile.am
@@ -18,10 +18,9 @@ sbin_PROGRAMS = hcid
noinst_SCRIPTS = dbus-test
if DBUS
-dbus_hcid_sources = dbus.h dbus.c dbus-error.c \
- dbus-manager.c dbus-adapter.c \
- dbus-device.c dbus-security.c \
- dbus-rfcomm.c
+dbus_hcid_sources = dbus.h dbus.c dbus-common.c \
+ dbus-error.c dbus-manager.c dbus-adapter.c \
+ dbus-device.c dbus-security.c dbus-rfcomm.c
dbus_hcid_libs = @DBUS_LIBS@
dbus_hcid_cflags = -DENABLE_DBUS -DDBUS_API_SUBJECT_TO_CHANGE
else
diff --git a/hcid/dbus-common.c b/hcid/dbus-common.c
new file mode 100644
index 00000000..f3bf47c4
--- /dev/null
+++ b/hcid/dbus-common.c
@@ -0,0 +1,29 @@
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2004-2006 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 <stdio.h>
+#include <errno.h>