Loading...
Searching...
No Matches
QXmppStanza Class Reference
Stanzas

The QXmppStanza class is the base class for all XMPP stanzas. More...

`#include <QXmppStanza.h>`

Inheritance diagram for QXmppStanza:
[legend]
Collaboration diagram for QXmppStanza:
[legend]

## Classes

class | Error
| The Error class represents a stanza error. More...

## Public Member Functions

| QXmppStanza (const QString &from=QString(), const QString &to=QString())
| QXmppStanza (const QXmppStanza &other)
| Constructs a copy of other.
| QXmppStanza (QXmppStanza &&)
| Move constructor.
virtual | ~QXmppStanza ()
| Destroys a QXmppStanza.
QXmppStanza & | operator= (const QXmppStanza &other)
| Assigns other to this stanza.
QXmppStanza & | operator= (QXmppStanza &&)
| Move-assignment operator.
QString | to () const
void | setTo (const QString &)
QString | from () const
void | setFrom (const QString &)
QString | id () const
void | setId (const QString &)
QString | lang () const
void | setLang (const QString &)
QXmppStanza::Error | error () const
std::optional< Error > | errorOptional () const
void | setError (const QXmppStanza::Error &error)
void | setError (const std::optional< Error > &error)
QXmppElementList | extensions () const
void | setExtensions (const QXmppElementList &elements)
QList< QXmppExtendedAddress > | extendedAddresses () const
void | setExtendedAddresses (const QList< QXmppExtendedAddress > &extendedAddresses)
std::optional< QXmppE2eeMetadata > | e2eeMetadata () const
void | setE2eeMetadata (const std::optional< QXmppE2eeMetadata > &e2eeMetadata)
Public Member Functions inherited from QXmppNonza
virtual bool | isXmppStanza () const
virtual void | parse (const QDomElement &)=0
virtual void | toXml (QXmlStreamWriter *writer) const =0

## Friends

class | TestClient

## Detailed Description

The QXmppStanza class is the base class for all XMPP stanzas.

## Constructor & Destructor Documentation

## QXmppStanza()

QXmppStanza::QXmppStanza | ( | const QString & | from = `QString()`,
|  | const QString & | to = `QString()`
| ) |  |

Constructs a QXmppStanza with the specified sender and recipient.

Parameters

  from |
  to |

## Member Function Documentation

## e2eeMetadata()

std::optional< QXmppE2eeMetadata > QXmppStanza::e2eeMetadata | ( |  | ) | const

Returns additional data for end-to-end encryption purposes.

Since
  QXmpp 1.5

## error()

QXmppStanza::Error QXmppStanza::error | ( |  | ) | const

Returns the stanza's error.

If the stanza has no error a default constructed QXmppStanza::Error is returned.

## errorOptional()

std::optional< QXmppStanza::Error > QXmppStanza::errorOptional | ( |  | ) | const

Returns the stanza's error.

Since
  QXmpp 1.5

## extendedAddresses()

QList< QXmppExtendedAddress > QXmppStanza::extendedAddresses | ( |  | ) | const

Returns the stanza's extended addresses as defined by XEP-0033: Extended Stanza Addressing.

## extensions()

QXmppElementList QXmppStanza::extensions | ( |  | ) | const

Returns the stanza's "extensions".

Extensions are XML elements which are not handled internally by QXmpp.

## from()

QString QXmppStanza::from | ( |  | ) | const

Returns the stanza's sender JID.

## id()

QString QXmppStanza::id | ( |  | ) | const

Returns the stanza's identifier.

## lang()

QString QXmppStanza::lang | ( |  | ) | const

Returns the stanza's language.

## setE2eeMetadata()

void QXmppStanza::setE2eeMetadata | ( | const std::optional< QXmppE2eeMetadata > & | e2eeMetadata | ) |

Sets additional data for end-to-end encryption purposes.

Since
  QXmpp 1.5

## setError() [1/2]

void QXmppStanza::setError | ( | const QXmppStanza::Error & | error | ) |

Sets the stanza's error.

Parameters

  error |

## setError() [2/2]

void QXmppStanza::setError | ( | const std::optional< Error > & | error | ) |

Sets the stanza's error.

If you set an empty optional, this will remove the error.

Since
  QXmpp 1.5

## setExtendedAddresses()

void QXmppStanza::setExtendedAddresses | ( | const QList< QXmppExtendedAddress > & | addresses | ) |

Sets the stanza's extended addresses as defined by XEP-0033: Extended Stanza Addressing.

## setExtensions()

void QXmppStanza::setExtensions | ( | const QXmppElementList & | extensions | ) |

Sets the stanza's "extensions".

Parameters

  extensions |

## setFrom()

void QXmppStanza::setFrom | ( | const QString & | from | ) |

Sets the stanza's sender JID.

Parameters

  from |

## setId()

void QXmppStanza::setId | ( | const QString & | id | ) |

Sets the stanza's identifier.

Parameters

  id |

## setLang()

void QXmppStanza::setLang | ( | const QString & | lang | ) |

Sets the stanza's language.

Parameters

  lang |

## setTo()

void QXmppStanza::setTo | ( | const QString & | to | ) |

Sets the stanza's recipient JID.

Parameters

  to |

## to()

QString QXmppStanza::to | ( |  | ) | const

Returns the stanza's recipient JID.

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

- QXmppStanza.h
- QXmppStanza.cpp