QXmpp  Version:1.0.0
Public Types | Public Member Functions | List of all members
QXmppMessage Class Reference

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

#include <QXmppMessage.h>

Inheritance diagram for QXmppMessage:
Inheritance graph
[legend]
Collaboration diagram for QXmppMessage:
Collaboration graph
[legend]

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
}
 
enum  Marker { NoMarker = 0, Received, Displayed, Acknowledged }
 

Public Member Functions

 QXmppMessage (const QString &from=QString(), const QString &to=QString(), const QString &body=QString(), const QString &thread=QString())
 
 QXmppMessage (const QXmppMessage &other)
 Constructs a copy of other.
 
QXmppMessageoperator= (const QXmppMessage &other)
 Assigns other to this message.
 
QString body () const
 
void setBody (const QString &)
 
bool isAttentionRequested () const
 
void setAttentionRequested (bool requested)
 
bool isReceiptRequested () const
 
void setReceiptRequested (bool requested)
 
QString mucInvitationJid () const
 
void setMucInvitationJid (const QString &jid)
 
QString mucInvitationPassword () const
 
void setMucInvitationPassword (const QString &password)
 
QString mucInvitationReason () const
 
void setMucInvitationReason (const QString &reason)
 
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)
 
QString xhtml () const
 
void setXhtml (const QString &xhtml)
 
bool isMarkable () const
 
void setMarkable (const bool)
 
QString markedId () const
 
void setMarkerId (const QString &)
 
QString markedThread () const
 
void setMarkedThread (const QString &)
 
Marker marker () const
 
void setMarker (const Marker)
 
bool isPrivate () const
 
void setPrivate (const bool)
 
bool isXmppStanza () const
 
QString outOfBandUrl () const
 Returns a possibly attached URL from XEP-0066: Out of Band Data.
 
void setOutOfBandUrl (const QString &)
 Sets the attached URL for XEP-0066: Out of Band Data.
 
QString replaceId () const
 
void setReplaceId (const QString &)
 
- Public Member Functions inherited from QXmppStanza
 QXmppStanza (const QString &from=QString(), const QString &to=QString())
 
 QXmppStanza (const QXmppStanza &other)
 Constructs a copy of other.
 
virtual ~QXmppStanza ()
 Destroys a QXmppStanza.
 
QXmppStanzaoperator= (const QXmppStanza &other)
 Assigns other to this stanza.
 
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)
 
QList< QXmppExtendedAddressextendedAddresses () const
 
void setExtendedAddresses (const QList< QXmppExtendedAddress > &extendedAddresses)
 

Detailed Description

The QXmppMessage class represents an XMPP message.

Member Enumeration Documentation

◆ Marker

This enum describes a chat marker as defined by XEP-0333 : Char Markers

◆ State

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::QXmppMessage ( const QString &  from = QString(),
const QString &  to = QString(),
const QString &  body = QString(),
const QString &  thread = QString() 
)

Constructs a QXmppMessage.

Parameters
from
to
body
thread

Member Function Documentation

◆ body()

QString QXmppMessage::body ( ) const

Returns the message's body.

◆ isAttentionRequested()

bool QXmppMessage::isAttentionRequested ( ) const

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

◆ isMarkable()

bool QXmppMessage::isMarkable ( ) const

Returns true if a message is markable, as defined XEP-0333: Chat Markers.

◆ isPrivate()

bool QXmppMessage::isPrivate ( ) const

Returns if the message is marked with a <private> tag, in which case it will not be forwarded to other resources according to XEP-0280: Message Carbons.

◆ isReceiptRequested()

bool QXmppMessage::isReceiptRequested ( ) const

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

◆ isXmppStanza()

bool QXmppMessage::isXmppStanza ( ) const
virtual

Indicates if the QXmppStanza is a stanza in the XMPP sense (i. e. a message, iq or presence)

Reimplemented from QXmppStanza.

◆ markedId()

QString QXmppMessage::markedId ( ) const

Returns the message's marker id, as defined XEP-0333: Chat Markers.

◆ markedThread()

QString QXmppMessage::markedThread ( ) const

Returns the message's marker thread, as defined XEP-0333: Chat Markers.

◆ marker()

QXmppMessage::Marker QXmppMessage::marker ( ) const

