From bb3cd7888177a4d0e23a5790d3fe26f008345164 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 20 Jan 2007 16:31:12 +0000 Subject: Preparation for using the XML parser from GLib --- acinclude.m4 | 6 ++++-- common/Makefile.am | 8 ++++++-- common/sdp-glib.c | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 common/sdp-glib.c diff --git a/acinclude.m4 b/acinclude.m4 index 466977cc..43b09848 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -270,14 +270,16 @@ AC_DEFUN([AC_ARG_BLUEZ], [ DBUS_CFLAGS="$DBUS_CFLAGS $DBUS_GLIB_CFLAGS" DBUS_LIBS="$DBUS_GLIB_LIBS" fi + AM_CONDITIONAL(GLIB, true) + AM_CONDITIONAL(EXPAT, false) else AC_SUBST([GLIB_CFLAGS], ['-I$(top_srcdir)/eglib']) AC_SUBST([GLIB_LIBS], ['-L$(top_builddir)/eglib -leglib']) + AM_CONDITIONAL(GLIB, false) + AM_CONDITIONAL(EXPAT, test "${expat_enable}" = "yes" && test "${expat_found}" = "yes") fi AM_CONDITIONAL(INOTIFY, test "${inotify_enable}" = "yes" && test "${inotify_found}" = "yes") - AM_CONDITIONAL(EXPAT, test "${expat_enable}" = "yes" && test "${expat_found}" = "yes") - AM_CONDITIONAL(GLIB, test "${glib_enable}" = "yes" && test "${glib_found}" = "yes") AM_CONDITIONAL(OBEX, test "${obex_enable}" = "yes" && test "${openobex_found}" = "yes") AM_CONDITIONAL(SYNC, test "${sync_enable}" = "yes" && test "${opensync_found}" = "yes") AM_CONDITIONAL(HCID, test "${hcid_enable}" = "yes") diff --git a/common/Makefile.am b/common/Makefile.am index 412786c9..d9bd00ce 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -1,9 +1,13 @@ +if GLIB +sdp_sources = sdp-glib.c +else if EXPAT sdp_sources = sdp-expat.c else sdp_sources = sdp-dummy.c endif +endif if INOTIFY notify_sources = notify-inotify.c @@ -25,7 +29,7 @@ test_textfile_LDADD = libhelper.a AM_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ -EXTRA_DIST = ppoll.h sdp-dummy.c sdp-expat.c \ - notify-dummy.c notify-inotify.c +EXTRA_DIST = ppoll.h notify-dummy.c notify-inotify.c \ + sdp-dummy.c sdp-expat.c sdp-glib.c MAINTAINERCLEANFILES = Makefile.in diff --git a/common/sdp-glib.c b/common/sdp-glib.c new file mode 100644 index 00000000..15212994 --- /dev/null +++ b/common/sdp-glib.c @@ -0,0 +1,35 @@ +/* + * + * BlueZ - Bluetooth protocol stack for Linux + * + * Copyright (C) 2004-2007 Marcel Holtmann + * + * + * 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 +#endif + +#include + +#include "sdp-xml.h" + +sdp_record_t *sdp_xml_parse_record(const char *data, int size) +{ + return NULL; +} -- cgit