QXmpp  Version:0.4.91
 All Classes Functions Enumerations Enumerator Properties Groups
Public Types | Public Member Functions
QXmppMessage Class Reference

The QXmppMessage class represents an XMPP message. More...

#include <QXmppMessage.h>

Inheritance diagram for QXmppMessage:
QXmppStanza

List of all members.

Public Types

enum  Type {
  Error = 0, Normal, Chat, GroupChat,
  Headline
}
 This enum described a message type.
enum  State {
  None = 0, Active, Inactive, Gone,
  Composing, Paused
}

Public Member Functions

 QXmppMessage (const QString &from="", const QString &to="", const QString &body="", const QString &thread="")
QString body () const
void setBody (const QString &)
bool isAttentionRequested () const
void setAttentionRequested (bool requested)
bool isReceiptRequested () const
void setReceiptRequested (bool requested)
QString receiptId () const
void setReceiptId (const QString &id)
QDateTime stamp () const
 Returns the message's timestamp (if any).
void setStamp (const QDateTime &stamp)
QXmppMessage::State state () const
void setState (QXmppMessage::State)
QString subject () const
void setSubject (const QString &)
QString thread () const
 Returns the message's thread.
void setThread (const QString &)
QXmppMessage::Type type () const
void setType (QXmppMessage::Type)
- Public Member Functions inherited from QXmppStanza
 QXmppStanza (const QString &from=QString(), const QString &to=QString())
virtual ~QXmppStanza ()
 Destroys a QXmppStanza.
QString to () const
void setTo (const QString &)
QString from () const
 Returns the stanza's sender JID.
void setFrom (const QString &)
QString id () const
 Returns the stanza's identifier.
void setId (const QString &)
QString lang () const
 Returns the stanza's language.
void setLang (const QString &)
QXmppStanza::Error error () const
 Returns the stanza's error.
void setError (const QXmppStanza::Error &error)
QXmppElementList extensions () const
void setExtensions (const QXmppElementList &elements)

Detailed Description

The QXmppMessage class represents an XMPP message.


Member Enumeration Documentation

This enum describes a chat state as defined by XEP-0085 : Chat State Notifications.

Enumerator:
None 

The message does not contain any chat state information.

Active 

User is actively participating in the chat session.

Inactive 

User has not been actively participating in the chat session.

Gone 

User has effectively ended their participation in the chat session.

Composing 

User is composing a message.

Paused 

User had been composing but now has stopped.


Constructor & Destructor Documentation

QXmppMessage::QXmppMessage ( const QString &  from = "",
const QString &  to = "",
const QString &  body = "",
const QString &  thread = "" 
)

Constructs a QXmppMessage.

Parameters:
from
to
body
thread

Member Function Documentation

QString QXmppMessage::body ( ) const

Returns the message's body.

bool QXmppMessage::isAttentionRequested ( ) const

Returns true if the user's attention is requested, as defined by XEP-0224: Attention.

bool QXmppMessage::isReceiptRequested ( ) const

Returns true if a delivery receipt is requested, as defined by XEP-0184: Message Delivery Receipts.

QString QXmppMessage::receiptId ( ) const

If this message is a delivery receipt, returns the ID of the original message.

void QXmppMessage::setAttentionRequested ( bool  requested)

Sets whether the user's attention is requested, as defined by XEP-0224: Attention.

param requested

void QXmppMessage::setBody ( const QString &  body)

Sets the message's body.

Parameters:
body
void QXmppMessage::setReceiptId ( const QString &  id)

Make this message a delivery receipt for the message with the given id.

void QXmppMessage::setReceiptRequested ( bool  requested)

Sets whether a delivery receipt is requested, as defined by XEP-0184: Message Delivery Receipts.

param requested

void QXmppMessage::setStamp ( const QDateTime &  stamp)

Sets the message's timestamp.

Parameters:
stamp
void QXmppMessage::setState ( QXmppMessage::State  state)

Sets the message's chat state.

Parameters:
state
void QXmppMessage::setSubject ( const QString &  subject)

Sets the message's subject.

Parameters:
subject
void QXmppMessage::setThread ( const QString &  thread)

Sets the message's thread.

Parameters:
thread
void QXmppMessage::setType ( QXmppMessage::Type  type)

Sets the message's type.

Parameters:
type
QXmppMessage::State QXmppMessage::state ( ) const

Returns the message's chat state.

QString QXmppMessage::subject ( ) const

Returns the message's subject.

QXmppMessage::Type QXmppMessage::type ( ) const

Returns the message's type.


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