bluez: isolate btio.[ch] and do some cleanup
Subsystems (2)
cover bluez: isolate btio.[ch] and do some cleanup
Hi,
Similar with previous patch threads. These patches move bluez/src/btio.[ch] out from source directory and make it identical with obex's btio.[ch]. So we can freely copy them among bluez, obex and ofono.
Best Regards,
Zhenhua
PATCH 1/3 btio: Remove blank line at EOF
--- src/btio.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
src/btio.c +0 -1
@@ -1297,4 +1297,3 @@ GQuark bt_io_error_quark(void) {return g_quark_from_static_string ("bt-io-error-quark" ); } -
Signature · 1 line
1.7.0.4
PATCH 2/3 btio: Seperate btio.[ch] into btio directory
In reply to Zhenhua ZhangSeperate btio.[ch] from src directory to btio sub-folder.
--- Makefile.am | 8 +- Makefile.tools | 2 +- btio/btio.c | 1299 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ btio/btio.h | 94 ++++ src/btio.c | 1299 -------------------------------------------------------- src/btio.h | 94 ---- 6 files changed, 1399 insertions(+), 1397 deletions(-) create mode 100644 btio/btio.c create mode 100644 btio/btio.h delete mode 100644 src/btio.c delete mode 100644 src/btio.h
Makefile.am +5 -3
@@ -102,6 +102,8 @@ endif gdbus_sources = gdbus/gdbus.h gdbus/mainloop.c gdbus/watch.c \ gdbus/object.c gdbus/polkit.c +btio_sources = btio/btio.h btio/btio.c + builtin_modules = builtin_sources = builtin_nodist =
@@ -216,14 +218,14 @@ endif sbin_PROGRAMS += src/bluetoothd src_bluetoothd_SOURCES = $(gdbus_sources) $(builtin_sources) \ - $(attrib_sources) \ + $(attrib_sources) $(btio_sources) \ $(mcap_sources) \ src/main.c src/log.h src/log.c \ src/security.c src/rfkill.c src/hcid.h src/sdpd.h \ src/sdpd-server.c src/sdpd-request.c \ src/sdpd-service.c src/sdpd-database.c \ src/attrib-server.h src/attrib-server.c \ - src/sdp-xml.h src/sdp-xml.c src/btio.h src/btio.c \ + src/sdp-xml.h src/sdp-xml.c \ src/textfile.h src/textfile.c \ src/glib-helper.h src/glib-helper.c \ src/oui.h src/oui.c src/uinput.h src/ppoll.h \
@@ -357,7 +359,7 @@ AM_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ @CAPNG_CFLAGS@ \ INCLUDES = -I$(builddir)/lib -I$(builddir)/src -I$(srcdir)/src \ -I$(srcdir)/audio -I$(srcdir)/sbc -I$(srcdir)/gdbus \ - -I$(srcdir)/attrib + -I$(srcdir)/attrib -I$(srcdir)/btio if MCAP INCLUDES += -I$(builddir)/health
Makefile.tools +1 -1
@@ -170,7 +170,7 @@ test_bdaddr_LDADD = lib/libbluetooth.la test_agent_LDADD = @DBUS_LIBS@ -test_btiotest_SOURCES = test/btiotest.c src/btio.h src/btio.c +test_btiotest_SOURCES = test/btiotest.c btio/btio.h btio/btio.c test_btiotest_LDADD = @GLIB_LIBS@ lib/libbluetooth.la test_test_textfile_SOURCES = test/test-textfile.c src/textfile.h src/textfile.c
btio/btio.c new file +1299 -0
1,299 lines not on this page · raw message
btio/btio.h new file +94 -0
94 lines not on this page · raw message
src/btio.c deleted +0 -1299
1,299 lines not on this page · raw message
src/btio.h deleted +0 -94
94 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 3/3 btio: Add ifndef/endif guard for btio.h
In reply to Zhenhua ZhangTo avoid circular inclusion of include file.
--- btio/btio.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
btio/btio.h +3 -0
@@ -21,6 +21,8 @@* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * */ +#ifndef BT_IO_H +#define BT_IO_H #include <glib.h>
@@ -92,3 +94,4 @@ GIOChannel *bt_io_listen(BtIOType type, BtIOConnect connect, GDestroyNotify destroy, GError **err, BtIOOption opt1, ...); +#endif
Signature · 1 line
1.7.0.4