• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KIO

  • KIO
  • Slave
Public Slots | Signals | Public Member Functions | Static Public Member Functions | List of all members
KIO::Slave Class Reference

#include <slave.h>

Inheritance diagram for KIO::Slave:
Inheritance graph
[legend]

Public Slots

void accept ()
 
void gotInput ()
 
void timeout ()
 

Signals

void slaveDied (KIO::Slave *slave)
 
- Signals inherited from KIO::SlaveInterface
void canResume (KIO::filesize_t)
 
void connected ()
 
void data (const QByteArray &)
 
void dataReq ()
 
void error (int, const QString &)
 
void errorPage ()
 
void finished ()
 
void infoMessage (const QString &)
 
void listEntries (const KIO::UDSEntryList &)
 
void metaData (const KIO::MetaData &)
 
void mimeType (const QString &)
 
void needSubUrlData ()
 
void open ()
 
void position (KIO::filesize_t)
 
void processedSize (KIO::filesize_t)
 
void redirection (const KUrl &)
 
void slaveStatus (pid_t, const QByteArray &, const QString &, bool)
 
void speed (unsigned long)
 
void statEntry (const KIO::UDSEntry &)
 
void totalSize (KIO::filesize_t)
 
void warning (const QString &)
 
void written (KIO::filesize_t)
 

Public Member Functions

 Slave (const QString &protocol, QObject *parent=0)
 
virtual ~Slave ()
 
void deref ()
 
virtual void hold (const KUrl &url)
 
QString host ()
 
time_t idleTime ()
 
bool isAlive ()
 
bool isConnected ()
 
KIO::SimpleJob * job () const
 
void kill ()
 
QString passwd ()
 
quint16 port ()
 
QString protocol ()
 
void ref ()
 
void resetHost ()
 
virtual void resume ()
 
virtual void send (int cmd, const QByteArray &arr=QByteArray())
 
virtual void setConfig (const MetaData &config)
 
void setConnected (bool c)
 
virtual void setHost (const QString &host, quint16 port, const QString &user, const QString &passwd)
 
void setIdle ()
 
void setJob (KIO::SimpleJob *job)
 
void setPID (pid_t)
 
void setProtocol (const QString &protocol)
 
int slave_pid ()
 
QString slaveProtocol ()
 
virtual void suspend ()
 
virtual bool suspended ()
 
QString user ()
 
- Public Member Functions inherited from KIO::SlaveInterface
virtual ~SlaveInterface ()
 
Connection * connection () const
 
KIO::filesize_t offset () const
 
void sendMessageBoxAnswer (int result)
 
void sendResumeAnswer (bool resume)
 
void setConnection (Connection *connection)
 
void setOffset (KIO::filesize_t offset)
 
void setWindow (QWidget *window)
 
QWidget * window () const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
 QObject (QObject *parent, const char *name)
 
virtual  ~QObject ()
 
bool blockSignals (bool block)
 
QObject * child (const char *objName, const char *inheritsClass, bool recursiveSearch) const
 
const QObjectList & children () const
 
const char * className () const
 
bool connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const QObject *receiver, const char *method)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method)
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QByteArray > dynamicPropertyNames () const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
T findChild (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QList< T > findChildren (const QString &name) const
 
bool inherits (const char *className) const
 
void insertChild (QObject *object)
 
void installEventFilter (QObject *filterObj)
 
bool isA (const char *className) const
 
bool isWidgetType () const
 
void killTimer (int id)
 
virtual const QMetaObject * metaObject () const
 
void moveToThread (QThread *targetThread)
 
const char * name () const
 
const char * name (const char *defaultName) const
 
QString objectName () const
 
QObject * parent () const
 
QVariant property (const char *name) const
 
void removeChild (QObject *object)
 
void removeEventFilter (QObject *obj)
 
void setName (const char *name)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval)
 
QThread * thread () const
 

Static Public Member Functions

static bool checkForHeldSlave (const KUrl &url)
 
static Slave * createSlave (const QString &protocol, const KUrl &url, int &error, QString &error_text)
 
static Slave * holdSlave (const QString &protocol, const KUrl &url)
 
- Static Public Member Functions inherited from QObject
bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 

Additional Inherited Members

- Protected Slots inherited from KIO::SlaveInterface
void calcSpeed ()
 
- Protected Member Functions inherited from KIO::SlaveInterface
 SlaveInterface (SlaveInterfacePrivate &dd, QObject *parent=0)
 
virtual bool dispatch ()
 
virtual bool dispatch (int _cmd, const QByteArray &data)
 
void dropNetwork (const QString &, const QString &)
 
void messageBox (int type, const QString &text, const QString &caption, const QString &buttonYes, const QString &buttonNo)
 
void messageBox (int type, const QString &text, const QString &caption, const QString &buttonYes, const QString &buttonNo, const QString &dontAskAgainName)
 
void requestNetwork (const QString &, const QString &)
 
- Protected Member Functions inherited from QObject
bool checkConnectArgs (const char *signal, const QObject *object, const char *method)
 
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const char *signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const char *signal)
 
