Logo Search packages:      
Sourcecode: kmess version File versions

MsnConnection Class Reference
[network]

#include <msnconnection.h>

Inheritance diagram for MsnConnection:

MsnNotificationConnection MsnSwitchboardConnection

List of all members.


Detailed Description

The class provides basic networking commands to the particular connection types.

Author:
Mike K. Bennett

Definition at line 50 of file msnconnection.h.


Public Types

enum  PROXYSTATE { PROXYCONNECTED, PROXYERROR, PROXYFAIL, PROXYHOSTCONNECTED }

Signals

void disconnected ()
void statusMessage (QString message, int connectStatus)

Public Member Functions

bool isConnected () const

Protected Types

enum  AckType { ACK_NONE, ACK_NAK_ONLY, ACK_ALWAYS, ACK_ALWAYS_P2P }

Protected Slots

virtual void connectionSuccess ()

Protected Member Functions

void addPercents (QString &word) const
virtual void closeConnection ()=0
bool connectToServer (const QString &server, const int &port)
void disconnectFromServer (bool isTransfer=false)
QString getLocalIp () const
bool getSendPings () const
QString getValueFromMessage (const QString &field, const QString &message, bool goToEndOfLine=false) const
bool initialize ()
virtual bool isPayloadCommand (const QString &command) const
 MsnConnection (QString identifier)
virtual void parseCommand (const QStringList &command)=0
virtual void parseMessage (const QStringList &command, const MimeMessage &message)=0
virtual void parsePayloadMessage (const QStringList &command, const QByteArray &messageData)=0
virtual void proxyFailed ()
void removePercents (QString &word) const
int sendCommand (const QString &prefix, const QString &text="\r\n")
int sendMimeMessage (AckType ackType, const MimeMessage &message)
int sendPayloadMessage (const QString &prefix, const QString &arguments, const QByteArray &payload)
int sendPayloadMessage (const QString &prefix, const QString &arguments, const QString &payload)
void setSendPings (bool sendPings)

Protected Attributes

CurrentAccountcurrentAccount_

Private Slots

void connectionFailed (int error)
void dataReceived ()
void proxyConnected (void)
void proxyDataReceived (void)
void sendPing ()

Private Member Functions

bool connectToServerDirectly (const QString &server, const int &port)
bool connectToServerViaProxy (const QString &server, const int &port)
int getAck ()
void reconnectSocketSignal (bool hostconnected)
void resetPingTimer ()
void setProxyState (PROXYSTATE state)
void socks5_auth (void)
void socks5_connect (void)
void socks5_reply (const char *buf, int nread)
void writeBinaryData (const QByteArray &data)
void writeData (const QString &data)
void writeProxyData (const char *buf, int len)

Private Attributes

int ack_
struct sockaddr_in addr_destServer_
KMessBuffer buffer_
int destPort_
QString destServer_
bool disconnected_
bool initialized_
int missedPings_
QMutex * mproxywriteLocked_
QDict< MultiPacketMessagemultiPacketBuffer_
bool pingReceived_
QTimer pingTimer_
int proxyState_
bool sendPings_
KExtendedSocket * socket_
bool writeLocked_

Friends

class KMessTest

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

Generated by  Doxygen 1.6.0   Back to index