\section{Configuration handling}
\label{group__conf}\index{Configuration handling@{Configuration handling}}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void {\bf discover\_\-conf\_\-load} ({\bf discover\_\-error\_\-t} $\ast$status)
\item 
int {\bf discover\_\-conf\_\-name\_\-to\_\-bus} (char $\ast$name, {\bf discover\_\-error\_\-t} $\ast$status)
\item 
{\bf discover\_\-bus\_\-map\_\-t} $\ast$ {\bf discover\_\-conf\_\-get\_\-full\_\-bus\_\-map} ({\bf discover\_\-error\_\-t} $\ast$status)
\item 
{\bf discover\_\-bus\_\-map\_\-t} $\ast$ {\bf discover\_\-conf\_\-get\_\-bus\_\-map\_\-by\_\-name} (char $\ast$name, {\bf discover\_\-error\_\-t} $\ast$status)
\item 
{\bf discover\_\-bus\_\-map\_\-t} $\ast$ {\bf discover\_\-conf\_\-get\_\-bus\_\-map} ({\bf discover\_\-bus\_\-t} bus, {\bf discover\_\-error\_\-t} $\ast$status)
\item 
void {\bf discover\_\-conf\_\-insert\_\-url} (char $\ast$url, {\bf discover\_\-error\_\-t} $\ast$status)
\item 
void {\bf discover\_\-conf\_\-append\_\-url} (char $\ast$url, {\bf discover\_\-error\_\-t} $\ast$status)
\item 
{\bf discover\_\-xml\_\-url\_\-t} $\ast$ {\bf discover\_\-conf\_\-get\_\-urls} ({\bf discover\_\-error\_\-t} $\ast$status)
\item 
void {\bf discover\_\-conf\_\-free} (void)
\item 
char $\ast$ {\bf discover\_\-conf\_\-get\_\-bus\_\-name} ({\bf discover\_\-bus\_\-t} bus)
\item 
char $\ast$ {\bf discover\_\-conf\_\-get\_\-filetype\_\-name} ({\bf discover\_\-filetype\_\-t} filetype)
\end{CompactItemize}


\subsection{Function Documentation}
\index{conf@{conf}!discover_conf_append_url@{discover\_\-conf\_\-append\_\-url}}
\index{discover_conf_append_url@{discover\_\-conf\_\-append\_\-url}!conf@{conf}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void discover\_\-conf\_\-append\_\-url (char $\ast$ {\em url}, {\bf discover\_\-error\_\-t} $\ast$ {\em status})}\label{group__conf_ga6}


Append the URL specified in url at the tail of the list of URLs where Discover data will be retrieved.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em url}]URL to append \item[{\em status}]Address in which to place status report \end{description}
\end{Desc}


Definition at line 579 of file conf.c.

References discover\_\-error::code, and discover\_\-conf\_\-load().\index{conf@{conf}!discover_conf_free@{discover\_\-conf\_\-free}}
\index{discover_conf_free@{discover\_\-conf\_\-free}!conf@{conf}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void discover\_\-conf\_\-free (void)}\label{group__conf_ga8}


Free configuration data. This is mainly useful so that the next call to discover\_\-conf\_\-load will reload the configuration data. 

Definition at line 650 of file conf.c.

References discover\_\-xml\_\-url\_\-free().\index{conf@{conf}!discover_conf_get_bus_map@{discover\_\-conf\_\-get\_\-bus\_\-map}}
\index{discover_conf_get_bus_map@{discover\_\-conf\_\-get\_\-bus\_\-map}!conf@{conf}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf discover\_\-bus\_\-map\_\-t}$\ast$ discover\_\-conf\_\-get\_\-bus\_\-map ({\bf discover\_\-bus\_\-t} {\em bus}, {\bf discover\_\-error\_\-t} $\ast$ {\em status})}\label{group__conf_ga4}


Get the bus map for a single bus.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em bus}]Name of the bus whose map to get \item[{\em status}]Address in which to place status report \end{description}
\end{Desc}


Definition at line 532 of file conf.c.

References BUS\_\-COUNT, discover\_\-error::code, discover\_\-conf\_\-load(), and DISCOVER\_\-EBUSNOTFOUND.

Referenced by discover\_\-get\_\-devices().\index{conf@{conf}!discover_conf_get_bus_map_by_name@{discover\_\-conf\_\-get\_\-bus\_\-map\_\-by\_\-name}}
\index{discover_conf_get_bus_map_by_name@{discover\_\-conf\_\-get\_\-bus\_\-map\_\-by\_\-name}!conf@{conf}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf discover\_\-bus\_\-map\_\-t}$\ast$ discover\_\-conf\_\-get\_\-bus\_\-map\_\-by\_\-name (char $\ast$ {\em name}, {\bf discover\_\-error\_\-t} $\ast$ {\em status})}\label{group__conf_ga3}


Get the bus map by name for a single bus.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]Name of the bus whose map to get \item[{\em status}]Address in which to place status report \end{description}
\end{Desc}


Definition at line 509 of file conf.c.

References \_\-real\_\-discover\_\-conf\_\-get\_\-bus\_\-map\_\-by\_\-name(), discover\_\-error::code, and discover\_\-conf\_\-load().\index{conf@{conf}!discover_conf_get_bus_name@{discover\_\-conf\_\-get\_\-bus\_\-name}}
\index{discover_conf_get_bus_name@{discover\_\-conf\_\-get\_\-bus\_\-name}!conf@{conf}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ discover\_\-conf\_\-get\_\-bus\_\-name ({\bf discover\_\-bus\_\-t} {\em bus})}\label{group__conf_ga9}


Translate an enum bus value into a string.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em bus}]Bus type in enumerated form \end{description}
\end{Desc}


Definition at line 666 of file conf.c.

References BUS\_\-COUNT, and discover\_\-bus\_\-map::name.

Referenced by discover\_\-xml\_\-get\_\-data\_\-urls().\index{conf@{conf}!discover_conf_get_filetype_name@{discover\_\-conf\_\-get\_\-filetype\_\-name}}
\index{discover_conf_get_filetype_name@{discover\_\-conf\_\-get\_\-filetype\_\-name}!conf@{conf}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ discover\_\-conf\_\-get\_\-filetype\_\-name ({\bf discover\_\-filetype\_\-t} {\em filetype})}\label{group__conf_ga10}


Translate an enum filetype value into a string.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em filetype}]Filetype in enumerated form \end{description}
\end{Desc}


Definition at line 682 of file conf.c.

Referenced by discover\_\-xml\_\-get\_\-data\_\-urls().\index{conf@{conf}!discover_conf_get_full_bus_map@{discover\_\-conf\_\-get\_\-full\_\-bus\_\-map}}
\index{discover_conf_get_full_bus_map@{discover\_\-conf\_\-get\_\-full\_\-bus\_\-map}!conf@{conf}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf discover\_\-bus\_\-map\_\-t}$\ast$ discover\_\-conf\_\-get\_\-full\_\-bus\_\-map ({\bf discover\_\-error\_\-t} $\ast$ {\em status})}\label{group__conf_ga2}


Get the full bus map, listing all buses.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em status}]Address in which to place status report \end{description}
\end{Desc}


Definition at line 496 of file conf.c.

References discover\_\-conf\_\-load().

Referenced by discover\_\-device\_\-find().\index{conf@{conf}!discover_conf_get_urls@{discover\_\-conf\_\-get\_\-urls}}
\index{discover_conf_get_urls@{discover\_\-conf\_\-get\_\-urls}!conf@{conf}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf discover\_\-xml\_\-url\_\-t}$\ast$ discover\_\-conf\_\-get\_\-urls ({\bf discover\_\-error\_\-t} $\ast$ {\em status})}\label{group__conf_ga7}


Get the list of URLs from which XML data will be retrieved.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em status}]Address in which to place status report \end{description}
\end{Desc}


Definition at line 599 of file conf.c.

References discover\_\-error::code, discover\_\-conf\_\-load(), and discover\_\-xml\_\-url\_\-new().

Referenced by discover\_\-xml\_\-get\_\-urls().\index{conf@{conf}!discover_conf_insert_url@{discover\_\-conf\_\-insert\_\-url}}
\index{discover_conf_insert_url@{discover\_\-conf\_\-insert\_\-url}!conf@{conf}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void discover\_\-conf\_\-insert\_\-url (char $\ast$ {\em url}, {\bf discover\_\-error\_\-t} $\ast$ {\em status})}\label{group__conf_ga5}


Insert the URL specified in url at the head of the list of URLs where Discover data will be retrieved.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em url}]URL to insert \item[{\em status}]Address in which to place status report \end{description}
\end{Desc}


Definition at line 557 of file conf.c.

References discover\_\-error::code, and discover\_\-conf\_\-load().\index{conf@{conf}!discover_conf_load@{discover\_\-conf\_\-load}}
\index{discover_conf_load@{discover\_\-conf\_\-load}!conf@{conf}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void discover\_\-conf\_\-load ({\bf discover\_\-error\_\-t} $\ast$ {\em status})}\label{group__conf_ga0}


Ensure that the configuration file is loaded. Repeated calls to this function will not change anything, unless you call discover\_\-conf\_\-free.

Technically, this function will lie to you if there is no conf file. Even though no configuration was loaded, repeated calls still will not change anything. However, if we don't do this and a config file is created between the time some long-lived caller first calls discover\_\-conf\_\-load and the time it calls it again, it will be loaded. This doesn't strike me as idempotent behavior. So, repeated calls even in this case will not change anything unless you call discover\_\-conf\_\-free.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em status}]Address in which to place status report \end{description}
\end{Desc}


Definition at line 378 of file conf.c.

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

Referenced by discover\_\-conf\_\-append\_\-url(), discover\_\-conf\_\-get\_\-bus\_\-map(), discover\_\-conf\_\-get\_\-bus\_\-map\_\-by\_\-name(), discover\_\-conf\_\-get\_\-full\_\-bus\_\-map(), discover\_\-conf\_\-get\_\-urls(), and discover\_\-conf\_\-insert\_\-url().\index{conf@{conf}!discover_conf_name_to_bus@{discover\_\-conf\_\-name\_\-to\_\-bus}}
\index{discover_conf_name_to_bus@{discover\_\-conf\_\-name\_\-to\_\-bus}!conf@{conf}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int discover\_\-conf\_\-name\_\-to\_\-bus (char $\ast$ {\em name}, {\bf discover\_\-error\_\-t} $\ast$ {\em status})}\label{group__conf_ga1}


Get the bus enumeration for a bus name.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]Name of the bus \item[{\em status}]Address in which to place status report \end{description}
\end{Desc}


Definition at line 477 of file conf.c.

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

Referenced by \_\-real\_\-discover\_\-conf\_\-get\_\-bus\_\-map\_\-by\_\-name().