KIO::Connection Class Reference
This class provides a simple means for IPC between two applications via a pipe. More...
#include <connection.h>
Inheritance diagram for KIO::Connection:


Public Member Functions | |
Connection () | |
virtual | ~Connection () |
void | init (KSocket *sock) |
void | init (int fd_in, int fd_out) |
void | connect (QObject *receiver=0, const char *member=0) |
void | close () |
int | fd_from () const |
int | fd_to () const |
bool | inited () const |
void | send (int cmd, const QByteArray &arr=QByteArray()) |
bool | sendnow (int _cmd, const QByteArray &data) |
int | read (int *_cmd, QByteArray &data) |
void | suspend () |
void | resume () |
bool | suspended () const |
Protected Slots | |
void | dequeue () |
Detailed Description
This class provides a simple means for IPC between two applications via a pipe.It handles a queue of commands to be sent which makes it possible to queue data before an actual connection has been established.
Definition at line 49 of file connection.h.
Constructor & Destructor Documentation
|
Creates a new connection.
Definition at line 48 of file connection.cpp. References QPtrList::setAutoDelete(). |
Member Function Documentation
|
Initialize this connection to use the given socket.
Definition at line 124 of file connection.cpp. References QObject::connect(), dequeue(), KSocket::socket(), and suspend(). Referenced by KIO::Slave::accept(), and KIO::SlaveBase::connectSlave(). |
|
Initialize the connection to use the given file descriptors.
Definition at line 144 of file connection.cpp. References QObject::connect(), dequeue(), and suspend(). |
|
Closes the connection.
Definition at line 79 of file connection.cpp. References QPtrList::clear(). Referenced by KIO::SlaveBase::disconnectSlave(), KIO::Slave::gotInput(), KIO::Slave::hold(), KIO::Scheduler::slotCleanIdleSlaves(), and ~Connection(). |
|
Returns the input file descriptor.
Definition at line 82 of file connection.h. Referenced by KIO::SlaveBase::dispatchLoop(). |
|
Returns the output file descriptor.
Definition at line 87 of file connection.h. |
|
Checks whether the connection has been initialized.
Definition at line 94 of file connection.h. Referenced by KIO::SlaveBase::connectSlave(), dequeue(), KIO::SlaveBase::dispatchLoop(), and send(). |
|
|
Sends the given command immediately.
Definition at line 175 of file connection.cpp. References endl(), and kdError(). Referenced by dequeue(), KIO::SlaveInterface::dispatch(), KIO::SlaveInterface::messageBox(), KIO::SlaveInterface::openPassDlg(), KIO::SlaveInterface::requestNetwork(), send(), and KIO::SlaveInterface::sendResumeAnswer(). |
|
Receive data.
Definition at line 206 of file connection.cpp. References endl(), and kdError(). Referenced by KIO::SlaveInterface::dispatch(), KIO::SlaveBase::dispatch(), KIO::SlaveBase::dispatchLoop(), KIO::SlaveBase::mimeType(), and KIO::SlaveBase::waitForAnswer(). |
|
Don't handle incoming data until resumed.
Definition at line 65 of file connection.cpp. References QSocketNotifier::setEnabled(). Referenced by connect(), init(), KIO::SlaveInterface::messageBox(), and KIO::Slave::suspend(). |
|
Resume handling of incoming data.
Definition at line 72 of file connection.cpp. References QSocketNotifier::setEnabled(). Referenced by KIO::SlaveInterface::messageBox(), and KIO::Slave::resume(). |
|
Returns status of connection.
Definition at line 135 of file connection.h. Referenced by KIO::SlaveInterface::dispatch(), and KIO::Slave::suspended(). |
The documentation for this class was generated from the following files: