• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeio/tdeio
 

tdeio/tdeio

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

#include <slave.h>

Inheritance diagram for TDEIO::Slave:
TDEIO::SlaveInterface TDEIO::DataSlave TDEIO::DataProtocol

Public Slots

void accept (TDESocket *socket)
void gotInput ()
void timeout ()

Signals

void slaveDied (TDEIO::Slave *slave)
Signals inherited from TDEIO::SlaveInterface
void data (const TQByteArray &)
void dataReq ()
void error (int, const TQString &)
void connected ()
void finished ()
void slaveStatus (pid_t, const TQCString &, const TQString &, bool)
void listEntries (const TDEIO::UDSEntryList &)
void statEntry (const TDEIO::UDSEntry &)
void needSubURLData ()
void needProgressId ()
void canResume (TDEIO::filesize_t)
void metaData (const TDEIO::MetaData &)
void totalSize (TDEIO::filesize_t)
void processedSize (TDEIO::filesize_t)
void redirection (const KURL &)
void localURL (const KURL &, bool)
void speed (unsigned long)
void errorPage ()
void mimeType (const TQString &)
void warning (const TQString &)
void infoMessage (const TQString &)
void connectFinished ()
void authorizationKey (const TQCString &, const TQCString &, bool)
void delAuthorization (const TQCString &grpkey)

Public Member Functions

 Slave (TDEServerSocket *unixdomain, const TQString &protocol, const TQString &socketname)
void setPID (pid_t)
int slave_pid ()
void kill ()
bool isAlive ()
void setHost (const TQString &host, int port, const TQString &user, const TQString &passwd)
void resetHost ()
void setConfig (const MetaData &config)
TQString protocol ()
void setProtocol (const TQString &protocol)
TQString slaveProtocol ()
TQString host ()
int port ()
TQString user ()
TQString passwd ()
void suspend ()
void resume ()
bool suspended ()
void send (int cmd, const TQByteArray &data=TQByteArray())
void hold (const KURL &url)
time_t idleTime ()
void setIdle ()
bool isConnected ()
void setConnected (bool c)
TDE_DEPRECATED Connection * connection ()
void ref ()
void deref ()
Public Member Functions inherited from TDEIO::SlaveInterface
 SlaveInterface (Connection *connection)
void setConnection (Connection *connection)
Connection * connection () const
void setProgressId (int id)
int progressId () const
void sendResumeAnswer (bool resume)
void setOffset (TDEIO::filesize_t offset)
TDEIO::filesize_t offset () const

Static Public Member Functions

static Slave * createSlave (const TQString &protocol, const KURL &url, int &error, TQString &error_text)
static Slave * holdSlave (const TQString &protocol, const KURL &url)

Protected Types

enum  {
  VIRTUAL_SUSPEND = 0x200 , VIRTUAL_RESUME , VIRTUAL_SEND , VIRTUAL_HOLD ,
  VIRTUAL_SUSPENDED , VIRTUAL_SET_HOST , VIRTUAL_SET_CONFIG
}

Protected Member Functions

 Slave (bool derived, TDEServerSocket *unixdomain, const TQString &protocol, const TQString &socketname)
void unlinkSocket ()
virtual void virtual_hook (int id, void *data)
Protected Member Functions inherited from TDEIO::SlaveInterface
virtual bool dispatch ()
virtual bool dispatch (int _cmd, const TQByteArray &data)
void openPassDlg (TDEIO::AuthInfo &info)
void openPassDlg (const TQString &prompt, const TQString &user, const TQString &caption, const TQString &comment, const TQString &label, bool readOnly) TDE_DEPRECATED
void openPassDlg (const TQString &prompt, const TQString &user, bool readOnly) TDE_DEPRECATED
void messageBox (int type, const TQString &text, const TQString &caption, const TQString &buttonYes, const TQString &buttonNo)
void messageBox (int type, const TQString &text, const TQString &caption, const TQString &buttonYes, const TQString &buttonNo, const TQString &dontAskAgainName)
void requestNetwork (const TQString &, const TQString &)
void dropNetwork (const TQString &, const TQString &)

Additional Inherited Members

Protected Slots inherited from TDEIO::SlaveInterface
void calcSpeed ()
Static Protected Member Functions inherited from TDEIO::SlaveInterface
static void sigpipe_handler (int)
Protected Attributes inherited from TDEIO::SlaveInterface
Connection * m_pConnection

Detailed Description

Attention developers: If you change the implementation of TDEIO::Slave, do not use connection() or slaveconn but the respective TDEIO::Slave accessor methods.

Otherwise classes derived from Slave might break. (LS)

Definition at line 43 of file slave.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected

Definition at line 241 of file slave.h.

Constructor & Destructor Documentation

◆ Slave() [1/2]

Slave::Slave ( bool derived,
TDEServerSocket * unixdomain,
const TQString & protocol,
const TQString & socketname )
protected

Use this constructor if you derive your own class from Slave derived must be true in any case.

Definition at line 160 of file slave.cpp.

◆ Slave() [2/2]

Slave::Slave ( TDEServerSocket * unixdomain,
const TQString & protocol,
const TQString & socketname )

Definition at line 141 of file slave.cpp.

◆ ~Slave()

