\section{KIO::Slave\-Interface Class Reference}
\label{classKIO_1_1SlaveInterface}\index{KIO::SlaveInterface@{KIO::SlaveInterface}}
There are two classes that specifies the protocol between application (job) and kioslave.  


{\tt \#include $<$slaveinterface.h$>$}

Inheritance diagram for KIO::Slave\-Interface:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=70pt]{classKIO_1_1SlaveInterface__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KIO::Slave\-Interface:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=235pt]{classKIO_1_1SlaveInterface__coll__graph}
\end{center}
\end{figure}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf data} (const  {\bf QByte\-Array} \&)\label{classKIO_1_1SlaveInterface_l0}

\item 
void {\bf data\-Req} ()\label{classKIO_1_1SlaveInterface_l1}

\item 
void {\bf error} (int, const  {\bf QString} \&)\label{classKIO_1_1SlaveInterface_l2}

\item 
void {\bf connected} ()\label{classKIO_1_1SlaveInterface_l3}

\item 
void {\bf finished} ()\label{classKIO_1_1SlaveInterface_l4}

\item 
void {\bf slave\-Status} (pid\_\-t, const  {\bf QCString} \&, const  {\bf QString} \&, bool)\label{classKIO_1_1SlaveInterface_l5}

\item 
void {\bf list\-Entries} (const  {\bf KIO::UDSEntry\-List} \&)\label{classKIO_1_1SlaveInterface_l6}

\item 
void {\bf stat\-Entry} (const  {\bf KIO::UDSEntry} \&)\label{classKIO_1_1SlaveInterface_l7}

\item 
void {\bf need\-Sub\-URLData} ()\label{classKIO_1_1SlaveInterface_l8}

\item 
void {\bf need\-Progress\-Id} ()\label{classKIO_1_1SlaveInterface_l9}

\item 
void {\bf can\-Resume} (KIO::filesize\_\-t)\label{classKIO_1_1SlaveInterface_l10}

\item 
void {\bf meta\-Data} (const  KIO::Meta\-Data \&)\label{classKIO_1_1SlaveInterface_l11}

\item 
void {\bf total\-Size} (KIO::filesize\_\-t)\label{classKIO_1_1SlaveInterface_l12}

\item 
void {\bf processed\-Size} (KIO::filesize\_\-t)\label{classKIO_1_1SlaveInterface_l13}

\item 
void {\bf redirection} (const  {\bf KURL} \&)\label{classKIO_1_1SlaveInterface_l14}

\item 
void {\bf speed} (unsigned long)\label{classKIO_1_1SlaveInterface_l15}

\item 
void {\bf error\-Page} ()\label{classKIO_1_1SlaveInterface_l16}

\item 
void {\bf mime\-Type} (const  {\bf QString} \&)\label{classKIO_1_1SlaveInterface_l17}

\item 
void {\bf warning} (const  {\bf QString} \&)\label{classKIO_1_1SlaveInterface_l18}

\item 
void {\bf info\-Message} (const  {\bf QString} \&)\label{classKIO_1_1SlaveInterface_l19}

\item 
void {\bf connect\-Finished} ()\label{classKIO_1_1SlaveInterface_l20}

\item 
void {\bf authorization\-Key} (const  {\bf QCString} \&, const  {\bf QCString} \&, bool)
\begin{CompactList}\small\item\em Emitted whenever login (username/password) information needs to be cached. \item\end{CompactList}\item 
void {\bf del\-Authorization} (const  {\bf QCString} \&grpkey)
\begin{CompactList}\small\item\em Emitted when an io-slave requests cached password to be deleted for the specified group. \item\end{CompactList}\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Slave\-Interface} ({\bf Connection} $\ast$connection)\label{classKIO_1_1SlaveInterface_a0}

\item 
void {\bf set\-Connection} ({\bf Connection} $\ast$connection)\label{classKIO_1_1SlaveInterface_a2}

\item 
{\bf Connection} $\ast$ {\bf connection} () const \label{classKIO_1_1SlaveInterface_a3}

\item 
void {\bf set\-Progress\-Id} (int id)\label{classKIO_1_1SlaveInterface_a4}

\item 
int {\bf progress\-Id} () const \label{classKIO_1_1SlaveInterface_a5}

\item 
void {\bf send\-Resume\-Answer} (bool resume)\label{classKIO_1_1SlaveInterface_a6}

\item 
void {\bf set\-Offset} (KIO::filesize\_\-t offset)\label{classKIO_1_1SlaveInterface_a7}

\item 
KIO::filesize\_\-t {\bf offset} () const \label{classKIO_1_1SlaveInterface_a8}

\end{CompactItemize}
\subsection*{Protected Slots}
\begin{CompactItemize}
\item 
void {\bf calc\-Speed} ()\label{classKIO_1_1SlaveInterface_j0}

\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual bool {\bf dispatch} ()\label{classKIO_1_1SlaveInterface_b0}

\item 
virtual bool {\bf dispatch} (int \_\-cmd, const  {\bf QByte\-Array} \&data)\label{classKIO_1_1SlaveInterface_b1}

\item 
void {\bf open\-Pass\-Dlg} ({\bf KIO::Auth\-Info} \&info)
\begin{CompactList}\small\item\em Prompt the user for authrization info (login \& password). \item\end{CompactList}\item 
void {\bf open\-Pass\-Dlg} (const  {\bf QString} \&prompt, const  {\bf QString} \&user, const  {\bf QString} \&caption, const  {\bf QString} \&comment, const  {\bf QString} \&label, bool read\-Only)
\begin{CompactList}\small\item\em Same as above except in the argument it accepts. \item\end{CompactList}\item 
void {\bf open\-Pass\-Dlg} (const  {\bf QString} \&prompt, const  {\bf QString} \&user, bool read\-Only)
\begin{CompactList}\small\item\em Same as above except in the argument it accepts. \item\end{CompactList}\item 
void {\bf message\-Box} (int type, const  {\bf QString} \&text, const  {\bf QString} \&caption, const  {\bf QString} \&button\-Yes, const  {\bf QString} \&button\-No)\label{classKIO_1_1SlaveInterface_b5}

\item 
void {\bf request\-Network} (const  {\bf QString} \&, const  {\bf QString} \&)\label{classKIO_1_1SlaveInterface_b6}

\item 
void {\bf drop\-Network} (const  {\bf QString} \&, const  {\bf QString} \&)\label{classKIO_1_1SlaveInterface_b7}

\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKIO_1_1SlaveInterface_b8}

\end{CompactItemize}
\subsection*{Static Protected Member Functions}
\begin{CompactItemize}
\item 
void {\bf sigpipe\_\-handler} (int)\label{classKIO_1_1SlaveInterface_f0}

\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
{\bf Connection} $\ast$ {\bf m\_\-p\-Connection}\label{classKIO_1_1SlaveInterface_p0}

\end{CompactItemize}


\subsection{Detailed Description}
There are two classes that specifies the protocol between application (job) and kioslave. 

{\bf Slave\-Interface}{\rm (p.\,\pageref{classKIO_1_1SlaveInterface})} is the class to use on the application end, {\bf Slave\-Base}{\rm (p.\,\pageref{classKIO_1_1SlaveBase})} is the one to use on the slave end.

A call to foo() results in a call to slot\-Foo() on the other end. 



Definition at line 127 of file slaveinterface.h.

