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

MsnConnection Class Reference

#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 46 of file msnconnection.h.


Public Types

enum  PROXYSTATE { PROXYCONNECTED, PROXYERROR, PROXYFAIL, PROXYHOSTCONNECTED }

Signals

void disconnected ()
void messageReceived (const QString &msg)
 Signal that a message was received on the connection.
void messageSent (const QString &msg)
 Signal that a message was sent out on the connection.
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
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 ()
 MsnConnection (QString identifier)
virtual void parseCommand (const QStringList &command)=0
virtual void parseMessage (const QStringList &command, const MimeMessage &message)=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)
void setSendPings (bool sendPings)

Protected Attributes

CurrentAccountcurrentAccount_

Private Slots

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

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 initialized_
int missedPings_
QMutex mproxywriteLocked_
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