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

MsnSocketBase Class Reference
[network]

#include <msnsocketbase.h>

Inheritance diagram for MsnSocketBase:

MsnSocketHttp MsnSocketTcp

List of all members.


Detailed Description

Base class and interface for the MSN Socket classes.

The class defines the interface expected by MsnConnection for all socket implementations. Currently there is a socket implementation for normal TCP-based connections (MsnSocketTcp) and a socket for MSN-over-HTTP (MsnSocketHttp).

Author:
Mike K. Bennett

Valerio Pilo <valerio@kmess.org>

Definition at line 41 of file msnsocketbase.h.


Public Types

enum  ErrorType {
  ERROR_UNKNOWN = 0, ERROR_CONNECTING, ERROR_CONNECTING_GATEWAY, ERROR_DROP,
  ERROR_DATA, ERROR_CONNECTION_TIME_LIMIT, ERROR_CONNECTION_OTHER, ERROR_AUTH_TIME_LIMIT,
  ERROR_AUTH_LOGIN, ERROR_AUTH_COMPUTATION, ERROR_USER, ERROR_SERVER,
  ERROR_INTERNAL, ERROR_SOAP_UNKNOWN, ERROR_SOAP_RESPONSE, ERROR_SOAP_TIME_LIMIT,
  ERROR_SOAP_AUTHENTICATION, ERROR_SOAP_TOOMANYREDIRECTS
}
 Types of errors with connection sockets. More...
enum  ServerType { SERVER_NOTIFICATION, SERVER_SWITCHBOARD }
 Type of server that will be connected from this socket. More...

Signals

void connected ()
void dataReceived (const QStringList &commandLine, const QByteArray &payloadData)
void disconnected ()
void error (QString error, MsnSocketBase::ErrorType type)
void pingSent ()
void statusMessage (QString message, bool isError)

Public Member Functions

virtual void connectToServer (const QString &server=QString(), const quint16 port=0)=0
virtual void disconnectFromServer (bool isTransfer=false)=0
QStringList getAcceptedPayloadCommands ()
 Return which payload commands are accepted by this connection.
virtual QString getLocalIp () const =0
virtual ServerType getServerType () const
 Return the type of server connection managed by the socket.
virtual bool isConnected () const
 Whether or not the connection is active.
bool isErrorCommand (const QString &command) const
 Test whether the given command is an error.
virtual bool isPayloadCommand (const QString &command) const
 Test whether the given command is a payload command.
 MsnSocketBase (ServerType serverType)
 The constructor.
virtual void setAcceptedPayloadCommands (QStringList commandList)
 Specify which accepted commands carry payload data for this connection.
virtual void setSendPings (bool sendPings)=0
virtual qint64 writeBinaryData (const QByteArray &data)=0
virtual qint64 writeData (const QString &data)=0
 ~MsnSocketBase ()
 The destructor.

Protected Slots

virtual void proxyAuthenticate (const QNetworkProxy &proxy, QAuthenticator *authenticator)

Protected Attributes

QStringList acceptedPayloadCommands_
bool connected_
ServerType serverType_

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

Generated by  Doxygen 1.6.0   Back to index