summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2006-11-13 07:38:20 +0000
committerMarcel Holtmann <marcel@holtmann.org>2006-11-13 07:38:20 +0000
commitb1a10a46b1cdeb034823b83c993836b0dce3ed06 (patch)
treeea2dd007879348a26716fb56839ab8e223a0cd06 /common
parent0ff36a95d3ab972290c3d66bad6e721298cf0ba3 (diff)
Cleanup SDP XML support
Diffstat (limited to 'common')
-rw-r--r--common/sdp-dummy.c28
-rw-r--r--common/sdp-expat.c33
-rw-r--r--common/sdp-xml.c21
-rw-r--r--common/sdp-xml.h14
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 <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 "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 <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 <bluetooth/sdp.h>
+#include <bluetooth/sdp_lib.h>
+
+#include <expat.h>
+
+#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 <marcel@holtmann.org>
+ * Copyright (C) 2005-2006 Marcel Holtmann <marcel@holtmann.org>
*
*
* This program is free software; you can redistribute it and/or modify
@@ -25,20 +25,23 @@
#include <config.h>
#endif
-#include "sdp-xml.h"
-
#include <stdio.h>
-#include <string.h>
-#include <bluetooth/sdp_lib.h>
+#include <errno.h>
+#include <ctype.h>
#include <malloc.h>
+#include <string.h>
#include <limits.h>
+#include <bluetooth/sdp.h>
+#include <bluetooth/sdp_lib.h>
+
+#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, "</record>\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 <marcel@holtmann.org>
+ * Copyright (C) 2005-2006 Marcel Holtmann <marcel@holtmann.org>
*
*
* 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 <ctype.h>
#include <bluetooth/sdp.h>
-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 */