gnome-bluetooth r546 - in trunk: . wizard



Author: hadess
Date: Thu Mar 26 14:36:16 2009
New Revision: 546
URL: http://svn.gnome.org/viewvc/gnome-bluetooth?rev=546&view=rev

Log:
Add DTD for the pin code DB, and check it with xmllint if it's there


Modified:
   trunk/configure.ac
   trunk/wizard/Makefile.am
   trunk/wizard/pin-code-database.xml

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Thu Mar 26 14:36:16 2009
@@ -41,6 +41,7 @@
 AM_GLIB_GNU_GETTEXT
 IT_PROG_INTLTOOL([0.35.0])
 
+AC_PATH_PROG([XMLLINT],[xmllint])
 AC_PATH_PROG(GCONFTOOL, [gconftool-2])
 AM_GCONF_SOURCE_2
 

Modified: trunk/wizard/Makefile.am
==============================================================================
--- trunk/wizard/Makefile.am	(original)
+++ trunk/wizard/Makefile.am	Thu Mar 26 14:36:16 2009
@@ -7,7 +7,7 @@
 
 AM_CFLAGS = $(WIZARD_CFLAGS) $(WARN_CFLAGS) $(DISABLE_DEPRECATED) -DPKGDATADIR="\"$(pkgdatadir)\""
 
-pin_DATA = pin-code-database.txt
+pin_DATA = pin-code-database.txt pin-code-database.xml
 pindir = $(pkgdatadir)
 
 ui_DATA = passkey-options.ui
@@ -17,6 +17,11 @@
 
 man_MANS = bluetooth-wizard.1
 
+all: check
+	@if test -n $(XMLLINT) ; then \
+		xmllint --noout --valid $(srcdir)/pin-code-database.xml ;	\
+	fi
+
 EXTRA_DIST = $(man_MANS) $(pin_DATA)
 
 MAINTAINERCLEANFILES = Makefile.in

Modified: trunk/wizard/pin-code-database.xml
==============================================================================
--- trunk/wizard/pin-code-database.xml	(original)
+++ trunk/wizard/pin-code-database.xml	Thu Mar 26 14:36:16 2009
@@ -1,3 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- This is a PIN code database for use in the Bluetooth wizard.
+
+  Copyright (C) 2008-2009  Bastien Nocera <hadess hadess net>
+
+  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
+-->
+
+<!--
+  The wizard will match devices, following the order of the XML file [1],
+  on any combination of type, OUI, or name.
+
+  The special NULL pin means that the devices will not be paired, but
+  connected to and marked as trusted. This is for devices such as mice
+  and joypads where there is no encryption
+
+  [1]: So specific devices should be at the top, and generic ones at the bottom,
+  so settings for specific devices are overridden as expected.
+-->
+
+<!DOCTYPE devices [
+	<!ELEMENT devices (device)+>
+	<!ELEMENT device EMPTY>
+	<!ATTLIST device type (any|mouse|keyboard|headset|headphones|audio|printer|network) "any">
+	<!ATTLIST device oui CDATA #IMPLIED>
+	<!ATTLIST device name CDATA #IMPLIED>
+	<!ATTLIST device pin CDATA #REQUIRED>
+]>
+
 <devices>
 
 <!-- Input devices -->



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]