Slave::~Slave ( )
virtual

Definition at line 183 of file slave.cpp.

Member Function Documentation

◆ accept

void Slave::accept ( TDESocket * socket)
slot

Definition at line 90 of file slave.cpp.

◆ connection()

TDE_DEPRECATED Connection * TDEIO::Slave::connection ( )
inline
Deprecated
This method is obsolete, use the accessor methods within TDEIO::Slave instead. Old code directly accessing connection() will not be able to access special protocols.

Definition at line 207 of file slave.h.

◆ createSlave()

Slave * Slave::createSlave ( const TQString & protocol,
const KURL & url,
int & error,
TQString & error_text )
static

Creates a new slave.

Parameters
protocolprotocol the slave is for.
urlURL the slave should operate on.
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.
Todo
What are legal protocol values?

Definition at line 355 of file slave.cpp.

◆ deref()

void TDEIO::Slave::deref ( )
inline

Definition at line 210 of file slave.h.

◆ gotInput

void Slave::gotInput ( )
slot

Definition at line 297 of file slave.cpp.

◆ hold()

void Slave::hold ( const KURL & url)

Puts the tdeioslave associated with url at halt.

Definition at line 216 of file slave.cpp.

◆ holdSlave()

Slave * Slave::holdSlave ( const TQString & protocol,
const KURL & url )
static

Definition at line 460 of file slave.cpp.

◆ host()

TQString TDEIO::Slave::host ( )
inline
Returns
Host this slave is (was?) connected to

Definition at line 123 of file slave.h.

◆ idleTime()

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

Definition at line 206 of file slave.cpp.

◆ isAlive()

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

Definition at line 76 of file slave.h.

◆ isConnected()

bool TDEIO::Slave::isConnected ( )
inline

Definition at line 200 of file slave.h.

◆ kill()

void Slave::kill ( )

Force termination.

Definition at line 317 of file slave.cpp.

◆ passwd()

TQString TDEIO::Slave::passwd ( )
inline
Returns
Passwd used to log in

Definition at line 138 of file slave.h.

◆ port()

int TDEIO::Slave::port ( )
inline
Returns
port this slave is (was?) connected to

Definition at line 128 of file slave.h.

◆ protocol()

TQString TDEIO::Slave::protocol ( )
inline

The protocol this slave handles.

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

Definition at line 103 of file slave.h.

◆ ref()

void TDEIO::Slave::ref ( )
inline

Definition at line 209 of file slave.h.

◆ resetHost()

void Slave::resetHost ( )

Clear host info.

Definition at line 342 of file slave.cpp.

◆ resume()

void Slave::resume ( )

Resumes the operation of the attached tdeioslave.

Definition at line 264 of file slave.cpp.

◆ send()

void Slave::send ( int cmd,
const TQByteArray & data = TQByteArray() )

Sends the given command to the tdeioslave.

Parameters
cmdcommand id
databyte array containing data
Since
3.2

Definition at line 285 of file slave.cpp.

◆ setConfig()

void Slave::setConfig ( const MetaData & config)

Configure slave.

Definition at line 347 of file slave.cpp.

◆ setConnected()

void TDEIO::Slave::setConnected ( bool c)
inline

Definition at line 201 of file slave.h.

◆ setHost()

void Slave::setHost ( const TQString & host,
int port,
const TQString & user,
const TQString & passwd )

Set host for url.

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

Definition at line 328 of file slave.cpp.

◆ setIdle()

void Slave::setIdle ( )

Marks this slave as idle.

Definition at line 201 of file slave.cpp.

◆ setPID()

void Slave::setPID ( pid_t pid)

Definition at line 211 of file slave.cpp.

◆ setProtocol()

void Slave::setProtocol ( const TQString & protocol)

Definition at line 196 of file slave.cpp.

◆ slave_pid()

int TDEIO::Slave::slave_pid ( )
inline

Definition at line 66 of file slave.h.

◆ slaveProtocol()

TQString TDEIO::Slave::slaveProtocol ( )
inline

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.

@return the actual protocol (io-slave) that handled the request

Definition at line 118 of file slave.h.

◆ suspend()

void Slave::suspend ( )

Suspends the operation of the attached tdeioslave.

Definition at line 254 of file slave.cpp.

◆ suspended()

bool Slave::suspended ( )

Tells wether the tdeioslave is suspended.

Returns
true if the tdeioslave is suspended.
Since
3.2

Definition at line 274 of file slave.cpp.

◆ timeout

void Slave::timeout ( )
slot

Definition at line 109 of file slave.cpp.

◆ unlinkSocket()

void Slave::unlinkSocket ( )
protected

Definition at line 101 of file slave.cpp.

◆ user()

TQString TDEIO::Slave::user ( )
inline
Returns
User this slave is (was?) logged in as

Definition at line 133 of file slave.h.

◆ virtual_hook()

void Slave::virtual_hook ( int id,
void * data )
protectedvirtual

Reimplemented from TDEIO::SlaveInterface.

Definition at line 515 of file slave.cpp.


The documentation for this class was generated from the following files:
  • slave.h
  • slave.cpp

tdeio/tdeio

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

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/tdeio by doxygen 1.15.0
This website is maintained by Timothy Pearson.