\section{/home/pere/src/debiancvs/pkg-discover/discover/trunk/lib/conf.c File Reference}
\label{conf_8c}\index{/home/pere/src/debiancvs/pkg-discover/discover/trunk/lib/conf.c@{/home/pere/src/debiancvs/pkg-discover/discover/trunk/lib/conf.c}}
Configuration handling (including XML parsing). 

{\tt \#include \char`\"{}config.h\char`\"{}}\par
{\tt \#include $<$assert.h$>$}\par
{\tt \#include $<$string.h$>$}\par
{\tt \#include $<$expat.h$>$}\par
{\tt \#include $<$discover/discover.h$>$}\par
{\tt \#include $<$discover/discover-conf.h$>$}\par
{\tt \#include $<$discover/discover-xml.h$>$}\par
{\tt \#include $<$discover/load-url.h$>$}\par
{\tt \#include $<$discover/url-xml.h$>$}\par
{\tt \#include $<$discover/utils.h$>$}\par
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define {\bf dirent}~direct\label{conf_8c_a0}

\item 
\#define {\bf NAMLEN}(d)~(d) $\rightarrow$ d\_\-namlen\label{conf_8c_a1}

\end{CompactItemize}
\subsection*{Enumerations}
\begin{CompactItemize}
\item 
enum {\bf state} \{ {\bf START}, 
{\bf BUSSCAN}, 
{\bf DATA\_\-SOURCES}
 \}
\item 
enum {\bf scan\_\-flag} \{ {\bf SCAN\_\-NEVER}, 
{\bf SCAN\_\-DEFAULT}
 \}
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
{\bf discover\_\-bus\_\-map\_\-t} $\ast$ {\bf \_\-real\_\-discover\_\-conf\_\-get\_\-bus\_\-map} ({\bf discover\_\-bus\_\-t} bus, {\bf discover\_\-error\_\-t} $\ast$status)
\item 
{\bf discover\_\-bus\_\-map\_\-t} $\ast$ {\bf \_\-real\_\-discover\_\-conf\_\-get\_\-bus\_\-map\_\-by\_\-name} (char $\ast$name, {\bf discover\_\-error\_\-t} $\ast$status)
\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{Detailed Description}
Configuration handling (including XML parsing). 

Configuration-related data is handled here. This file is responsible for loading and parsing the XML data read from the configuration file. This file also holds the routines that are responsible for altering the URL list as requested by the caller. 

Definition in file {\bf conf.c}.

\subsection{Enumeration Type Documentation}
\index{conf.c@{conf.c}!scan_flag@{scan\_\-flag}}
\index{scan_flag@{scan\_\-flag}!conf.c@{conf.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}enum {\bf scan\_\-flag}}\label{conf_8c_a34}


Define the values for a scannable bus. 

Definition at line 93 of file conf.c.\index{conf.c@{conf.c}!state@{state}}
\index{state@{state}!conf.c@{conf.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}enum {\bf state}}\label{conf_8c_a33}


Describe the current state within the XML structure. 

Definition at line 90 of file conf.c.

\subsection{Function Documentation}
\index{conf.c@{conf.c}!_real_discover_conf_get_bus_map@{\_\-real\_\-discover\_\-conf\_\-get\_\-bus\_\-map}}
\index{_real_discover_conf_get_bus_map@{\_\-real\_\-discover\_\-conf\_\-get\_\-bus\_\-map}!conf.c@{conf.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf discover\_\-bus\_\-map\_\-t}$\ast$ \_\-real\_\-discover\_\-conf\_\-get\_\-bus\_\-map ({\bf discover\_\-bus\_\-t} {\em bus}, {\bf discover\_\-error\_\-t} $\ast$ {\em status})}\label{conf_8c_a16}


Function that loads the bus map

The \char`\"{}real\char`\"{} get\_\-bus\_\-map functions don't call conf\_\-load(), which is important to avoid infinite loops. 

Definition at line 154 of file conf.c.

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

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


Internal function that really loads the bus map 

Definition at line 168 of file conf.c.

References \_\-real\_\-discover\_\-conf\_\-get\_\-bus\_\-map(), discover\_\-error::code, and discover\_\-conf\_\-name\_\-to\_\-bus().

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