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

MsnSwitchboardConnection Class Reference

#include <msnswitchboardconnection.h>

Inheritance diagram for MsnSwitchboardConnection:


List of all members.

Detailed Description

A connection to a switchboard server, over which chats are conducted.

Mike K. Bennett

Definition at line 50 of file msnswitchboardconnection.h.

Public Types

enum  ApplicationType { FILETRANSFER }
enum  WarningType {
 Types of emittable warnings. More...

Public Slots

void sendKeepAlive ()


void chatMessage (const ChatMessage &message)
void contactJoinedChat (ContactBase *contact)
void contactLeftChat (ContactBase *contact, bool isChatIdle)
void contactTyping (ContactBase *contact)
void deleteMe (MsnSwitchboardConnection *object)
void disconnected ()
void gotInkMessage (const QString &inkData, const QString &handle, InkFormat format)
void gotMessage (const P2PMessage &message, const QString &handle)
void gotMessage (const MimeMessage &message, const QString &handle)
void gotMsnObject (const QString &msnObjectData, const QString &handle)
void pingSent ()
void readySend ()
void receivedNudge (ContactBase *contact)
void requestChatWindow (MsnSwitchboardConnection *switchboard)
void requestNewSwitchboard (QString contactHandle)
void sendingFailed (const QString &handle, const MimeMessage &message)
void showWarning (MsnSwitchboardConnection::WarningType type, ContactBase *contact)
void statusMessage (QString message, bool isError)

Public Member Functions

virtual void closeConnection ()
 Close the connection.
void closeConnectionLater (bool autoDelete=false)
const QStringList getContactsInChat () const
const QString & getFirstContact () const
const QString & getLastContact () const
bool getUserStartedChat () const
bool initialize (QString handle=QString())
void inviteContact (const QString &handle)
bool isBusy () const
bool isConnected () const
 Return whether or the socket is connected.
bool isContactInChat (const QString &handle) const
bool isEmpty () const
bool isExclusiveChatWithContact (const QString &handle) const
bool isExpired () const
bool isInactive () const
bool isWaiting () const
 MsnSwitchboardConnection (const MsnSwitchboardConnection &other)
void sendApplicationMessage (const MimeMessage &message)
void sendChatMessage (const QString &text)
void sendInk (InkFormat format, const QByteArray &ink)
void sendNudge ()
void sendTypingMessage ()
void sendWink (const MsnObject &msnobject)
void setUserStartedChat (bool startedByUser)
void start (const ChatInformation &chatInfo)

Protected Types

 Ack type parameter for sendMimeMessage(). More...

Protected Slots

virtual void slotConnected ()
 Called when the connection attempt is successful.
void slotError (QString error, MsnSocketBase::ErrorType type)
 Shows error dialog boxes.

Protected Member Functions

void addSoapClient (HttpSoapConnection *client)
 Internal function to track SOAP clients.
void connectToServer (const QString &server=QString(), const quint16 port=0)
 Connect to the given server via the socket.
void deleteSoapClient (HttpSoapConnection *client)
 Disconnect and delete a SOAP clients.
void deleteSoapClients ()
 Disconnect and delete all SOAP clients.
void disconnectFromServer (bool isTransfer=false)
 Disconnect from the server.
const QString getLocalIp () const
 Return the local IP address of the socket.
bool initialize ()
 Initialize the object.
bool isErrorCommand (const QString &command) const
 Return whether the given command is an error command.
virtual bool isPayloadCommand (const QString &command) const
 Return whether the given command is a payload command.
void parseMultiPacketMimeMessage (const QStringList &command, const MimeMessage &mimeMessage)
int sendCommand (const QString &prefix, const QString &text="\r\n")
 Send a command to the server.
int sendMimeMessage (AckType ackType, const MimeMessage &message)
 Send a MIME message command to the server.
int sendPayloadMessage (const QString &prefix, const QString &arguments, const QByteArray &payload)
int sendPayloadMessage (const QString &prefix, const QString &arguments, const QString &payload)
void setAcceptedPayloadCommands (QStringList commandList)
void setSendPings (bool sendPings)
bool switchToHttpSocket ()
 If it is possible, switch to the HTTP connection.
bool switchToTcpSocket ()
 Switch back to the TCP connection.
void writeBinaryData (const QByteArray &data)
void writeData (const QString &data)

Private Types

enum  ConnectionState {

Private Slots

void slotApplicationsAborted (const QString &contact)

Private Member Functions

void activity ()
void cleanUnackedMessages ()
void contactJoined (const QString &handle, const QString &friendlyName, const uint capabilities)
void contactLeft (const QString &handle)
const QString convertHtmlColorToMsnColor (const QString &color) const
const QString convertMsnColorToHtmlColor (QString &color) const
void gotAck (const QStringList &command)
void gotBye (const QStringList &command)
void gotIro (const QStringList &command)
void gotJoi (const QStringList &command)
void gotNak (const QStringList &command)
void gotOut (const QStringList &command)
void gotUsr (const QStringList &command)
void parseChatMessage (const QString &contactHandle, const QString &friendlyName, const QString &contactPicture, const MimeMessage &message)
void parseClientCapsMessage (const QString &contactHandle, const MimeMessage &message)
void parseCommand (const QStringList &command)
 Process a received command.
void parseDatacastMessage (const QString &contactHandle, const MimeMessage &message)
void parseEmoticonMessage (const QString &contactHandle, const QString &messageBody)
void parseError (const QStringList &command, const QByteArray &payloadData)
 Process a received error command.
void parseMimeMessage (const QStringList &command, const MimeMessage &message)
 Process a received MIME message.
void parseP2PMessage (const QString &contactHandle, const MimeMessage &message)
virtual void parsePayloadMessage (const QStringList &command, const QByteArray &payload)
 Process a received payload message.
void parseTypingMessage (const QString &contactHandle, const MimeMessage &message)
void sendClientCaps ()
void sendMimeMessageWhenReady (AckType ackType, MultiPacketMessage &message)
void sendMimeMessageWhenReady (AckType ackType, const MimeMessage &message)
void sendPendingMessages ()
void storeMessageForAcknowledgement (int ack, AckType ackType, const MimeMessage &message)

Private Attributes

bool abortingApplications_
int acksPending_
QString authorization_
bool autoDeleteLater_
bool backgroundConnection_
QString chatId_
bool closingConnection_
ConnectionState connectionState_
QStringList contactsInChat_
QString firstContact_
bool initialized_
int keepAlivesRemaining_
QTimer * keepAliveTimer_
QString lastContact_
QStringList pendingInvitations_
QList< QPair< AckType,
MimeMessage > * > 
QHash< int, UnAckedMessage * > unAckedMessages_
bool userStartedChat_


class KMessTest


struct  UnAckedMessage

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

Generated by  Doxygen 1.6.0   Back to index