\section{Device list XML parsing}
\label{group__device__xml}\index{Device list XML parsing@{Device list XML parsing}}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void {\bf discover\_\-xml\_\-merge\_\-device\_\-url} ({\bf discover\_\-device\_\-t} $\ast$$\ast$dlist, char $\ast$url, {\bf discover\_\-xml\_\-busclass\_\-t} $\ast$busclasses, {\bf discover\_\-xml\_\-vendor\_\-t} $\ast$vendors, {\bf discover\_\-error\_\-t} $\ast$status)
\item 
{\bf discover\_\-device\_\-t} $\ast$ {\bf discover\_\-xml\_\-get\_\-devices} ({\bf discover\_\-bus\_\-t} bus, {\bf discover\_\-error\_\-t} $\ast$status)
\item 
void {\bf discover\_\-xml\_\-free\_\-devices} (void)
\item 
{\bf discover\_\-device\_\-t} $\ast$ {\bf discover\_\-xml\_\-find\_\-device} ({\bf discover\_\-device\_\-t} $\ast$xml\_\-devices, char $\ast$target\_\-vendor, char $\ast$target\_\-model, {\bf discover\_\-error\_\-t} $\ast$status)
\item 
{\bf discover\_\-device\_\-t} $\ast$ {\bf discover\_\-xml\_\-find\_\-next\_\-device} ({\bf discover\_\-device\_\-t} $\ast$xml\_\-devices, char $\ast$target\_\-vendor, char $\ast$target\_\-model, {\bf discover\_\-error\_\-t} $\ast$status)
\item 
{\bf discover\_\-device\_\-t} $\ast$ {\bf discover\_\-xml\_\-get\_\-matching\_\-devices} ({\bf discover\_\-device\_\-t} $\ast$xml\_\-devices, char $\ast$target\_\-vendor, char $\ast$target\_\-model, {\bf discover\_\-error\_\-t} $\ast$status)
\end{CompactItemize}


\subsection{Function Documentation}
\index{device_xml@{device\_\-xml}!discover_xml_find_device@{discover\_\-xml\_\-find\_\-device}}
\index{discover_xml_find_device@{discover\_\-xml\_\-find\_\-device}!device_xml@{device\_\-xml}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf discover\_\-device\_\-t}$\ast$ discover\_\-xml\_\-find\_\-device ({\bf discover\_\-device\_\-t} $\ast$ {\em xml\_\-devices}, char $\ast$ {\em target\_\-vendor}, char $\ast$ {\em target\_\-model}, {\bf discover\_\-error\_\-t} $\ast$ {\em status})}\label{group__device__xml_ga3}


Find the first device in xml\_\-devices matching target\_\-vendor and/or target\_\-model. (One or both can be specified, but not zero.)

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em xml\_\-devices}]List of devices to search \item[{\em target\_\-vendor}]Vendor for which to search \item[{\em target\_\-model}]Model for which to search \item[{\em status}]Address in which to place status report \end{description}
\end{Desc}


Definition at line 550 of file device-xml.c.

Referenced by discover\_\-xml\_\-find\_\-next\_\-device(), and discover\_\-xml\_\-get\_\-matching\_\-devices().\index{device_xml@{device\_\-xml}!discover_xml_find_next_device@{discover\_\-xml\_\-find\_\-next\_\-device}}
\index{discover_xml_find_next_device@{discover\_\-xml\_\-find\_\-next\_\-device}!device_xml@{device\_\-xml}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf discover\_\-device\_\-t}$\ast$ discover\_\-xml\_\-find\_\-next\_\-device ({\bf discover\_\-device\_\-t} $\ast$ {\em xml\_\-devices}, char $\ast$ {\em target\_\-vendor}, char $\ast$ {\em target\_\-model}, {\bf discover\_\-error\_\-t} $\ast$ {\em status})}\label{group__device__xml_ga4}


Find the next device in xml\_\-devices matching target\_\-vendor and/or target\_\-model. (One or both can be specified, but not zero.)

The first device in the list is assumed to have been processed, so we simply call {\bf discover\_\-xml\_\-find\_\-device()}{\rm (p.\,\pageref{group__device__xml_ga3})} on the next pointer.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em xml\_\-devices}]List of devices to search \item[{\em target\_\-vendor}]Vendor for which to search \item[{\em target\_\-model}]Model for which to search \item[{\em status}]Address in which to place status report \end{description}
\end{Desc}


Definition at line 594 of file device-xml.c.