Returns the message's marker, as defined XEP-0333: Chat Markers.

◆ mucInvitationJid()

QString QXmppMessage::mucInvitationJid ( ) const

Returns the JID for a multi-user chat direct invitation as defined by XEP-0249: Direct MUC Invitations.

◆ mucInvitationPassword()

QString QXmppMessage::mucInvitationPassword ( ) const

Returns the password for a multi-user chat direct invitation as defined by XEP-0249: Direct MUC Invitations.

◆ mucInvitationReason()

QString QXmppMessage::mucInvitationReason ( ) const

Returns the reason for a multi-user chat direct invitation as defined by XEP-0249: Direct MUC Invitations.

◆ receiptId()

QString QXmppMessage::receiptId ( ) const

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

◆ replaceId()

QString QXmppMessage::replaceId ( ) const

Returns the message id to replace with this message as used in XEP-0308: Last Message Correction. If the returned string is empty, this message is not replacing another.

◆ setAttentionRequested()

void QXmppMessage::setAttentionRequested ( bool  requested)

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

param requested

◆ setBody()

void QXmppMessage::setBody ( const QString &  body)

Sets the message's body.

Parameters
body

◆ setMarkable()

void QXmppMessage::setMarkable ( const bool  markable)

Sets if the message is markable, as defined XEP-0333: Chat Markers.

◆ setMarkedThread()

void QXmppMessage::setMarkedThread ( const QString &  markedThread)

Sets the message's marked thread, as defined XEP-0333: Chat Markers.

◆ setMarker()

void QXmppMessage::setMarker ( const Marker  marker)

Sets the message's marker, as defined XEP-0333: Chat Markers

◆ setMarkerId()

void QXmppMessage::setMarkerId ( const QString &  markerId)

Sets the message's marker id, as defined XEP-0333: Chat Markers.

◆ setMucInvitationJid()

void QXmppMessage::setMucInvitationJid ( const QString &  jid)

Sets the JID for a multi-user chat direct invitation as defined by XEP-0249: Direct MUC Invitations.

◆ setMucInvitationPassword()

void QXmppMessage::setMucInvitationPassword ( const QString &  password)

Sets the password for a multi-user chat direct invitation as defined by XEP-0249: Direct MUC Invitations.

◆ setMucInvitationReason()

void QXmppMessage::setMucInvitationReason ( const QString &  reason)

Sets the reason for a multi-user chat direct invitation as defined by XEP-0249: Direct MUC Invitations.

◆ setPrivate()

void QXmppMessage::setPrivate ( const bool  priv)

If true is passed, the message is marked with a <private> tag, in which case it will not be forwarded to other resources according to XEP-0280: Message Carbons.

◆ setReceiptId()

void QXmppMessage::setReceiptId ( const QString &  id)

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

◆ setReceiptRequested()

void QXmppMessage::setReceiptRequested ( bool  requested)

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

param requested

◆ setReplaceId()

void QXmppMessage::setReplaceId ( const QString &  replaceId)

Sets the message id to replace with this message as in XEP-0308: Last Message Correction.

◆ setStamp()

void QXmppMessage::setStamp ( const QDateTime &  stamp)

Sets the message's timestamp.

Parameters
stamp

◆ setState()

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

Sets the message's chat state.

Parameters
state

◆ setSubject()

void QXmppMessage::setSubject ( const QString &  subject)

Sets the message's subject.

Parameters
subject

◆ setThread()

void QXmppMessage::setThread ( const QString &  thread)

Sets the message's thread.

Parameters
thread

◆ setType()

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

Sets the message's type.

Parameters
type

◆ setXhtml()

void QXmppMessage::setXhtml ( const QString &  xhtml)

Sets the message's XHTML body as defined by XEP-0071: XHTML-IM.

◆ state()

QXmppMessage::State QXmppMessage::state ( ) const

Returns the message's chat state.

◆ subject()

QString QXmppMessage::subject ( ) const

Returns the message's subject.

◆ type()

QXmppMessage::Type QXmppMessage::type ( ) const

Returns the message's type.

◆ xhtml()

QString QXmppMessage::xhtml ( ) const

Returns the message's XHTML body as defined by XEP-0071: XHTML-IM.


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