int receivers (const char *signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Protected Attributes inherited from KIO::SlaveInterface
SlaveInterfacePrivate *const d_ptr
 
- Properties inherited from QObject
 objectName
 

Detailed Description

Definition at line 48 of file slave.h.

Constructor & Destructor Documentation

Slave::Slave ( const QString &  protocol,
QObject *  parent = 0 
)
explicit

Definition at line 160 of file slave.cpp.

Slave::~Slave ( )
virtual

Definition at line 169 of file slave.cpp.

Member Function Documentation

void Slave::accept ( )
slot

Definition at line 113 of file slave.cpp.

bool Slave::checkForHeldSlave ( const KUrl &  url)
static

Returns true if klauncher is holding a slave for url.

Since
4.7

Definition at line 508 of file slave.cpp.

Slave * Slave::createSlave ( const QString &  protocol,
const KUrl &  url,
int &  error,
QString &  error_text 
)
static

Creates a new slave.

Parameters
protocolthe protocol
urlis the url
erroris the error code on failure and undefined else.
error_textis the error text on failure and undefined else.
Returns
0 on failure, or a pointer to a slave otherwise.

Definition at line 410 of file slave.cpp.

void Slave::deref ( )

Definition at line 241 of file slave.cpp.

void Slave::gotInput ( )
slot

Definition at line 338 of file slave.cpp.

void Slave::hold ( const KUrl &  url)
virtual

Puts the kioslave associated with url at halt, and return it to klauncher, in order to let another application connect to it and finish the job.

This is for the krunner case: type a URL in krunner, it will start downloading to find the mimetype (KRun), and then hold the slave, publish the held slave using, this method, and the final application can continue the same download by requesting the same URL.

Reimplemented in KIO::DataSlave.

Definition at line 294 of file slave.cpp.

Slave * Slave::holdSlave ( const QString &  protocol,
const KUrl &  url 
)
static

Requests a slave on hold for ths url, from klauncher, if there is such a job.

See hold()

Definition at line 484 of file slave.cpp.

QString Slave::host ( )
Returns
Host this slave is (was?) connected to

Definition at line 193 of file slave.cpp.

time_t Slave::idleTime ( )
Returns
The time this slave has been idle.

Definition at line 252 of file slave.cpp.

bool Slave::isAlive ( )
Returns
true if the slave survived the last mission.

Definition at line 288 of file slave.cpp.

bool Slave::isConnected ( )

Definition at line 223 of file slave.cpp.

KIO::SimpleJob * Slave::job ( ) const

Definition at line 282 of file slave.cpp.

void Slave::kill ( )

Force termination.

Definition at line 361 of file slave.cpp.

QString Slave::passwd ( )
Returns
Passwd used to log in

Definition at line 211 of file slave.cpp.

quint16 Slave::port ( )
Returns
port this slave is (was?) connected to

Definition at line 199 of file slave.cpp.

QString Slave::protocol ( )

The protocol this slave handles.

Returns
name of protocol handled by this slave, as seen by the user

Definition at line 175 of file slave.cpp.

void Slave::ref ( )

Definition at line 235 of file slave.cpp.

void Slave::resetHost ( )

Clear host info.

Definition at line 394 of file slave.cpp.

void Slave::resume ( )
virtual

Resumes the operation of the attached kioslave.

Reimplemented in KIO::DataSlave.

Definition at line 320 of file slave.cpp.

void Slave::send ( int  cmd,
const QByteArray &  arr = QByteArray() 
)
virtual

Sends the given command to the kioslave.

Parameters
cmdcommand id
arrbyte array containing data

Reimplemented in KIO::DataSlave.

Definition at line 332 of file slave.cpp.

void Slave::setConfig ( const MetaData &  config)
virtual

Configure slave.

Reimplemented in KIO::DataSlave.

Definition at line 401 of file slave.cpp.

void Slave::setConnected ( bool  c)

Definition at line 229 of file slave.cpp.

void Slave::setHost ( const QString &  host,
quint16  port,
const QString &  user,
const QString &  passwd 
)
virtual

Set host for url.

Parameters
hostto connect to.
portto connect to.
userto login as
passwdto login with

Reimplemented in KIO::DataSlave.

Definition at line 378 of file slave.cpp.

void Slave::setIdle ( )

Marks this slave as idle.

Definition at line 217 of file slave.cpp.

void Slave::setJob ( KIO::SimpleJob *  job)

Definition at line 273 of file slave.cpp.

void Slave::setPID ( pid_t  pid)

Definition at line 261 of file slave.cpp.

void Slave::setProtocol ( const QString &  protocol)

Definition at line 181 of file slave.cpp.

int Slave::slave_pid ( )

Definition at line 267 of file slave.cpp.

void KIO::Slave::slaveDied ( KIO::Slave *  slave)
signal
QString Slave::slaveProtocol ( )

The actual protocol used to handle the request.

This method will return a different protocol than the one obtained by using protocol() if a proxy-server is used for the given protocol. This usually means that this method will return "http" when the actuall request was to retrieve a resource from an "ftp" server by going through a proxy server.

Returns
the actual protocol (io-slave) that handled the request

Definition at line 187 of file slave.cpp.

void Slave::suspend ( )
virtual

Suspends the operation of the attached kioslave.

Reimplemented in KIO::DataSlave.

Definition at line 314 of file slave.cpp.

bool Slave::suspended ( )
virtual

Tells whether the kioslave is suspended.

Returns
true if the kioslave is suspended.

Reimplemented in KIO::DataSlave.

Definition at line 326 of file slave.cpp.

void Slave::timeout ( )
slot

Definition at line 123 of file slave.cpp.

QString Slave::user ( )
Returns
User this slave is (was?) logged in as

Definition at line 205 of file slave.cpp.


The documentation for this class was generated from the following files:
  • slave.h
  • slave.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:55 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal