\section{Busclass list XML parsing}
\label{group__busclass__xml}\index{Busclass list XML parsing@{Busclass list XML parsing}}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void {\bf discover\_\-xml\_\-merge\_\-busclass\_\-url} ({\bf discover\_\-xml\_\-busclass\_\-t} $\ast$$\ast$blist, char $\ast$url, {\bf discover\_\-error\_\-t} $\ast$status)
\item 
{\bf discover\_\-xml\_\-busclass\_\-t} $\ast$ {\bf discover\_\-xml\_\-get\_\-busclasses} ({\bf discover\_\-bus\_\-t} bus, {\bf discover\_\-error\_\-t} $\ast$status)
\item 
void {\bf discover\_\-xml\_\-free\_\-busclasses} (void)
\item 
char $\ast$ {\bf discover\_\-xml\_\-busclass\_\-to\_\-class} (char $\ast$busclass, {\bf discover\_\-xml\_\-busclass\_\-t} $\ast$busclasses)
\item 
int {\bf discover\_\-xml\_\-busclass\_\-cmp} (char $\ast$busclass, char $\ast$discover\_\-class, {\bf discover\_\-xml\_\-busclass\_\-t} $\ast$busclasses)
\item 
char $\ast$ {\bf discover\_\-xml\_\-busclass\_\-get\_\-id} ({\bf discover\_\-xml\_\-busclass\_\-t} $\ast$busclass)
\item 
char $\ast$ {\bf discover\_\-xml\_\-busclass\_\-get\_\-name} ({\bf discover\_\-xml\_\-busclass\_\-t} $\ast$busclass)
\item 
{\bf discover\_\-xml\_\-busclass\_\-t} $\ast$ {\bf discover\_\-xml\_\-busclass\_\-get\_\-next} ({\bf discover\_\-xml\_\-busclass\_\-t} $\ast$busclass)
\item 
{\bf discover\_\-xml\_\-busclass\_\-t} $\ast$ {\bf discover\_\-xml\_\-busclass\_\-new} (void)
\item 
void {\bf discover\_\-xml\_\-busclass\_\-free} ({\bf discover\_\-xml\_\-busclass\_\-t} $\ast$busclasses)
\end{CompactItemize}


\subsection{Function Documentation}
\index{busclass_xml@{busclass\_\-xml}!discover_xml_busclass_cmp@{discover\_\-xml\_\-busclass\_\-cmp}}
\index{discover_xml_busclass_cmp@{discover\_\-xml\_\-busclass\_\-cmp}!busclass_xml@{busclass\_\-xml}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int discover\_\-xml\_\-busclass\_\-cmp (char $\ast$ {\em busclass}, char $\ast$ {\em discover\_\-class}, {\bf discover\_\-xml\_\-busclass\_\-t} $\ast$ {\em busclasses})}\label{group__busclass__xml_ga4}


Compare a busclass to a device class, returning the same kind of value returned by strcmp(3). Note that this function has a special case for the class 'all'; it is considered equal to all busclasses.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em busclass}]Busclass to compare \item[{\em discover\_\-class}]Device class to compare \item[{\em busclasses}]List of busclasses to search \end{description}
\end{Desc}


Definition at line 295 of file busclass-xml.c.

References discover\_\-xml\_\-busclass\_\-to\_\-class().

Referenced by discover\_\-device\_\-find().\index{busclass_xml@{busclass\_\-xml}!discover_xml_busclass_free@{discover\_\-xml\_\-busclass\_\-free}}
\index{discover_xml_busclass_free@{discover\_\-xml\_\-busclass\_\-free}!busclass_xml@{busclass\_\-xml}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void discover\_\-xml\_\-busclass\_\-free ({\bf discover\_\-xml\_\-busclass\_\-t} $\ast$ {\em busclasses})}\label{group__busclass__xml_ga9}


Free the busclass or list of busclasses.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em busclasses}]Busclass or list of busclasses to free \end{description}
\end{Desc}


Definition at line 382 of file busclass-xml.c.

Referenced by discover\_\-xml\_\-free\_\-busclasses().\index{busclass_xml@{busclass\_\-xml}!discover_xml_busclass_get_id@{discover\_\-xml\_\-busclass\_\-get\_\-id}}
\index{discover_xml_busclass_get_id@{discover\_\-xml\_\-busclass\_\-get\_\-id}!busclass_xml@{busclass\_\-xml}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ discover\_\-xml\_\-busclass\_\-get\_\-id ({\bf discover\_\-xml\_\-busclass\_\-t} $\ast$ {\em busclass})}\label{group__busclass__xml_ga5}


Get the id member of busclass.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em busclass}]\end{description}
\end{Desc}


Definition at line 327 of file busclass-xml.c.\index{busclass_xml@{busclass\_\-xml}!discover_xml_busclass_get_name@{discover\_\-xml\_\-busclass\_\-get\_\-name}}
\index{discover_xml_busclass_get_name@{discover\_\-xml\_\-busclass\_\-get\_\-name}!busclass_xml@{busclass\_\-xml}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ discover\_\-xml\_\-busclass\_\-get\_\-name ({\bf discover\_\-xml\_\-busclass\_\-t} $\ast$ {\em busclass})}\label{group__busclass__xml_ga6}


Get the name member of busclass.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em busclass}]\end{description}
\end{Desc}


Definition at line 340 of file busclass-xml.c.\index{busclass_xml@{busclass\_\-xml}!discover_xml_busclass_get_next@{discover\_\-xml\_\-busclass\_\-get\_\-next}}
\index{discover_xml_busclass_get_next@{discover\_\-xml\_\-busclass\_\-get\_\-next}!busclass_xml@{busclass\_\-xml}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf discover\_\-xml\_\-busclass\_\-t}$\ast$ discover\_\-xml\_\-busclass\_\-get\_\-next ({\bf discover\_\-xml\_\-busclass\_\-t} $\ast$ {\em busclass})}\label{group__busclass__xml_ga7}


Get the next member of busclass (used for traversing lists of busclasses). 

Definition at line 352 of file busclass-xml.c.\index{busclass_xml@{busclass\_\-xml}!discover_xml_busclass_new@{discover\_\-xml\_\-busclass\_\-new}}
\index{discover_xml_busclass_new@{discover\_\-xml\_\-busclass\_\-new}!busclass_xml@{busclass\_\-xml}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf discover\_\-xml\_\-busclass\_\-t}$\ast$ discover\_\-xml\_\-busclass\_\-new (void)}\label{group__busclass__xml_ga8}


Create and initialize a new discover\_\-xml\_\-busclass\_\-t object. 

Definition at line 363 of file busclass-xml.c.\index{busclass_xml@{busclass\_\-xml}!discover_xml_busclass_to_class@{discover\_\-xml\_\-busclass\_\-to\_\-class}}
\index{discover_xml_busclass_to_class@{discover\_\-xml\_\-busclass\_\-to\_\-class}!busclass_xml@{busclass\_\-xml}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ discover\_\-xml\_\-busclass\_\-to\_\-class (char $\ast$ {\em busclass}, {\bf discover\_\-xml\_\-busclass\_\-t} $\ast$ {\em busclasses})}\label{group__busclass__xml_ga3}


Return the device class corresponding to a busclass.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em busclass}]Busclass to look up \item[{\em busclasses}]List of busclasses to search \end{description}
\end{Desc}


Definition at line 263 of file busclass-xml.c.

Referenced by discover\_\-xml\_\-busclass\_\-cmp().\index{busclass_xml@{busclass\_\-xml}!discover_xml_free_busclasses@{discover\_\-xml\_\-free\_\-busclasses}}
\index{discover_xml_free_busclasses@{discover\_\-xml\_\-free\_\-busclasses}!busclass_xml@{busclass\_\-xml}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void discover\_\-xml\_\-free\_\-busclasses (void)}\label{group__busclass__xml_ga2}


Free the list of busclasses. 

Definition at line 247 of file busclass-xml.c.

References BUS\_\-COUNT, and discover\_\-xml\_\-busclass\_\-free().\index{busclass_xml@{busclass\_\-xml}!discover_xml_get_busclasses@{discover\_\-xml\_\-get\_\-busclasses}}
\index{discover_xml_get_busclasses@{discover\_\-xml\_\-get\_\-busclasses}!busclass_xml@{busclass\_\-xml}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf discover\_\-xml\_\-busclass\_\-t}$\ast$ discover\_\-xml\_\-get\_\-busclasses ({\bf discover\_\-bus\_\-t} {\em bus}, {\bf discover\_\-error\_\-t} $\ast$ {\em status})}\label{group__busclass__xml_ga1}


Get the list of busclasses by bus type.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em bus}]Type of bus for which busclasses are required \item[{\em status}]Address in which to place status report \end{description}
\end{Desc}


Definition at line 213 of file busclass-xml.c.

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

Referenced by discover\_\-device\_\-find(), and discover\_\-xml\_\-get\_\-devices().\index{busclass_xml@{busclass\_\-xml}!discover_xml_merge_busclass_url@{discover\_\-xml\_\-merge\_\-busclass\_\-url}}
\index{discover_xml_merge_busclass_url@{discover\_\-xml\_\-merge\_\-busclass\_\-url}!busclass_xml@{busclass\_\-xml}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void discover\_\-xml\_\-merge\_\-busclass\_\-url ({\bf discover\_\-xml\_\-busclass\_\-t} $\ast$$\ast$ {\em blist}, char $\ast$ {\em url}, {\bf discover\_\-error\_\-t} $\ast$ {\em status})}\label{group__busclass__xml_ga0}


Merge new busclasses into a list.

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


Definition at line 171 of file busclass-xml.c.

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

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