kio Library API Documentation

KIO::SlaveInterface Class Reference

There are two classes that specifies the protocol between application ( KIO::Job) and kioslave. More...

#include <slaveinterface.h>

Inheritance diagram for KIO::SlaveInterface:

QObject List of all members.

Signals

void authorizationKey (const QCString &, const QCString &, bool)
void delAuthorization (const QCString &grpkey)

Protected Methods

void openPassDlg (KIO::AuthInfo &info)
void openPassDlg (const QString &prompt, const QString &user, const QString &caption, const QString &comment, const QString &label, bool readOnly) KDE_DEPRECATED
void openPassDlg (const QString &prompt, const QString &user, bool readOnly) KDE_DEPRECATED

Detailed Description

There are two classes that specifies the protocol between application ( KIO::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.

Definition at line 94 of file slaveinterface.h.


Member Function Documentation

void KIO::SlaveInterface::authorizationKey const QCString  ,
const QCString  ,
bool   
[signal]
 

Deprecated:
. Obselete as of 3.1. Replaced by kpassword, a kded module.

void KIO::SlaveInterface::delAuthorization const QCString   grpkey [signal]
 

Deprecated:
. Obselete as of 3.1. Replaced by kpassword, a kded module.

void SlaveInterface::openPassDlg KIO::AuthInfo   info [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:
info  See AuthInfo.
Returns:
true if user clicks on "OK", false otherwsie.

Definition at line 476 of file slaveinterface.cpp.

References Observer::openPassDlg(), KIO::AuthInfo::prompt, Observer::self(), KIO::Connection::sendnow(), and KIO::AuthInfo::username.

Referenced by openPassDlg().

void SlaveInterface::openPassDlg const QString   prompt,
const QString   user,
const QString   caption,
const QString   comment,
const QString   label,
bool    readOnly
[protected]
 

Deprecated:
. Use openPassDlg( AuthInfo& ) instead.

Definition at line 462 of file slaveinterface.cpp.

References KIO::AuthInfo::caption, KIO::AuthInfo::comment, KIO::AuthInfo::commentLabel, KStdAccel::label(), openPassDlg(), KIO::AuthInfo::prompt, KIO::AuthInfo::readOnly, and KIO::AuthInfo::username.

void SlaveInterface::openPassDlg const QString   prompt,
const QString   user,
bool    readOnly
[protected]
 

Deprecated:
. Use openPassDlg( AuthInfo& ) instead.

Definition at line 453 of file slaveinterface.cpp.

References openPassDlg(), KIO::AuthInfo::prompt, KIO::AuthInfo::readOnly, and KIO::AuthInfo::username.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kio Library Version 3.2.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Feb 4 12:35:17 2004 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2003