summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2007-08-15 22:32:33 +0000
committerMarcel Holtmann <marcel@holtmann.org>2007-08-15 22:32:33 +0000
commit3b320a0355706a98f824f4d0abf2d14f820bbd81 (patch)
treea39f0747d87df78dc4d24b96292b6c22c0084ab1 /hcid
parentbe9288b048e92fd34978dd13ba13ab37d0f22fae (diff)
Rename files for adapter interface
Diffstat (limited to 'hcid')
-rw-r--r--hcid/Makefile.am4
-rw-r--r--hcid/adapter.c (renamed from hcid/dbus-adapter.c)3
-rw-r--r--hcid/adapter.h (renamed from hcid/dbus-adapter.h)5
-rw-r--r--hcid/dbus-common.c4
-rw-r--r--hcid/dbus-common.h5
-rw-r--r--hcid/dbus-database.c1
-rw-r--r--hcid/dbus-device.c29
-rw-r--r--hcid/dbus-device.h22
-rw-r--r--hcid/dbus-error.h5
-rw-r--r--hcid/dbus-hci.c6
-rw-r--r--hcid/dbus-hci.h8
-rw-r--r--hcid/dbus-sdp.c2
-rw-r--r--hcid/dbus-sdp.h6
-rw-r--r--hcid/dbus-security.c3
-rw-r--r--hcid/dbus-security.h8
-rw-r--r--hcid/dbus-service.c1
-rw-r--r--hcid/dbus-service.h5
-rw-r--r--hcid/dbus-test.c2
-rw-r--r--hcid/dbus-test.h5
-rw-r--r--hcid/main.c1
-rw-r--r--hcid/manager.c5
-rw-r--r--hcid/security.c1
22 files changed, 19 insertions, 112 deletions
diff --git a/hcid/Makefile.am b/hcid/Makefile.am
index 77593c36..399a2e87 100644
--- a/hcid/Makefile.am
+++ b/hcid/Makefile.am
@@ -15,10 +15,10 @@ noinst_LIBRARIES = libhciserver.a
libhciserver_a_SOURCES = hcid.h security.c device.c \
storage.c parser.h parser.y lexer.l kword.c kword.h \
- manager.h manager.c server.h server.c \
+ server.h server.c manager.h manager.c \
+ adapter.h adapter.c \
dbus-common.c dbus-common.h dbus-error.c dbus-error.h \
dbus-database.c dbus-database.h dbus-security.c dbus-security.h \
- dbus-adapter.c dbus-adapter.h dbus-device.c dbus-device.h \
dbus-service.c dbus-service.h dbus-test.c dbus-test.h \
dbus-hci.h dbus-hci.c dbus-sdp.c dbus-sdp.h
diff --git a/hcid/dbus-adapter.c b/hcid/adapter.c
index 16bdc20f..17e63f99 100644
--- a/hcid/dbus-adapter.c
+++ b/hcid/adapter.c
@@ -47,16 +47,15 @@
#include "hcid.h"
#include "dbus.h"
-#include "dbus-adapter.h"
#include "textfile.h"
#include "oui.h"
+#include "adapter.h"
#include "dbus-common.h"
#include "dbus-helper.h"
#include "dbus-hci.h"
#include "dbus-sdp.h"
#include "dbus-error.h"
-#include "dbus-adapter.h"
#define NUM_ELEMENTS(table) (sizeof(table)/sizeof(const char *))
diff --git a/hcid/dbus-adapter.h b/hcid/adapter.h
index c87a9829..b48b7fac 100644
--- a/hcid/dbus-adapter.h
+++ b/hcid/adapter.h
@@ -21,9 +21,6 @@
*
*/
-#ifndef __ADAPTER_H
-#define __ADAPTER_H
-
#include <dbus/dbus.h>
#define ADAPTER_INTERFACE "org.bluez.Adapter"
@@ -125,5 +122,3 @@ GSList *service_classes_str(uint32_t class);
int pending_remote_name_cancel(struct adapter *adapter);
void dc_pending_timeout_cleanup(struct adapter *adapter);
-
-#endif /* __ADAPTER_H */
diff --git a/hcid/dbus-common.c b/hcid/dbus-common.c
index 68137875..4caef1ef 100644
--- a/hcid/dbus-common.c
+++ b/hcid/dbus-common.c
@@ -52,9 +52,9 @@
#include "dbus.h"
#include "dbus-helper.h"
#include "dbus-error.h"
-#include "dbus-hci.h"
#include "manager.h"
-#include "dbus-adapter.h"
+#include "adapter.h"
+#include "dbus-hci.h"
#include "dbus-service.h"
#include "dbus-database.h"
#include "dbus-security.h"
diff --git a/hcid/dbus-common.h b/hcid/dbus-common.h
index d1bc1683..08f83ea3 100644
--- a/hcid/dbus-common.h
+++ b/hcid/dbus-common.h
@@ -21,9 +21,6 @@
*
*/
-#ifndef __BLUEZ_DBUS_COMMON_H
-#define __BLUEZ_DBUS_COMMON_H
-
#include <bluetooth/bluetooth.h>
#include <bluetooth/sdp.h>
#include <dbus/dbus.h>
@@ -61,5 +58,3 @@ int register_sdp_record(sdp_record_t *rec);
int unregister_sdp_record(uint32_t handle);
int update_sdp_record(uint32_t handle, sdp_record_t *rec);
void cleanup_sdp_session(void);
-
-#endif /* __BLUEZ_DBUS_COMMON_H */
diff --git a/hcid/dbus-database.c b/hcid/dbus-database.c
index 69ade220..1c770c83 100644
--- a/hcid/dbus-database.c
+++ b/hcid/dbus-database.c
@@ -44,6 +44,7 @@
#include "hcid.h"
#include "sdpd.h"
#include "sdp-xml.h"
+#include "adapter.h"
#include "dbus-hci.h"
#include "dbus-common.h"
#include "dbus-error.h"
diff --git a/hcid/dbus-device.c b/hcid/dbus-device.c
deleted file mode 100644
index 0fe884b1..00000000
--- a/hcid/dbus-device.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- *
- * 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 <stdio.h>
-#include <errno.h>
diff --git a/hcid/dbus-device.h b/hcid/dbus-device.h
deleted file mode 100644
index e87dd676..00000000
--- a/hcid/dbus-device.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- *
- * 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/hcid/dbus-error.h b/hcid/dbus-error.h
index 9db9e117..6a2036de 100644
--- a/hcid/dbus-error.h
+++ b/hcid/dbus-error.h
@@ -21,9 +21,6 @@
*
*/
-#ifndef __BLUEZ_DBUS_ERROR_H
-#define __BLUEZ_DBUS_ERROR_H
-
#define ERROR_INTERFACE "org.bluez.Error"
DBusHandlerResult error_failed(DBusConnection *conn, DBusMessage *msg, int err);
@@ -67,5 +64,3 @@ DBusHandlerResult error_audit_already_exists(DBusConnection *conn, DBusMessage *
DBusHandlerResult error_trusted_device_already_exists(DBusConnection *conn, DBusMessage *msg);
DBusHandlerResult error_trusted_device_does_not_exists(DBusConnection *conn, DBusMessage *msg);
DBusHandlerResult error_disconnect_in_progress(DBusConnection *conn, DBusMessage *msg);
-
-#endif /* __BLUEZ_DBUS_ERROR_H */
diff --git a/hcid/dbus-hci.c b/hcid/dbus-hci.c
index fd9fbb47..76e8e5b3 100644
--- a/hcid/dbus-hci.c
+++ b/hcid/dbus-hci.c
@@ -46,14 +46,14 @@
#include "hcid.h"
#include "dbus.h"
#include "textfile.h"
+#include "manager.h"
+#include "adapter.h"
#include "dbus-helper.h"
#include "dbus-common.h"
#include "dbus-error.h"
#include "dbus-test.h"
-#include "dbus-security.h"
#include "dbus-service.h"
-#include "manager.h"
-#include "dbus-adapter.h"
+#include "dbus-security.h"
#include "dbus-hci.h"
static DBusConnection *connection = NULL;
diff --git a/hcid/dbus-hci.h b/hcid/dbus-hci.h
index c7b3e1b4..385ed96c 100644
--- a/hcid/dbus-hci.h
+++ b/hcid/dbus-hci.h
@@ -21,12 +21,6 @@
*
*/
-#ifndef __H_BLUEZ_DBUS_HCI_H__
-#define __H_BLUEZ_DBUS_HCI_H__
-
-#include <dbus/dbus.h>
-#include "dbus-adapter.h"
-
void hcid_dbus_set_experimental();
int hcid_dbus_use_experimental();
int hcid_dbus_register_device(uint16_t id);
@@ -81,5 +75,3 @@ int discov_timeout_handler(void *data);
void set_dbus_connection(DBusConnection *conn);
DBusConnection *get_dbus_connection(void);
-
-#endif /* __H_BLUEZ_DBUS_HCI_H__ */
diff --git a/hcid/dbus-sdp.c b/hcid/dbus-sdp.c
index aa19c512..7f16aa3e 100644
--- a/hcid/dbus-sdp.c
+++ b/hcid/dbus-sdp.c
@@ -52,9 +52,9 @@
#include "dbus-helper.h"
#include "hcid.h"
#include "textfile.h"
+#include "adapter.h"
#include "dbus-hci.h"
#include "dbus-common.h"
-#include "dbus-adapter.h"
#include "dbus-error.h"
#include "dbus-sdp.h"
#include "sdp-xml.h"
diff --git a/hcid/dbus-sdp.h b/hcid/dbus-sdp.h
index c1a7382d..e648b1f4 100644
--- a/hcid/dbus-sdp.h
+++ b/hcid/dbus-sdp.h
@@ -21,9 +21,6 @@
*
*/
-#ifndef __BLUEZ_DBUS_SDP_H
-#define __BLUEZ_DBUS_SDP_H
-
#include <stdint.h>
#include <bluetooth/bluetooth.h>
#include <bluetooth/sdp.h>
@@ -52,6 +49,3 @@ int get_record_with_uuid(DBusConnection *conn, DBusMessage *msg,
int get_record_with_handle(DBusConnection *conn, DBusMessage *msg,
uint16_t dev_id, const char *dst,
uint32_t handle, get_record_cb_t *cb, void *data);
-
-
-#endif /* __BLUEZ_DBUS_SDP_H */
diff --git a/hcid/dbus-security.c b/hcid/dbus-security.c
index 1d12eca6..2d3eef8f 100644
--- a/hcid/dbus-security.c
+++ b/hcid/dbus-security.c
@@ -40,11 +40,12 @@
#include <dbus/dbus.h>
+#include "adapter.h"
+
#include "dbus.h"
#include "dbus-helper.h"
#include "hcid.h"
#include "dbus-common.h"
-#include "dbus-adapter.h"
#include "dbus-service.h"
#include "dbus-error.h"
#include "dbus-security.h"
diff --git a/hcid/dbus-security.h b/hcid/dbus-security.h
index 1e19653f..60b7790f 100644
--- a/hcid/dbus-security.h
+++ b/hcid/dbus-security.h
@@ -21,12 +21,6 @@
*
*/
-#ifndef __BLUEZ_DBUS_SECURITY_H
-#define __BLUEZ_DBUS_SECURITY_H
-
-#include "dbus-adapter.h"
-#include "dbus-service.h"
-
#define SECURITY_INTERFACE "org.bluez.Security"
dbus_bool_t security_init(DBusConnection *conn, const char *path);
@@ -56,5 +50,3 @@ DBusHandlerResult cancel_authorize_request(DBusConnection *conn,
struct service *service,
const char *address,
const char *path);
-
-#endif /* __BLUEZ_DBUS_SECURITY_H */
diff --git a/hcid/dbus-service.c b/hcid/dbus-service.c
index 49db4e00..9c274ad6 100644
--- a/hcid/dbus-service.c
+++ b/hcid/dbus-service.c
@@ -47,6 +47,7 @@
#include "dbus-common.h"
#include "dbus-error.h"
#include "manager.h"
+#include "adapter.h"
#include "dbus-service.h"
#include "dbus-hci.h"
diff --git a/hcid/dbus-service.h b/hcid/dbus-service.h
index ee38611c..b6f3e630 100644
--- a/hcid/dbus-service.h
+++ b/hcid/dbus-service.h
@@ -21,9 +21,6 @@
*
*/
-#ifndef __BLUEZ_DBUS_SERVICE_H
-#define __BLUEZ_DBUS_SERVICE_H
-
#define START_REPLY_TIMEOUT 5000
struct service {
@@ -63,5 +60,3 @@ int service_register(DBusConnection *conn, const char *bus_name, const char *ide
const char *name, const char *description);
int service_unregister(DBusConnection *conn, struct service *service);
-
-#endif /* __BLUEZ_DBUS_SERVICE_H */
diff --git a/hcid/dbus-test.c b/hcid/dbus-test.c
index 23d40b4b..7dea55a4 100644
--- a/hcid/dbus-test.c
+++ b/hcid/dbus-test.c
@@ -40,8 +40,8 @@
#include "dbus-helper.h"
#include "hcid.h"
#include "dbus-common.h"
+#include "adapter.h"
#include "dbus-hci.h"
-#include "dbus-adapter.h"
#include "dbus-error.h"
#include "dbus-test.h"
diff --git a/hcid/dbus-test.h b/hcid/dbus-test.h
index 455c9293..0a36fb3b 100644
--- a/hcid/dbus-test.h
+++ b/hcid/dbus-test.h
@@ -21,13 +21,8 @@
*
*/
-#ifndef __BLUEZ_DBUS_TEST_H
-#define __BLUEZ_DBUS_TEST_H
-
#define TEST_INTERFACE "org.bluez.Test"
dbus_bool_t test_init(DBusConnection *conn, const char *path);
void process_audits_list(const char *adapter_path);
-
-#endif /* __BLUEZ_DBUS_TEST_H */
diff --git a/hcid/main.c b/hcid/main.c
index 61d2fecd..d3cf2bf4 100644
--- a/hcid/main.c
+++ b/hcid/main.c
@@ -51,6 +51,7 @@
#include "hcid.h"
#include "sdpd.h"
#include "server.h"
+#include "adapter.h"
#include "dbus-common.h"
#include "dbus-service.h"
#include "dbus-database.h"
diff --git a/hcid/manager.c b/hcid/manager.c
index e946886f..50cd698e 100644
--- a/hcid/manager.c
+++ b/hcid/manager.c
@@ -42,14 +42,15 @@
#include <dbus/dbus.h>
#include "hcid.h"
+#include "adapter.h"
#include "dbus.h"
#include "dbus-helper.h"
#include "dbus-common.h"
#include "dbus-error.h"
+#include "dbus-hci.h"
+#include "dbus-service.h"
#include "dbus-database.h"
#include "dbus-security.h"
-#include "dbus-service.h"
-#include "dbus-hci.h"
#include "sdp-xml.h"
#include "manager.h"
diff --git a/hcid/security.c b/hcid/security.c
index 0ef26d25..37f4cc7d 100644
--- a/hcid/security.c
+++ b/hcid/security.c
@@ -49,6 +49,7 @@
#include "hcid.h"
#include "textfile.h"
+#include "adapter.h"
#include "dbus-hci.h"
struct g_io_info {