.TH "KIO::SlaveInterface" 3 "28 Jan 2004" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KIO::SlaveInterface \- There are two classes that specifies the protocol between application (job) and kioslave.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <slaveinterface.h>\fP
.PP
Inherits \fBQObject\fP.
.PP
Inherited by KIO::Slave.
.PP
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBdata\fP (const  \fBQByteArray\fP &)"
.br
.ti -1c
.RI "void \fBdataReq\fP ()"
.br
.ti -1c
.RI "void \fBerror\fP (int, const  \fBQString\fP &)"
.br
.ti -1c
.RI "void \fBconnected\fP ()"
.br
.ti -1c
.RI "void \fBfinished\fP ()"
.br
.ti -1c
.RI "void \fBslaveStatus\fP (pid_t, const  \fBQCString\fP &, const  \fBQString\fP &, bool)"
.br
.ti -1c
.RI "void \fBlistEntries\fP (const  \fBKIO::UDSEntryList\fP &)"
.br
.ti -1c
.RI "void \fBstatEntry\fP (const  \fBKIO::UDSEntry\fP &)"
.br
.ti -1c
.RI "void \fBneedSubURLData\fP ()"
.br
.ti -1c
.RI "void \fBneedProgressId\fP ()"
.br
.ti -1c
.RI "void \fBcanResume\fP (KIO::filesize_t)"
.br
.ti -1c
.RI "void \fBmetaData\fP (const  KIO::MetaData &)"
.br
.ti -1c
.RI "void \fBtotalSize\fP (KIO::filesize_t)"
.br
.ti -1c
.RI "void \fBprocessedSize\fP (KIO::filesize_t)"
.br
.ti -1c
.RI "void \fBredirection\fP (const  \fBKURL\fP &)"
.br
.ti -1c
.RI "void \fBspeed\fP (unsigned long)"
.br
.ti -1c
.RI "void \fBerrorPage\fP ()"
.br
.ti -1c
.RI "void \fBmimeType\fP (const  \fBQString\fP &)"
.br
.ti -1c
.RI "void \fBwarning\fP (const  \fBQString\fP &)"
.br
.ti -1c
.RI "void \fBinfoMessage\fP (const  \fBQString\fP &)"
.br
.ti -1c
.RI "void \fBconnectFinished\fP ()"
.br
.ti -1c
.RI "void \fBauthorizationKey\fP (const  \fBQCString\fP &, const  \fBQCString\fP &, bool)"
.br
.RI "\fIEmitted whenever login (username/password) information needs to be cached. \fP"
.ti -1c
.RI "void \fBdelAuthorization\fP (const  \fBQCString\fP &grpkey)"
.br
.RI "\fIEmitted when an io-slave requests cached password to be deleted for the specified group. \fP"
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBSlaveInterface\fP (\fBConnection\fP *connection)"
.br
.ti -1c
.RI "void \fBsetConnection\fP (\fBConnection\fP *connection)"
.br
.ti -1c
.RI "\fBConnection\fP * \fBconnection\fP () const "
.br
.ti -1c
.RI "void \fBsetProgressId\fP (int id)"
.br
.ti -1c
.RI "int \fBprogressId\fP () const "
.br
.ti -1c
.RI "void \fBsendResumeAnswer\fP (bool resume)"
.br
.ti -1c
.RI "void \fBsetOffset\fP (KIO::filesize_t offset)"
.br
.ti -1c
.RI "KIO::filesize_t \fBoffset\fP () const "
.br
.in -1c
.SS "Protected Slots"

.in +1c
.ti -1c
.RI "void \fBcalcSpeed\fP ()"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual bool \fBdispatch\fP ()"
.br
.ti -1c
.RI "virtual bool \fBdispatch\fP (int _cmd, const  \fBQByteArray\fP &data)"
.br
.ti -1c
.RI "void \fBopenPassDlg\fP (\fBKIO::AuthInfo\fP &info)"
.br
.RI "\fIPrompt the user for authrization info (login & password). \fP"
.ti -1c
.RI "void \fBopenPassDlg\fP (const  \fBQString\fP &prompt, const  \fBQString\fP &user, const  \fBQString\fP &caption, const  \fBQString\fP &comment, const  \fBQString\fP &label, bool readOnly)"
.br
.RI "\fISame as above except in the argument it accepts. \fP"
.ti -1c
.RI "void \fBopenPassDlg\fP (const  \fBQString\fP &prompt, const  \fBQString\fP &user, bool readOnly)"
.br
.RI "\fISame as above except in the argument it accepts. \fP"
.ti -1c
.RI "void \fBmessageBox\fP (int type, const  \fBQString\fP &text, const  \fBQString\fP &caption, const  \fBQString\fP &buttonYes, const  \fBQString\fP &buttonNo)"
.br
.ti -1c
.RI "void \fBrequestNetwork\fP (const  \fBQString\fP &, const  \fBQString\fP &)"
.br
.ti -1c
.RI "void \fBdropNetwork\fP (const  \fBQString\fP &, const  \fBQString\fP &)"
.br
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SS "Static Protected Member Functions"

