\section{basedir.h File Reference}
\label{basedir_8h}\index{basedir.h@{basedir.h}}
XDG base directory functions for ROX-CLib. 

\subsection*{Functions}
\begin{CompactItemize}
\item 
gchar $\ast$ {\bf rox\_\-basedir\_\-save\_\-config\_\-path} (const char $\ast$resource, const char $\ast$leaf)
\item 
gchar $\ast$ {\bf rox\_\-basedir\_\-save\_\-data\_\-path} (const char $\ast$resource, const char $\ast$leaf)
\item 
gchar $\ast$ {\bf rox\_\-basedir\_\-load\_\-config\_\-path} (const char $\ast$resource, const char $\ast$leaf)
\item 
gchar $\ast$ {\bf rox\_\-basedir\_\-load\_\-data\_\-path} (const char $\ast$resource, const char $\ast$leaf)
\item 
GList $\ast$ {\bf rox\_\-basedir\_\-load\_\-config\_\-paths} (const char $\ast$resource, const char $\ast$leaf)
\item 
GList $\ast$ {\bf rox\_\-basedir\_\-load\_\-data\_\-paths} (const char $\ast$resource, const char $\ast$leaf)
\item 
void {\bf rox\_\-basedir\_\-free\_\-paths} (GList $\ast$paths)
\item 
const gchar $\ast$ {\bf rox\_\-basedir\_\-get\_\-config\_\-home} (void)
\item 
GList $\ast$ {\bf rox\_\-basedir\_\-get\_\-config\_\-paths} (void)
\item 
gchar $\ast$ {\bf basedir\_\-save\_\-config\_\-path} (const char $\ast$resource, const char $\ast$leaf)
\item 
gchar $\ast$ {\bf basedir\_\-save\_\-data\_\-path} (const char $\ast$resource, const char $\ast$leaf)
\item 
gchar $\ast$ {\bf basedir\_\-load\_\-config\_\-path} (const char $\ast$resource, const char $\ast$leaf)
\item 
gchar $\ast$ {\bf basedir\_\-load\_\-data\_\-path} (const char $\ast$resource, const char $\ast$leaf)
\item 
GList $\ast$ {\bf basedir\_\-load\_\-config\_\-paths} (const char $\ast$resource, const char $\ast$leaf)
\item 
GList $\ast$ {\bf basedir\_\-load\_\-data\_\-paths} (const char $\ast$resource, const char $\ast$leaf)
\item 
const gchar $\ast$ {\bf basedir\_\-get\_\-config\_\-home} (void)
\item 
GList $\ast$ {\bf basedir\_\-get\_\-config\_\-paths} (void)
\end{CompactItemize}


\subsection{Detailed Description}
XDG base directory functions for ROX-CLib. 

\begin{Desc}
\item[Author:]Stephen Watson \end{Desc}
\begin{Desc}
\item[Version:]\begin{Desc}
\item[Id]\doxyref{basedir.h}{p.}{basedir_8h},v 1.6 2006/08/12 17:04:56 stephen Exp \end{Desc}
\end{Desc}


