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

P2PMessage Class Reference

#include <p2pmessage.h>

Inheritance diagram for P2PMessage:

MimeMessage

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 20 of file p2pmessage.h.


Public Types

enum  MsnP2PFlags {
  MSN_FLAG_ACK = 0x02, MSN_FLAG_WAITING = 0x04, MSN_FLAG_ERROR = 0x08, MSN_FLAG_DATA = 0x20,
  MSN_FLAG_CLOSING_ACK = 0x40, MSN_FLAG_BYE_SENT = 0x80, MSN_FLAG_FILETRANSFER = 0x1000030
}

Public Member Functions

unsigned long getAckDataSize () const
unsigned long getAckMessageID () const
unsigned long getAckUniqueID () const
char * getData () const
unsigned long getDataOffset () const
unsigned long getDataSize () const
unsigned long getFlags () const
unsigned long getMessageID () const
unsigned long getSessionID () const
unsigned long getTotalSize () const
bool isAck () const
bool isClosingAck () const
bool isError () const
bool isFileData () const
bool isFragment () const
bool isLastFragment () const
bool isPictureData () const
bool isSentByeAck () const
bool isWaiting () const
 P2PMessage (const MimeMessage &mimeMessage)
 P2PMessage ()
void setBody (const QString &body)

Static Public Member Functions

static unsigned int extractBytes (const char *data, const int offset)
static unsigned long extractLongBytes (const char *data, const int offset)
static void insertBytes (QByteArray &buffer, const unsigned int value, const int offset)
static void insertShortBytes (QByteArray &buffer, const unsigned short value, const int offset)

Private Member Functions

void addField (const QString &field, const QString &value)
QString decodeRFC2047String (const QCString &aStr) const
const QByteArray & getBinaryData () const
const QString & getBody () const
void getFieldAndValue (QString &field, QString &value, const uint &index) const
QString getFields () const
QByteArray getMessage () const
uint getNoFields () const
QString getSubValue (const QString &field, const QString &subField=QString::null) const
const QString & getValue (const QString &field) const
bool hasField (const QString &field) const
void parseP2PHeader ()
 Extract the fields from the P2P binary header.
void print () const
void setBinaryData (const char header[48], const char *body, const char footer[4], uint bodylength)
void setField (const QString &field, const QString &value)

Private Attributes

unsigned long ackDataSize_
unsigned long ackMessageID_
unsigned long ackUniqueID_
unsigned long dataOffset_
unsigned long dataSize_
unsigned long flags_
QString messageBody_
unsigned long messageID_
unsigned long sessionID_
unsigned long totalSize_

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

Generated by  Doxygen 1.6.0   Back to index