QXmppRosterIq Class
The QXmppRosterIq class represents a roster IQ. More...
| Header: | #include <QXmppRosterIq.h> |
| Inherits: | QXmppIq |
- List of all members, including inherited members
- Deprecated members
- QXmppRosterIq is part of Stanzas.
Public Types
| class | Item |
Public Functions
| QXmppRosterIq(const QXmppRosterIq &) | |
| QXmppRosterIq(QXmppRosterIq &&) | |
| void | addItem(const QXmppRosterIq::Item &item) |
(since QXmpp 1.16) bool | hasQuery() const |
| QList<QXmppRosterIq::Item> | items() const |
(since QXmpp 1.3) bool | mixAnnotate() const |
(since QXmpp 1.16) void | setHasQuery(bool hasQuery) |
(since QXmpp 1.8) void | setItems(const QList<QXmppRosterIq::Item> &items) |
(since QXmpp 1.3) void | setMixAnnotate(bool mixAnnotate) |
(since QXmpp 1.0 (parameter type changed to std::optional void | setVersion(std::optional<QString> version) |
(since QXmpp 1.16) std::optional<QString> | versionOpt() const |
| QXmppRosterIq & | operator=(QXmppRosterIq &&) |
| QXmppRosterIq & | operator=(const QXmppRosterIq &) |
Detailed Description
Member Function Documentation
QXmppRosterIq::QXmppRosterIq(const QXmppRosterIq &)
Default copy-constructor
QXmppRosterIq::QXmppRosterIq(QXmppRosterIq &&)
Default move-constructor
void QXmppRosterIq::addItem(const QXmppRosterIq::Item &item)
Adds an item to the roster IQ.
[since QXmpp 1.16] bool QXmppRosterIq::hasQuery() const
Returns whether the IQ contains a <query> element.
Roster get/set IQs always have one. An <iq type='result'/> from the server in reply to a versioned roster get with no <query> child means "the cached roster is still up to date"; this getter is how the roster manager distinguishes that case from an actually empty roster.
This function was introduced in QXmpp 1.16.
See also setHasQuery().
QList<QXmppRosterIq::Item> QXmppRosterIq::items() const
Returns the roster IQ's items.
See also setItems().
[since QXmpp 1.3] bool QXmppRosterIq::mixAnnotate() const
Returns whether to annotate which items are MIX channels.
This function was introduced in QXmpp 1.3.
See also setMixAnnotate().
[since QXmpp 1.16] void QXmppRosterIq::setHasQuery(bool hasQuery)
Sets whether the IQ contains a <query> element (hasQuery).
This function was introduced in QXmpp 1.16.
See also hasQuery().
[since QXmpp 1.8] void QXmppRosterIq::setItems(const QList<QXmppRosterIq::Item> &items)
Sets the roster IQ's items.
items.
This function was introduced in QXmpp 1.8.
See also items().
[since QXmpp 1.3] void QXmppRosterIq::setMixAnnotate(bool mixAnnotate)
Sets whether to include which roster items are MIX channels. This MUST only be enabled in get requests.
mixAnnotate.
This function was introduced in QXmpp 1.3.
See also mixAnnotate().
[since QXmpp 1.0 (parameter type changed to std::optional in QXmpp 1.16)] void QXmppRosterIq::setVersion(std::optional<QString> version)
Sets the roster version of the IQ.
Pass std::nullopt to omit the ver attribute. Pass an empty string to emit ver="".
This function was introduced in QXmpp 1.0 (parameter type changed to std::optional<QString> in QXmpp 1.16).
[since QXmpp 1.16] std::optional<QString> QXmppRosterIq::versionOpt() const
Returns the roster version of the IQ.
std::nullopt means no ver attribute was set. An empty string means ver="", which is how clients advertise RFC 6121 ยง2.6 roster versioning support to the server.
This function was introduced in QXmpp 1.16.
QXmppRosterIq &QXmppRosterIq::operator=(QXmppRosterIq &&)
Default move-assignment operator
QXmppRosterIq &QXmppRosterIq::operator=(const QXmppRosterIq &)
Default assignment operator