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

P2PMessage Class Reference
[network]

#include <p2pmessage.h>

List of all members.


Detailed Description

A message using MSN P2P protocol.

Author:
Michael Jarrett (JudgeBeavis@hotmail.com), Diederik van der Boor (vdboor --at-- codingdomain.com)

Definition at line 23 of file p2pmessage.h.


Public Types

enum  MsnP2PFlags {
  MSN_FLAG_NEGATIVE_ACK = 0x01, MSN_FLAG_ACK = 0x02, MSN_FLAG_WAITING = 0x04, MSN_FLAG_WAITING_FOR_ACK = 0x06,
  MSN_FLAG_ERROR = 0x08, MSN_FLAG_OBJECT_DATA = 0x20, MSN_FLAG_ABORTED_SENDING = 0x40, MSN_FLAG_ABORTED_RECEIVING = 0x80,
  MSN_FLAG_DC_HANDSHAKE = 0x100, MSN_FLAG_DATA_2009 = 0x1000000, MSN_FLAG_FILE_DATA = 0x1000030
}

Public Member Functions

quint32 getAckDataSize () const
quint32 getAckSessionID () const
quint32 getAckUniqueID () const
const char * getData () const
quint32 getDataOffset () const
quint32 getDataSize () const
quint32 getFlags () const
quint32 getMessageID () const
QString getNonce () const
quint32 getSessionID () const
quint32 getTotalSize () const
bool isAbortedReceivingAck () const
bool isAbortedSendingAck () const
bool isAck () const
bool isConnectionHandshake () const
bool isData () const
bool isDataPreparation () const
bool isError () const
bool isFragment () const
bool isLastFragment () const
bool isNegativeAck () const
bool isSlpData () const
bool isWaitingForAck () const
bool isWaitingForReply () const
 P2PMessage (const QByteArray &message)
 P2PMessage (const char *data, uint size)

Static Public Member Functions

static unsigned int extractBytes (const char *data, const int offset)
static quint32 extractLongBytes (const char *data, const int offset)
static QString extractNonce (const char *data, const int offset=32)
static QString extractUtf16String (const char *data, const int offset, int size)
static void insertBytes (QByteArray &buffer, const unsigned int value, const int offset)
static void insertNonce (QByteArray &buffer, const QString &nonce, const int offset=32)
static void insertShortBytes (QByteArray &buffer, const unsigned short value, const int offset)
static void insertUtf16String (QByteArray &buffer, const QString &value, int offset)

Private Member Functions

void parseP2PHeader ()

Private Attributes

quint32 ackDataSize_
quint32 ackSessionID_
quint32 ackUniqueID_
quint32 dataOffset_
quint32 dataSize_
quint32 flags_
QByteArray message_
quint32 messageID_
quint32 sessionID_
quint32 totalSize_

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

Generated by  Doxygen 1.6.0   Back to index