\subsection{Function Documentation}
\index{basedir.h@{basedir.h}!basedir_get_config_home@{basedir\_\-get\_\-config\_\-home}}
\index{basedir_get_config_home@{basedir\_\-get\_\-config\_\-home}!basedir.h@{basedir.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const gchar$\ast$ basedir\_\-get\_\-config\_\-home (void)}\label{basedir_8h_bb93f0240ac227830e9ba72de468de3b}


\begin{Desc}
\item[Returns:]The directory where the user may write configuration files.\end{Desc}
\begin{Desc}
\item[{\bf Deprecated}]use \doxyref{rox\_\-basedir\_\-get\_\-config\_\-home()}{p.}{basedir_8c_ffdb877a4d829408289d7e7044ce410d} \end{Desc}
\index{basedir.h@{basedir.h}!basedir_get_config_paths@{basedir\_\-get\_\-config\_\-paths}}
\index{basedir_get_config_paths@{basedir\_\-get\_\-config\_\-paths}!basedir.h@{basedir.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}GList$\ast$ basedir\_\-get\_\-config\_\-paths (void)}\label{basedir_8h_680c06d30395f5206a142e62dfe39fff}


\begin{Desc}
\item[Returns:]A list of directories to be searched for configuration files. Free the list but not the directories.\end{Desc}
\begin{Desc}
\item[{\bf Deprecated}]use \doxyref{rox\_\-basedir\_\-get\_\-config\_\-home()}{p.}{basedir_8c_ffdb877a4d829408289d7e7044ce410d} \end{Desc}
\index{basedir.h@{basedir.h}!basedir_load_config_path@{basedir\_\-load\_\-config\_\-path}}
\index{basedir_load_config_path@{basedir\_\-load\_\-config\_\-path}!basedir.h@{basedir.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}gchar$\ast$ basedir\_\-load\_\-config\_\-path (const char $\ast$ {\em resource}, const char $\ast$ {\em leaf})}\label{basedir_8h_ae9abcc5eec8c44ebab79c0b62981b05}


Return the full path to a file from which configuration may be loaded.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[\mbox{$\leftarrow$} {\em resource}]Either the name of the program (\char`\"{}Clock\char`\"{}) or the programmers domain and the name of the program as \char`\"{}kerofin.demon.co.uk/Clock\char`\"{} \item[\mbox{$\leftarrow$} {\em leaf}]Last part of file name, such as \char`\"{}alarms.xml\char`\"{}. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Full path to the file, pass to g\_\-free() when done, or {\tt NULL} if no such file found.\end{Desc}
\begin{Desc}
\item[{\bf Deprecated}]use \doxyref{rox\_\-basedir\_\-load\_\-config\_\-path()}{p.}{basedir_8c_1ec7ba0d619f63e4ed3004dd8e6a01a6}. \end{Desc}
\index{basedir.h@{basedir.h}!basedir_load_config_paths@{basedir\_\-load\_\-config\_\-paths}}
\index{basedir_load_config_paths@{basedir\_\-load\_\-config\_\-paths}!basedir.h@{basedir.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}GList$\ast$ basedir\_\-load\_\-config\_\-paths (const char $\ast$ {\em resource}, const char $\ast$ {\em leaf})}\label{basedir_8h_0974265520dc1f2a6a2c51822bee243c}


Return a list of full paths to a file from which configuration may be loaded in each diretory where it exists. Useful for merging the conents of multiple files..

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[\mbox{$\leftarrow$} {\em resource}]Either the name of the program (\char`\"{}Clock\char`\"{}) or the programmers domain and the name of the program as \char`\"{}kerofin.demon.co.uk/Clock\char`\"{} \item[\mbox{$\leftarrow$} {\em leaf}]Last part of file name, such as \char`\"{}alarms.xml\char`\"{}. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]List of full path to files, pass to \doxyref{rox\_\-basedir\_\-free\_\-paths()}{p.}{basedir_8c_94a837190776a3e4982453bb3ab9b408} when done, or {\tt NULL} if no such file found.\end{Desc}
\begin{Desc}
\item[{\bf Deprecated}]use \doxyref{rox\_\-basedir\_\-load\_\-config\_\-paths()}{p.}{basedir_8c_66b18cdc0b11a52ec71980004f32e41d}. \end{Desc}
\index{basedir.h@{basedir.h}!basedir_load_data_path@{basedir\_\-load\_\-data\_\-path}}
\index{basedir_load_data_path@{basedir\_\-load\_\-data\_\-path}!basedir.h@{basedir.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}gchar$\ast$ basedir\_\-load\_\-data\_\-path (const char $\ast$ {\em resource}, const char $\ast$ {\em leaf})}\label{basedir_8h_879f09fa3cb63662f085c997d10aa241}


Return the full path to a file from which data may be loaded.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[\mbox{$\leftarrow$} {\em resource}]Either the name of the program (\char`\"{}Clock\char`\"{}) or the programmers domain and the name of the program as \char`\"{}kerofin.demon.co.uk/Clock\char`\"{} \item[\mbox{$\leftarrow$} {\em leaf}]Last part of file name, such as \char`\"{}alarms.xml\char`\"{}. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Full path to the file, pass to g\_\-free() when done, or {\tt NULL} if no such file found. \end{Desc}
\index{basedir.h@{basedir.h}!basedir_load_data_paths@{basedir\_\-load\_\-data\_\-paths}}
\index{basedir_load_data_paths@{basedir\_\-load\_\-data\_\-paths}!basedir.h@{basedir.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}GList$\ast$ basedir\_\-load\_\-data\_\-paths (const char $\ast$ {\em resource}, const char $\ast$ {\em leaf})}\label{basedir_8h_ed1d6a0ffcdf12903650334b9d9c937a}


Return a list of full paths to a file from which data may be loaded in each diretory where it exists. Useful for merging the conents of multiple files..

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[\mbox{$\leftarrow$} {\em resource}]Either the name of the program (\char`\"{}Clock\char`\"{}) or the programmers domain and the name of the program as \char`\"{}kerofin.demon.co.uk/Clock\char`\"{} \item[\mbox{$\leftarrow$} {\em leaf}]Last part of file name, such as \char`\"{}alarms.xml\char`\"{}. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]List of full path to files, pass to \doxyref{rox\_\-basedir\_\-free\_\-paths()}{p.}{basedir_8c_94a837190776a3e4982453bb3ab9b408} when done, or {\tt NULL} if no such file found.\end{Desc}
\begin{Desc}
\item[{\bf Deprecated}]use \doxyref{rox\_\-basedir\_\-load\_\-data\_\-paths()}{p.}{basedir_8c_acd8398a5586b13e6a07e37c8c7fa25c}. \end{Desc}
\index{basedir.h@{basedir.h}!basedir_save_config_path@{basedir\_\-save\_\-config\_\-path}}
\index{basedir_save_config_path@{basedir\_\-save\_\-config\_\-path}!basedir.h@{basedir.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}gchar$\ast$ basedir\_\-save\_\-config\_\-path (const char $\ast$ {\em resource}, const char $\ast$ {\em leaf})}\label{basedir_8h_59e9b836a63dd5d1572ba3d1fc986a79}


Return the full path to a file where configuration may be saved.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[\mbox{$\leftarrow$} {\em resource}]Either the name of the program (\char`\"{}Clock\char`\"{}) or the programmers domain and the name of the program as \char`\"{}kerofin.demon.co.uk/Clock\char`\"{} \item[\mbox{$\leftarrow$} {\em leaf}]Last part of file name, such as \char`\"{}alarms.xml\char`\"{}. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Full path to the file, pass to g\_\-free() when done, or {\tt NULL} if saving has been disabled.\end{Desc}
\begin{Desc}
\item[{\bf Deprecated}]use \doxyref{rox\_\-basedir\_\-save\_\-config\_\-path()}{p.}{basedir_8c_942fc06fe0caf167250693718c06393f}. \end{Desc}
\index{basedir.h@{basedir.h}!basedir_save_data_path@{basedir\_\-save\_\-data\_\-path}}
\index{basedir_save_data_path@{basedir\_\-save\_\-data\_\-path}!basedir.h@{basedir.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}gchar$\ast$ basedir\_\-save\_\-data\_\-path (const char $\ast$ {\em resource}, const char $\ast$ {\em leaf})}\label{basedir_8h_bbae0318565c8017dfba7f2c68fbbd12}


Return the full path to a file where data may be saved. Normally this is not required.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[\mbox{$\leftarrow$} {\em resource}]Either the name of the program (\char`\"{}Clock\char`\"{}) or the programmers domain and the name of the program as \char`\"{}kerofin.demon.co.uk/Clock\char`\"{} \item[\mbox{$\leftarrow$} {\em leaf}]Last part of file name, such as \char`\"{}alarms.xml\char`\"{}. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Full path to the file, pass to g\_\-free() when done, or {\tt NULL} if saving has been disabled.\end{Desc}
\begin{Desc}
\item[{\bf Deprecated}]use \doxyref{rox\_\-basedir\_\-save\_\-data\_\-path()}{p.}{basedir_8c_5a27daa6daed3830086f167e75f825a2}. \end{Desc}
\index{basedir.h@{basedir.h}!rox_basedir_free_paths@{rox\_\-basedir\_\-free\_\-paths}}
\index{rox_basedir_free_paths@{rox\_\-basedir\_\-free\_\-paths}!basedir.h@{basedir.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void rox\_\-basedir\_\-free\_\-paths (GList $\ast$ {\em paths})}\label{basedir_8h_94a837190776a3e4982453bb3ab9b408}


Free a list returned by \doxyref{basedir\_\-load\_\-config\_\-paths()}{p.}{basedir_8c_0974265520dc1f2a6a2c51822bee243c} or \doxyref{basedir\_\-load\_\-data\_\-paths()}{p.}{basedir_8c_ed1d6a0ffcdf12903650334b9d9c937a}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[\mbox{$\leftrightarrow$} {\em paths}]list of paths. \end{description}
\end{Desc}
\index{basedir.h@{basedir.h}!rox_basedir_get_config_home@{rox\_\-basedir\_\-get\_\-config\_\-home}}
\index{rox_basedir_get_config_home@{rox\_\-basedir\_\-get\_\-config\_\-home}!basedir.h@{basedir.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const gchar$\ast$ rox\_\-basedir\_\-get\_\-config\_\-home (void)}\label{basedir_8h_ffdb877a4d829408289d7e7044ce410d}


\begin{Desc}
\item[Returns:]The directory where the user may write configuration files. \end{Desc}
\index{basedir.h@{basedir.h}!rox_basedir_get_config_paths@{rox\_\-basedir\_\-get\_\-config\_\-paths}}
\index{rox_basedir_get_config_paths@{rox\_\-basedir\_\-get\_\-config\_\-paths}!basedir.h@{basedir.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}GList$\ast$ rox\_\-basedir\_\-get\_\-config\_\-paths (void)}\label{basedir_8h_adb8f62b33c22e03ef4216459b4ebe36}


\begin{Desc}
\item[Returns:]A list of directories to be searched for configuration files. Free the list but not the directories. \end{Desc}
\index{basedir.h@{basedir.h}!rox_basedir_load_config_path@{rox\_\-basedir\_\-load\_\-config\_\-path}}
\index{rox_basedir_load_config_path@{rox\_\-basedir\_\-load\_\-config\_\-path}!basedir.h@{basedir.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}gchar$\ast$ rox\_\-basedir\_\-load\_\-config\_\-path (const char $\ast$ {\em resource}, const char $\ast$ {\em leaf})}\label{basedir_8h_1ec7ba0d619f63e4ed3004dd8e6a01a6}


Return the full path to a file from which configuration may be loaded.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[\mbox{$\leftarrow$} {\em resource}]Either the name of the program (\char`\"{}Clock\char`\"{}) or the programmers domain and the name of the program as \char`\"{}kerofin.demon.co.uk/Clock\char`\"{} \item[\mbox{$\leftarrow$} {\em leaf}]Last part of file name, such as \char`\"{}alarms.xml\char`\"{}. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Full path to the file, pass to g\_\-free() when done, or {\tt NULL} if no such file found. \end{Desc}
\index{basedir.h@{basedir.h}!rox_basedir_load_config_paths@{rox\_\-basedir\_\-load\_\-config\_\-paths}}
\index{rox_basedir_load_config_paths@{rox\_\-basedir\_\-load\_\-config\_\-paths}!basedir.h@{basedir.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}GList$\ast$ rox\_\-basedir\_\-load\_\-config\_\-paths (const char $\ast$ {\em resource}, const char $\ast$ {\em leaf})}\label{basedir_8h_66b18cdc0b11a52ec71980004f32e41d}


Return a list of full paths to a file from which configuration may be loaded in each diretory where it exists. Useful for merging the conents of multiple files..

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[\mbox{$\leftarrow$} {\em resource}]Either the name of the program (\char`\"{}Clock\char`\"{}) or the programmers domain and the name of the program as \char`\"{}kerofin.demon.co.uk/Clock\char`\"{} \item[\mbox{$\leftarrow$} {\em leaf}]Last part of file name, such as \char`\"{}alarms.xml\char`\"{}. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]List of full path to files, pass to \doxyref{rox\_\-basedir\_\-free\_\-paths()}{p.}{basedir_8c_94a837190776a3e4982453bb3ab9b408} when done, or {\tt NULL} if no such file found. \end{Desc}
\index{basedir.h@{basedir.h}!rox_basedir_load_data_path@{rox\_\-basedir\_\-load\_\-data\_\-path}}
\index{rox_basedir_load_data_path@{rox\_\-basedir\_\-load\_\-data\_\-path}!basedir.h@{basedir.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}gchar$\ast$ rox\_\-basedir\_\-load\_\-data\_\-path (const char $\ast$ {\em resource}, const char $\ast$ {\em leaf})}\label{basedir_8h_ed29bd011fa389de2b3f15330eac45f2}


Return the full path to a file from which data may be loaded.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[\mbox{$\leftarrow$} {\em resource}]Either the name of the program (\char`\"{}Clock\char`\"{}) or the programmers domain and the name of the program as \char`\"{}kerofin.demon.co.uk/Clock\char`\"{} \item[\mbox{$\leftarrow$} {\em leaf}]Last part of file name, such as \char`\"{}alarms.xml\char`\"{}. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Full path to the file, pass to g\_\-free() when done, or {\tt NULL} if no such file found. \end{Desc}
\index{basedir.h@{basedir.h}!rox_basedir_load_data_paths@{rox\_\-basedir\_\-load\_\-data\_\-paths}}
\index{rox_basedir_load_data_paths@{rox\_\-basedir\_\-load\_\-data\_\-paths}!basedir.h@{basedir.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}GList$\ast$ rox\_\-basedir\_\-load\_\-data\_\-paths (const char $\ast$ {\em resource}, const char $\ast$ {\em leaf})}\label{basedir_8h_acd8398a5586b13e6a07e37c8c7fa25c}


Return a list of full paths to a file from which data may be loaded in each diretory where it exists. Useful for merging the conents of multiple files..

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[\mbox{$\leftarrow$} {\em resource}]Either the name of the program (\char`\"{}Clock\char`\"{}) or the programmers domain and the name of the program as \char`\"{}kerofin.demon.co.uk/Clock\char`\"{} \item[\mbox{$\leftarrow$} {\em leaf}]Last part of file name, such as \char`\"{}alarms.xml\char`\"{}. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]List of full path to files, pass to \doxyref{rox\_\-basedir\_\-free\_\-paths()}{p.}{basedir_8c_94a837190776a3e4982453bb3ab9b408} when done, or {\tt NULL} if no such file found. \end{Desc}
\index{basedir.h@{basedir.h}!rox_basedir_save_config_path@{rox\_\-basedir\_\-save\_\-config\_\-path}}
\index{rox_basedir_save_config_path@{rox\_\-basedir\_\-save\_\-config\_\-path}!basedir.h@{basedir.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}gchar$\ast$ rox\_\-basedir\_\-save\_\-config\_\-path (const char $\ast$ {\em resource}, const char $\ast$ {\em leaf})}\label{basedir_8h_942fc06fe0caf167250693718c06393f}


Return the full path to a file where configuration may be saved.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[\mbox{$\leftarrow$} {\em resource}]Either the name of the program (\char`\"{}Clock\char`\"{}) or the programmers domain and the name of the program as \char`\"{}kerofin.demon.co.uk/Clock\char`\"{} \item[\mbox{$\leftarrow$} {\em leaf}]Last part of file name, such as \char`\"{}alarms.xml\char`\"{}. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Full path to the file, pass to g\_\-free() when done, or {\tt NULL} if saving has been disabled \end{Desc}
\index{basedir.h@{basedir.h}!rox_basedir_save_data_path@{rox\_\-basedir\_\-save\_\-data\_\-path}}
\index{rox_basedir_save_data_path@{rox\_\-basedir\_\-save\_\-data\_\-path}!basedir.h@{basedir.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}gchar$\ast$ rox\_\-basedir\_\-save\_\-data\_\-path (const char $\ast$ {\em resource}, const char $\ast$ {\em leaf})}\label{basedir_8h_5a27daa6daed3830086f167e75f825a2}


Return the full path to a file where data may be saved. Normally this is not required.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[\mbox{$\leftarrow$} {\em resource}]Either the name of the program (\char`\"{}Clock\char`\"{}) or the programmers domain and the name of the program as \char`\"{}kerofin.demon.co.uk/Clock\char`\"{} \item[\mbox{$\leftarrow$} {\em leaf}]Last part of file name, such as \char`\"{}alarms.xml\char`\"{}. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Full path to the file, pass to g\_\-free() when done, or {\tt NULL} if saving has been disabled \end{Desc}
