\section{KABC::LDIFConverter Namespace Reference}
\label{namespaceKABC_1_1LDIFConverter}\index{KABC::LDIFConverter@{KABC::LDIFConverter}}
A set of functions to convert a string with {\bf LDIF}{\rm (p.\,\pageref{classKABC_1_1LDIF})} information to addressees and vice versa.  


\subsection*{Functions}
\begin{CompactItemize}
\item 
KABC\_\-EXPORT bool {\bf LDIFTo\-Addressee} (const {\bf QString} \&str, {\bf Addressee\-List} \&addr\-List, {\bf QDate\-Time} dt={\bf QDate\-Time::current\-Date\-Time}())
\item 
KABC\_\-EXPORT bool {\bf addressee\-To\-LDIF} (const {\bf Addressee\-List} \&addr\-List, {\bf QString} \&str)
\item 
KABC\_\-EXPORT bool {\bf addressee\-To\-LDIF} (const {\bf Addressee} \&addr, {\bf QString} \&str)
\item 
KABC\_\-EXPORT {\bf QString} {\bf make\-LDIFfield\-String} ({\bf QString} field, {\bf QString} value, bool allow\-Encode=true) KDE\_\-DEPRECATED
\item 
KABC\_\-EXPORT bool {\bf parse\-Single\-Line} ({\bf Addressee} \&a, {\bf Address} \&home\-Addr, {\bf Address} \&work\-Addr, {\bf QString} \&line)
\item 
KABC\_\-EXPORT bool {\bf split\-Line} ({\bf QString} \&line, {\bf QString} \&fieldname, {\bf QString} \&value)
\item 
KABC\_\-EXPORT bool {\bf evaluate\-Pair} ({\bf Addressee} \&a, {\bf Address} \&home\-Addr, {\bf Address} \&work\-Addr, {\bf QString} \&fieldname, {\bf QString} \&value)\label{namespaceKABC_1_1LDIFConverter_a6}

\end{CompactItemize}


\subsection{Detailed Description}
A set of functions to convert a string with {\bf LDIF}{\rm (p.\,\pageref{classKABC_1_1LDIF})} information to addressees and vice versa. 

It is useful for addressbook import- and exportfilters and might be used to read and write Mozilla and Netscape addresssbooks. 



\subsection{Function Documentation}
\index{KABC::LDIFConverter@{KABC::LDIFConverter}!LDIFToAddressee@{LDIFToAddressee}}
\index{LDIFToAddressee@{LDIFToAddressee}!KABC::LDIFConverter@{KABC::LDIFConverter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KABC\_\-EXPORT bool LDIFTo\-Addressee (const {\bf QString} \& {\em str}, Addressee\-List \& {\em addr\-List}, {\bf QDate\-Time} {\em dt} = {\tt {\bf QDate\-Time::current\-Date\-Time}()})}\label{namespaceKABC_1_1LDIFConverter_a0}


Converts a {\bf LDIF}{\rm (p.\,\pageref{classKABC_1_1LDIF})} string to a list of addressees. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em str}]The vcard string. \item[{\em addr\-List}]The addresseelist. \item[{\em dt}]The date \& time value of the last modification (e.g. file modification time). \end{description}
\end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}
\index{KABC::LDIFConverter@{KABC::LDIFConverter}!addresseeToLDIF@{addresseeToLDIF}}
\index{addresseeToLDIF@{addresseeToLDIF}!KABC::LDIFConverter@{KABC::LDIFConverter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KABC\_\-EXPORT bool addressee\-To\-LDIF (const Addressee\-List \& {\em addr\-List}, {\bf QString} \& {\em str})}\label{namespaceKABC_1_1LDIFConverter_a1}


Converts a list of addressees to a {\bf LDIF}{\rm (p.\,\pageref{classKABC_1_1LDIF})} string. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em addr\-List}]The addresseelist. \item[{\em str}]The {\bf LDIF}{\rm (p.\,\pageref{classKABC_1_1LDIF})} string. \end{description}
\end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}
\index{KABC::LDIFConverter@{KABC::LDIFConverter}!addresseeToLDIF@{addresseeToLDIF}}
\index{addresseeToLDIF@{addresseeToLDIF}!KABC::LDIFConverter@{KABC::LDIFConverter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KABC\_\-EXPORT bool addressee\-To\-LDIF (const Addressee \& {\em addr}, {\bf QString} \& {\em str})}\label{namespaceKABC_1_1LDIFConverter_a2}


Converts an addressee to a {\bf LDIF}{\rm (p.\,\pageref{classKABC_1_1LDIF})} string. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em addr}]The addressee. \item[{\em str}]The {\bf LDIF}{\rm (p.\,\pageref{classKABC_1_1LDIF})} string. \end{description}
\end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}
\index{KABC::LDIFConverter@{KABC::LDIFConverter}!makeLDIFfieldString@{makeLDIFfieldString}}
\index{makeLDIFfieldString@{makeLDIFfieldString}!KABC::LDIFConverter@{KABC::LDIFConverter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KABC\_\-EXPORT {\bf QString} make\-LDIFfield\-String ({\bf QString} {\em field}, {\bf QString} {\em value}, bool {\em allow\-Encode} = {\tt true})}\label{namespaceKABC_1_1LDIFConverter_a3}


\begin{Desc}
\item[{\bf Deprecated}]Obsoleted - please use {\bf LDIF::assemble\-Line()}{\rm (p.\,\pageref{classKABC_1_1LDIF_e0})} Returns a {\bf LDIF}{\rm (p.\,\pageref{classKABC_1_1LDIF})} compatible string representing a given field/value pair. If necessary, the value parameter will be base64encoded and split into multiple. This function will return an empty string if the given value is empty. \end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em field}]The LDAP field name or a complete {\bf LDIF}{\rm (p.\,\pageref{classKABC_1_1LDIF})} field string (e.g. \char`\"{}cn\char`\"{} or \char`\"{}cn = \%1$\backslash$n\char`\"{}). \item[{\em value}]The value for this field. \item[{\em allow\-Encode}]Set to false if you wish no encoding of the value. \end{description}
\end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}
\index{KABC::LDIFConverter@{KABC::LDIFConverter}!parseSingleLine@{parseSingleLine}}
\index{parseSingleLine@{parseSingleLine}!KABC::LDIFConverter@{KABC::LDIFConverter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KABC\_\-EXPORT bool parse\-Single\-Line (Addressee \& {\em a}, Address \& {\em home\-Addr}, Address \& {\em work\-Addr}, {\bf QString} \& {\em line})}\label{namespaceKABC_1_1LDIFConverter_a4}


No need for this function anymore - use {\bf LDIF::split\-Line()}{\rm (p.\,\pageref{classKABC_1_1LDIF_e3})} + evaluate\-Pair(). 

\index{KABC::LDIFConverter@{KABC::LDIFConverter}!splitLine@{splitLine}}
\index{splitLine@{splitLine}!KABC::LDIFConverter@{KABC::LDIFConverter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KABC\_\-EXPORT bool split\-Line ({\bf QString} \& {\em line}, {\bf QString} \& {\em fieldname}, {\bf QString} \& {\em value})}\label{namespaceKABC_1_1LDIFConverter_a5}


No need for this function anymore - use {\bf LDIF::split\-Line()}{\rm (p.\,\pageref{classKABC_1_1LDIF_e3})}. 

