# class SlaveInterface | There are two classes that specifies the protocol between application (job) and kioslave. More...
Full name | `KIO::SlaveInterface`
Definition | `#include <slaveinterface.h>`
Inherits | QObject (qt) [public ]
Inherited by | Slave
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- SlaveInterface ( Connection *connection )
- virtual ~SlaveInterface ()
- void setConnection ( Connection* connection )
- Connection * connection () const
- void setProgressId ( int id )
- int progressId () const
- void sendResumeAnswer ( bool resume )

#### Signals

- void data ( const QByteArray & )
- void dataReq ( )
- void error ( int , const QString & )
- void connected ()
- void finished ()
- void slaveStatus (pid_t, const QCString &, const QString &, bool)
- void listEntries ( const KIO::UDSEntryList& )
- void statEntry ( const KIO::UDSEntry& )
- void needSubURLData ()
- void needProgressId ()
- void canResume ( unsigned long )
- void metaData ( const KIO::MetaData & )
- void totalSize ( unsigned long )
- void processedSize ( unsigned long )
- void redirection ( const KURL& )
- void speed ( unsigned long )
- void errorPage ()
- void mimeType ( const QString & )
- void warning ( const QString & )
- void gettingFile ( const QString & )
- void infoMessage ( const QString & )
- void connectFinished ()
- void authenticationKey ( const QCString &, const QCString & )
- void authorizationKey ( const QCString & key, const QCString & grp, bool keep )

#### Protected Methods

- virtual bool dispatch ()
- virtual bool dispatch ( int _cmd, const QByteArray &data )
- void openPassDlg ( KIO::AuthInfo& info )
- void openPassDlg ( const QString& prompt, const QString& user, const QString& caption, const QString& comment, const QString& label, bool readOnly )
- void openPassDlg ( const QString& prompt, const QString& user, bool readOnly )
- void messageBox ( int type, const QString &text, const QString &caption, const QString &buttonYes, const QString &buttonNo )
- void requestNetwork ( const QString &, const QString &)
- void dropNetwork ( const QString &, const QString &)

#### Protected Static Methods

- static void sigpipe_handler (int)

#### Protected Members

- Connection * m_pConnection

## Detailed Description

There are two classes that specifies the protocol between application (job) and kioslave. SlaveInterface is the class to use on the application end, SlaveBase is the one to use on the slave end.

A call to foo() results in a call to slotFoo() on the other end.

SlaveInterface ( Connection *connection ) | ### SlaveInterface

~SlaveInterface () | ### ~SlaveInterface

[virtual]

void setConnection ( Connection* connection ) | ### setConnection

Connection * connection () | ### connection

[const]

void setProgressId ( int id ) | ### setProgressId

int progressId () | ### progressId

[const]

void sendResumeAnswer ( bool resume ) | ### sendResumeAnswer

void data ( const QByteArray & ) | ### data

[signal]

void dataReq ( ) | ### dataReq

[signal]

void error ( int , const QString & ) | ### error

[signal]

void connected () | ### connected

[signal]

void finished () | ### finished

[signal]

void slaveStatus (pid_t, const QCString &, const QString &, bool) | ### slaveStatus

[signal]

void listEntries ( const KIO::UDSEntryList& ) | ### listEntries

[signal]

void statEntry ( const KIO::UDSEntry& ) | ### statEntry

[signal]

void needSubURLData () | ### needSubURLData

[signal]

void needProgressId () | ### needProgressId

[signal]

void canResume ( unsigned long ) | ### canResume

[signal]

void metaData ( const KIO::MetaData & ) | ### metaData

[signal]

void totalSize ( unsigned long ) | ### totalSize

[signal]

void processedSize ( unsigned long ) | ### processedSize

[signal]

void redirection ( const KURL& ) | ### redirection

[signal]

void speed ( unsigned long ) | ### speed

[signal]

void errorPage () | ### errorPage

[signal]

void mimeType ( const QString & ) | ### mimeType

[signal]

void warning ( const QString & ) | ### warning

[signal]

void gettingFile ( const QString & ) | ### gettingFile

[signal]

void infoMessage ( const QString & ) | ### infoMessage

[signal]

void connectFinished () | ### connectFinished

[signal]

void authenticationKey ( const QCString &, const QCString & ) | ### authenticationKey

[signal]

NOTE: Do not connect to both this and #authorizationKey. at the same time.

void authorizationKey ( const QCString & key, const QCString & grp, bool keep ) | ### authorizationKey

[signal]

Signal emitted whenever a new password is cached or a cached one is found for use in the io-slaves.

Parameters:

key | token under which authorization is stored.
group | group token under which authorization is stored.
keep | if true, user requested password to be cached for entire KDE session.

bool dispatch () | ### dispatch

[protected virtual]

bool dispatch ( int _cmd, const QByteArray &data ) | ### dispatch

[protected virtual]

void openPassDlg ( KIO::AuthInfo& info ) | ### openPassDlg

[protected]

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:

     KIO::AuthInfo authInfo;
     bool result = openPassDlg( authInfo );
     if ( result )
     {
        printf( "Username: %s", result.username.latin1() );
        printf( "Username: %s", result.username.latin1() );
     }

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:

     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() );
     }

NOTE: A call to this function can also fail and result in a return value of `false`, if the UIServer could not be started for whatever reason.

Parameters:

See | AuthInfo.

Returns: `TRUE` if user clicks on "OK", `FALSE` otherwsie.

void openPassDlg ( const QString& prompt, const QString& user, const QString& caption, const QString& comment, const QString& label, bool readOnly ) | ### openPassDlg

[protected]

Same as above except in the argument it accepts.

void openPassDlg ( const QString& prompt, const QString& user, bool readOnly ) | ### openPassDlg

[protected]

Same as above except in the argument it accepts.

void messageBox ( int type, const QString &text, const QString &caption, const QString &buttonYes, const QString &buttonNo ) | ### messageBox

[protected]

void requestNetwork ( const QString &, const QString &) | ### requestNetwork

[protected]

void dropNetwork ( const QString &, const QString &) | ### dropNetwork

[protected]

void sigpipe_handler (int) | ### sigpipe_handler

[protected static]

Connection * m_pConnection | ### m_pConnection

[protected]

Generated by: root@i386.ports.openbsd.org on Wed Apr 25 13:58:36 2001, using kdoc 2.0a53.