From b1a10a46b1cdeb034823b83c993836b0dce3ed06 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Mon, 13 Nov 2006 07:38:20 +0000 Subject: Cleanup SDP XML support --- common/sdp-dummy.c | 28 ++++++++++++++++++++++++++++ common/sdp-expat.c | 33 +++++++++++++++++++++++++++++++++ common/sdp-xml.c | 21 +++++++++++---------- common/sdp-xml.h | 14 ++++++-------- 4 files changed, 78 insertions(+), 18 deletions(-) diff --git a/common/sdp-dummy.c b/common/sdp-dummy.c index e69de29b..8ed637e7 100644 --- a/common/sdp-dummy.c +++ b/common/sdp-dummy.c @@ -0,0 +1,28 @@ +/* + * + * BlueZ - Bluetooth protocol stack for Linux + * + * Copyright (C) 2005-2006 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 "sdp-xml.h" diff --git a/common/sdp-expat.c b/common/sdp-expat.c index e69de29b..0ab15d7a 100644 --- a/common/sdp-expat.c +++ b/common/sdp-expat.c @@ -0,0 +1,33 @@ +/* + * + * BlueZ - Bluetooth protocol stack for Linux + * + * Copyright (C) 2005-2006 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 + +#include + +#include "sdp-xml.h" diff --git a/common/sdp-xml.c b/common/sdp-xml.c index 5c6dd877..ee5601ee 100644 --- a/common/sdp-xml.c +++ b/common/sdp-xml.c @@ -2,7 +2,7 @@ * * BlueZ - Bluetooth protocol stack for Linux * - * Copyright (C) 2004-2006 Marcel Holtmann + * Copyright (C) 2005-2006 Marcel Holtmann * * * This program is free software; you can redistribute it and/or modify @@ -25,20 +25,23 @@ #include #endif -#include "sdp-xml.h" - #include -#include -#include +#include +#include #include +#include #include +#include +#include + +#include "sdp-xml.h" + #define STRBUFSIZE 256 #define MAXINDENT 64 static void convert_raw_data_to_xml(sdp_data_t *value, int indent_level, - void *data, - void (*appender) (void *, const char *)) + void *data, void (*appender) (void *, const char *)) { int i, hex; char buf[STRBUFSIZE]; @@ -381,8 +384,7 @@ static void convert_raw_attr_to_xml_func(void *val, void *data) (containing parts of the generated XML) to append. */ void convert_sdp_record_to_xml(sdp_record_t *rec, - void *data, - void (*appender) (void *, const char *)) + void *data, void (*appender) (void *, const char *)) { struct conversion_data cd; @@ -397,4 +399,3 @@ void convert_sdp_record_to_xml(sdp_record_t *rec, appender(data, "\n"); } } - diff --git a/common/sdp-xml.h b/common/sdp-xml.h index fe781f57..5e6bb7ce 100644 --- a/common/sdp-xml.h +++ b/common/sdp-xml.h @@ -2,7 +2,7 @@ * * BlueZ - Bluetooth protocol stack for Linux * - * Copyright (C) 2004-2006 Marcel Holtmann + * Copyright (C) 2005-2006 Marcel Holtmann * * * This program is free software; you can redistribute it and/or modify @@ -22,14 +22,12 @@ */ -#ifndef __SDP_XML_H__ -#define __SDP_XML_H__ +#ifndef __SDP_XML_H +#define __SDP_XML_H -#include #include -void convert_sdp_record_to_xml(sdp_record_t * rec, - void *userData, - void (*appendFunc) (void *, const char *)); +void convert_sdp_record_to_xml(sdp_record_t *rec, + void *user_data, void (*append_func) (void *, const char *)); -#endif /* __SDP_XML_H__ */ +#endif /* __SDP_XML_H */ -- cgit