class SlaveInterface

# 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 )
- void setOffset ( KIO::filesize_t offset )
- KIO::filesize_t offset () const

#### 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 ( KIO::filesize_t )
- void metaData ( const KIO::MetaData & )
- void totalSize ( KIO::filesize_t )
- void processedSize ( KIO::filesize_t )
- void redirection ( const KURL& )
- void speed ( unsigned long )
- void errorPage ()
- void mimeType ( const QString & )
- void warning ( const QString & )
- void infoMessage ( const QString & )
- void connectFinished ()
- void authorizationKey ( const QCString&, const QCString&, bool )
- void delAuthorization ( const QCString& grpkey )

#### 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 &)
- virtual void virtual_hook ( int id, void* data )

#### Protected Slots

- void calcSpeed ()

#### 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 setOffset ( KIO::filesize_t offset ) | ### setOffset

KIO::filesize_t offset () | ### offset

[const]

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 ( KIO::filesize_t ) | ### canResume

[signal]

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

[signal]

void totalSize ( KIO::filesize_t ) | ### totalSize

[signal]

void processedSize ( KIO::filesize_t ) | ### 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 infoMessage ( const QString & ) | ### infoMessage

[signal]

void connectFinished () | ### connectFinished

[signal]

void authorizationKey ( const QCString&, const QCString&, bool ) | ### authorizationKey

[signal]

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

NOTE: this signal is also emitted whenever a

Parameters:

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

void delAuthorization ( const QCString& grpkey ) | ### delAuthorization

[signal]

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

Parameters:

grpkey | group token under which authorization is stored.

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]

void calcSpeed () | ### calcSpeed

[protected slots slot]

Connection * m_pConnection | ### m_pConnection

[protected]

void virtual_hook ( int id, void* data ) | ### virtual_hook

[protected virtual]

Generated by: root on macppc.ports.openbsd.org on Sat Sep 6 10:36:57 2003, using kdoc 2.0a54.