.in +1c
.ti -1c
.RI "void \fBsigpipe_handler\fP (int)"
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "\fBConnection\fP * \fBm_pConnection\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
There are two classes that specifies the protocol between application (job) and kioslave. 

\fBSlaveInterface\fP is the class to use on the application end, \fBSlaveBase\fP is the one to use on the slave end.
.PP
A call to foo() results in a call to slotFoo() on the other end. 
.PP
Definition at line 127 of file slaveinterface.h.
.SH "Member Function Documentation"
.PP 
.SS "void KIO::SlaveInterface::authorizationKey (const \fBQCString\fP &, const \fBQCString\fP &, bool)\fC [signal]\fP"
.PP
Emitted whenever login (username/password) information needs to be cached. NOTE: this signal is also emitted whenever a 
.PP
\fBParameters:\fP
.RS 4
\fIkey\fP token under which authorization is stored. 
.br
\fIgrpkey\fP group token under which authorization is stored. 
.br
\fIkeep\fP if true, user requested password to be cached for entire \fBKDE\fP session. 
.RE
.PP

.SS "void KIO::SlaveInterface::delAuthorization (const \fBQCString\fP & grpkey)\fC [signal]\fP"
.PP
Emitted when an io-slave requests cached password to be deleted for the specified group. \fBParameters:\fP
.RS 4
\fIgrpkey\fP group token under which authorization is stored. 
.RE
.PP

.SS "void SlaveInterface::openPassDlg (\fBKIO::AuthInfo\fP & info)\fC [protected]\fP"
.PP
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:
.PP
.PP
.nf

 \fBKIO::AuthInfo\fP authInfo;
 bool result = openPassDlg( authInfo );
 if ( result )
 {
    printf( 'Username: %s', result.username.latin1() );
    printf( 'Username: %s', result.username.latin1() );
 }
 
.PP
.PP
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:
.PP
.PP
.nf

 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() );
 }
 
.PP
.PP
NOTE: A call to this function can also fail and result in a return value of \fCfalse\fP, if the \fBUIServer\fP could not be started for whatever reason.
.PP
\fBParameters:\fP
.RS 4
\fISee\fP \fBAuthInfo\fP. 
.RE
.PP
\fBReturns:\fP
.RS 4
\fCTRUE\fP if user clicks on 'OK', \fCFALSE\fP otherwsie. 
.RE
.PP
Definition at line 481 of file slaveinterface.cpp.
.PP
References Observer::openPassDlg(), KIO::AuthInfo::prompt, Observer::self(), and KIO::AuthInfo::username.
.PP
Referenced by openPassDlg().
.SS "void SlaveInterface::openPassDlg (const \fBQString\fP & prompt, const \fBQString\fP & user, const \fBQString\fP & caption, const \fBQString\fP & comment, const \fBQString\fP & label, bool readOnly)\fC [protected]\fP"
.PP
Same as above except in the argument it accepts. \fBThis class or method is obsolete, it is provided for compatibility only.\fP. Use \fBopenPassDlg\fP( \fBAuthInfo\fP& ) instead. Definition at line 467 of file slaveinterface.cpp.
.PP
References KIO::AuthInfo::caption, KIO::AuthInfo::comment, KIO::AuthInfo::commentLabel, KStdAccel::label(), openPassDlg(), KIO::AuthInfo::prompt, KIO::AuthInfo::readOnly, and KIO::AuthInfo::username.
.SS "void SlaveInterface::openPassDlg (const \fBQString\fP & prompt, const \fBQString\fP & user, bool readOnly)\fC [protected]\fP"
.PP
Same as above except in the argument it accepts. \fBThis class or method is obsolete, it is provided for compatibility only.\fP. Use \fBopenPassDlg\fP( \fBAuthInfo\fP& ) instead. Definition at line 458 of file slaveinterface.cpp.
.PP
References openPassDlg(), KIO::AuthInfo::prompt, KIO::AuthInfo::readOnly, and KIO::AuthInfo::username.

.SH "Author"
.PP 
Generated automatically by Doxygen for kio Library from the source code.