References discover\_\-xml\_\-find\_\-device().

Referenced by discover\_\-xml\_\-get\_\-matching\_\-devices().\index{device_xml@{device\_\-xml}!discover_xml_free_devices@{discover\_\-xml\_\-free\_\-devices}}
\index{discover_xml_free_devices@{discover\_\-xml\_\-free\_\-devices}!device_xml@{device\_\-xml}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void discover\_\-xml\_\-free\_\-devices (void)}\label{group__device__xml_ga2}


Free the list of XML devices. 

Definition at line 531 of file device-xml.c.

References BUS\_\-COUNT, and discover\_\-device\_\-free().\index{device_xml@{device\_\-xml}!discover_xml_get_devices@{discover\_\-xml\_\-get\_\-devices}}
\index{discover_xml_get_devices@{discover\_\-xml\_\-get\_\-devices}!device_xml@{device\_\-xml}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf discover\_\-device\_\-t}$\ast$ discover\_\-xml\_\-get\_\-devices ({\bf discover\_\-bus\_\-t} {\em bus}, {\bf discover\_\-error\_\-t} $\ast$ {\em status})}\label{group__device__xml_ga1}


Get the list of devices for the required bus.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em bus}]Bus for which the devices are requested \item[{\em status}]Address in which to place status report \end{description}
\end{Desc}


Definition at line 484 of file device-xml.c.

References discover\_\-error::code, discover\_\-xml\_\-get\_\-busclasses(), discover\_\-xml\_\-get\_\-data\_\-urls(), discover\_\-xml\_\-get\_\-vendors(), discover\_\-xml\_\-merge\_\-device\_\-url(), discover\_\-xml\_\-url\_\-get\_\-next(), and discover\_\-xml\_\-url\_\-get\_\-url().

Referenced by discover\_\-get\_\-devices().\index{device_xml@{device\_\-xml}!discover_xml_get_matching_devices@{discover\_\-xml\_\-get\_\-matching\_\-devices}}
\index{discover_xml_get_matching_devices@{discover\_\-xml\_\-get\_\-matching\_\-devices}!device_xml@{device\_\-xml}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf discover\_\-device\_\-t}$\ast$ discover\_\-xml\_\-get\_\-matching\_\-devices ({\bf discover\_\-device\_\-t} $\ast$ {\em xml\_\-devices}, char $\ast$ {\em target\_\-vendor}, char $\ast$ {\em target\_\-model}, {\bf discover\_\-error\_\-t} $\ast$ {\em status})}\label{group__device__xml_ga5}


Find and duplicate all devices in xml\_\-devices matching target\_\-vendor and/or target\_\-model. (One or both can be specified, but not zero.)

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em xml\_\-devices}]List of devices to search \item[{\em target\_\-vendor}]Vendor for which to search \item[{\em target\_\-model}]Model for which to search \item[{\em status}]Address in which to place status report \end{description}
\end{Desc}


Definition at line 614 of file device-xml.c.

References discover\_\-device\_\-copy(), discover\_\-device\_\-new(), discover\_\-xml\_\-find\_\-device(), and discover\_\-xml\_\-find\_\-next\_\-device().

Referenced by discover\_\-get\_\-devices().\index{device_xml@{device\_\-xml}!discover_xml_merge_device_url@{discover\_\-xml\_\-merge\_\-device\_\-url}}
\index{discover_xml_merge_device_url@{discover\_\-xml\_\-merge\_\-device\_\-url}!device_xml@{device\_\-xml}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void discover\_\-xml\_\-merge\_\-device\_\-url ({\bf discover\_\-device\_\-t} $\ast$$\ast$ {\em dlist}, char $\ast$ {\em url}, {\bf discover\_\-xml\_\-busclass\_\-t} $\ast$ {\em busclasses}, {\bf discover\_\-xml\_\-vendor\_\-t} $\ast$ {\em vendors}, {\bf discover\_\-error\_\-t} $\ast$ {\em status})}\label{group__device__xml_ga0}


Merge new busclasses into a list.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dlist}]Address of the list to merge busclasses into \item[{\em url}]URL of the document defining the busclasses \item[{\em busclasses}]List of busclasses for this bus \item[{\em vendors}]List of vendors for this bus \item[{\em status}]Address in which to place status report \end{description}
\end{Desc}


Definition at line 425 of file device-xml.c.

References discover\_\-error::code, DISCOVER\_\-EIO, and DISCOVER\_\-EXML.

Referenced by discover\_\-xml\_\-get\_\-devices().