QXmppMessageRetractionLimits Class
| Header: | #include <QXmppMessageRetraction.h> |
| Since: | QXmpp 1.17 |
| Inherits: | QXmppExtensibleDataFormBase |
Public Functions
| std::optional<std::chrono::seconds> | maxAge() const |
| void | setMaxAge(std::optional<std::chrono::seconds> maxAge) |
Static Public Members
| const auto | DataFormType |
| std::optional<QXmppMessageRetractionLimits> | fromDataForm(const QXmppDataForm &form) |
Detailed Description
Data form used in service discovery information for advertising the limits an entity enforces on message retractions. See XEP-0424, Message Retraction: for details.
``` QXmppDiscoInfo info; if (auto limits = info.dataForm<QXmppMessageRetractionLimits>()) { auto maxAge = limits->maxAge(); } ```
Member Function Documentation
[static] std::optional<QXmppMessageRetractionLimits> QXmppMessageRetractionLimits::fromDataForm(const QXmppDataForm &form)
Tries to parse form into QXmppMessageRetractionLimits.
std::optional<std::chrono::seconds> QXmppMessageRetractionLimits::maxAge() const
Returns the maximum age of a message for which a retraction request is honoured.
An entity that does not advertise a limit honours retraction requests regardless of the age of the retracted message.
See also setMaxAge().
void QXmppMessageRetractionLimits::setMaxAge(std::optional<std::chrono::seconds> maxAge)
Sets the maximum age of a message for which a retraction request is honoured.
maxAge
See also maxAge().
Member Variable Documentation
const auto QXmppMessageRetractionLimits::DataFormType
FORM_TYPE of this data form