Preparation for using the XML parser from GLib

This commit is contained in:
Marcel Holtmann 2007-01-20 16:31:12 +00:00
parent 9ca184f1e8
commit bb3cd78881
3 changed files with 45 additions and 4 deletions

View File

@ -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")

View File

@ -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

35
common/sdp-glib.c Normal file
View File

@ -0,0 +1,35 @@
/*
*
* 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 <glib.h>
#include "sdp-xml.h"
sdp_record_t *sdp_xml_parse_record(const char *data, int size)
{
return NULL;
}