Logo Search packages:      
Sourcecode: kmess version File versions  Download package

DirectConnectionBase Class Reference

#include <directconnectionbase.h>

Inheritance diagram for DirectConnectionBase:

MsnDirectConnection MsnFtpConnection

List of all members.

Detailed Description

The class for receiving and sending files.

Diederik van der Boor

Definition at line 38 of file directconnectionbase.h.


void connectionAuthorized ()
void connectionClosed ()
void connectionEstablished ()
void connectionFailed ()
void writeHandlerReady ()

Public Member Functions

virtual void closeConnection ()
void connectWriteHandler (QObject *receiver, const char *slot)
 DirectConnectionBase (QObject *parent=0)
void disconnectWriteHandler (QObject *receiver, const char *slot)
quint16 getLocalServerPort ()
QString getRemoteIp () const
quint16 getRemotePort () const
QString getSocketError () const
bool hasLastWriteFailed () const
bool hasTemporaryWriteError () const
bool hasTimedOut () const
virtual bool initialize ()
virtual bool isAuthorized () const
bool isConnected () const
bool isServer () const
bool isWriteHandlerConnected () const
bool openConnection (const QString &ipAddress, const quint16 port)
bool openServerPort ()

Protected Slots

virtual void slotConnectionEstablished ()
virtual void slotConnectionFailed ()
virtual void slotSocketDataReceived ()=0

Protected Member Functions

bool closeServerSocket ()
qint64 getAvailableBytes () const
QString getListeningServiceName () const
qint64 peekBlock (const qint64 size)
qint64 readBlock (QBuffer &buffer, const qint64 maxSize=0)
qint64 readBlock (QByteArray &buffer, const qint64 maxSize=0, const qint64 offset=0)
qint64 readBlock (char *buffer, const qint64 size)
void setAuthorized (bool authorized)
bool writeBlock (const QByteArray &block)
bool writeBlock (const char *block, const qint64 size)
 Write data to the socket.

Protected Attributes

QTime lastActivity_

Private Slots

void slotAcceptConnection ()
void slotConnectionTimeout ()
void slotSocketConnected ()
void slotSocketDisconnected ()
virtual void slotSocketError (QAbstractSocket::SocketError error)
void slotSocketReadyWrite (qint64 bytesWritten)

Private Member Functions

bool closeClientSocket ()

Private Attributes

QByteArray additionalWriteBuffer_
bool authorized_
QString connectingTo_
QTimer connectionTimer_
quint16 highestServerPortLimit_
bool isServer_
bool lastWriteFailed_
quint16 lowestServerPortLimit_
QTcpServer * server_
quint16 serverPort_
QTcpSocket * socket_
bool timeout_
bool userCancelled_
int writeHandlerCount_

Static Private Attributes

static quint16 nextServerPort_

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index