\subsection{Member Function Documentation}
\index{KIO::SlaveInterface@{KIO::Slave\-Interface}!authorizationKey@{authorizationKey}}
\index{authorizationKey@{authorizationKey}!KIO::SlaveInterface@{KIO::Slave\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Slave\-Interface::authorization\-Key (const {\bf QCString} \&, const {\bf QCString} \&, bool)\hspace{0.3cm}{\tt  [signal]}}\label{classKIO_1_1SlaveInterface_l21}


Emitted whenever login (username/password) information needs to be cached. 

NOTE: this signal is also emitted whenever a \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em key}]token under which authorization is stored. \item[{\em grpkey}]group token under which authorization is stored. \item[{\em keep}]if true, user requested password to be cached for entire {\bf KDE} session. \end{description}
\end{Desc}
\index{KIO::SlaveInterface@{KIO::Slave\-Interface}!delAuthorization@{delAuthorization}}
\index{delAuthorization@{delAuthorization}!KIO::SlaveInterface@{KIO::Slave\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Slave\-Interface::del\-Authorization (const {\bf QCString} \& {\em grpkey})\hspace{0.3cm}{\tt  [signal]}}\label{classKIO_1_1SlaveInterface_l22}


Emitted when an io-slave requests cached password to be deleted for the specified group. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em grpkey}]group token under which authorization is stored. \end{description}
\end{Desc}
\index{KIO::SlaveInterface@{KIO::Slave\-Interface}!openPassDlg@{openPassDlg}}
\index{openPassDlg@{openPassDlg}!KIO::SlaveInterface@{KIO::Slave\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Slave\-Interface::open\-Pass\-Dlg ({\bf KIO::Auth\-Info} \& {\em info})\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1SlaveInterface_b2}


Prompt the user for authrization info (login \& password). 

Use this function to request authorization info from the the end user. For example to open an empty password dialog using default values:

\small\begin{alltt}
 {\bf KIO::AuthInfo}{\rm (p.\,\pageref{classKIO_1_1AuthInfo})} authInfo;
 bool result = openPassDlg( authInfo );
 if ( result )
 \{
    printf( "Username: %s", result.username.latin1() );
    printf( "Username: %s", result.username.latin1() );
 \}
 \end{alltt}\normalsize 


You can also pre-set some values like the username before hand if it is known as well as the comment and caption to be displayed:

\small\begin{alltt}
 authInfo.comment= "Enter username and password to access acmeone";
 authInfo.caption= "Acme Password Dialog";
 authInfo.username= "Wily E. kaiody";
 bool result = openPassDlg( authInfo );
 if ( result )
 \{
    printf( "Username: %s", result.username.latin1() );
    printf( "Username: %s", result.username.latin1() );
 \}
 \end{alltt}\normalsize 


NOTE: A call to this function can also fail and result in a return value of {\tt false}, if the {\bf UIServer}{\rm (p.\,\pageref{classUIServer})} could not be started for whatever reason.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em See}]{\bf Auth\-Info}{\rm (p.\,\pageref{classKIO_1_1AuthInfo})}. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]{\tt TRUE} if user clicks on \char`\"{}OK\char`\"{}, {\tt FALSE} otherwsie. \end{Desc}


Definition at line 481 of file slaveinterface.cpp.

References Observer::open\-Pass\-Dlg(), KIO::Auth\-Info::prompt, Observer::self(), and KIO::Auth\-Info::username.

Referenced by open\-Pass\-Dlg().\index{KIO::SlaveInterface@{KIO::Slave\-Interface}!openPassDlg@{openPassDlg}}
\index{openPassDlg@{openPassDlg}!KIO::SlaveInterface@{KIO::Slave\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Slave\-Interface::open\-Pass\-Dlg (const {\bf QString} \& {\em prompt}, const {\bf QString} \& {\em user}, const {\bf QString} \& {\em caption}, const {\bf QString} \& {\em comment}, const {\bf QString} \& {\em label}, bool {\em read\-Only})\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1SlaveInterface_b3}


Same as above except in the argument it accepts. 

{\bf This class or method is obsolete, it is provided for compatibility only.}. Use {\bf open\-Pass\-Dlg}{\rm (p.\,\pageref{classKIO_1_1SlaveInterface_b2})}( {\bf Auth\-Info}{\rm (p.\,\pageref{classKIO_1_1AuthInfo})}\& ) instead. 

Definition at line 467 of file slaveinterface.cpp.

References KIO::Auth\-Info::caption, KIO::Auth\-Info::comment, KIO::Auth\-Info::comment\-Label, KStd\-Accel::label(), open\-Pass\-Dlg(), KIO::Auth\-Info::prompt, KIO::Auth\-Info::read\-Only, and KIO::Auth\-Info::username.\index{KIO::SlaveInterface@{KIO::Slave\-Interface}!openPassDlg@{openPassDlg}}
\index{openPassDlg@{openPassDlg}!KIO::SlaveInterface@{KIO::Slave\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Slave\-Interface::open\-Pass\-Dlg (const {\bf QString} \& {\em prompt}, const {\bf QString} \& {\em user}, bool {\em read\-Only})\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1SlaveInterface_b4}


Same as above except in the argument it accepts. 

{\bf This class or method is obsolete, it is provided for compatibility only.}. Use {\bf open\-Pass\-Dlg}{\rm (p.\,\pageref{classKIO_1_1SlaveInterface_b2})}( {\bf Auth\-Info}{\rm (p.\,\pageref{classKIO_1_1AuthInfo})}\& ) instead. 

Definition at line 458 of file slaveinterface.cpp.

References open\-Pass\-Dlg(), KIO::Auth\-Info::prompt, KIO::Auth\-Info::read\-Only, and KIO::Auth\-Info::username.

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
slaveinterface.h\item 
slaveinterface.cpp\end{CompactItemize}
