QXmppBlocklist Class

List of blocked entries according to XEP-0191: Blocking Command with helper functions to check the blocking state of JIDs. More...

Header: #include <QXmppBlockingManager.h>
Since: QXmpp 1.6

Public Types

Public Functions

QXmppBlocklist(QList<QString> entries)
QXmppBlocklist::BlockingState blockingState(const QString &jid) const
bool containsEntry(QStringView entry) const
QList<QString> entries() const

Detailed Description

See also QXmppBlockingManager.

Member Type Documentation

[alias] QXmppBlocklist::BlockingState

Whether a JID is completely blocked (Blocked), partially blocked (PartiallyBlocked) or not blocked (NotBlocked).

Member Function Documentation

QXmppBlocklist::QXmppBlocklist(QList<QString> entries)

Constructs with given entries.

QXmppBlocklist::BlockingState QXmppBlocklist::blockingState(const QString &jid) const

Checks the blocking state of a JID.

A JID can be a full JID, a bare JID, a domain or a domain with a resource, as in XEP-0191: Blocking Command.

Returns the BlockingState of the JID.

jid.

bool QXmppBlocklist::containsEntry(QStringView entry) const

Returns true if the blocklist contains the entry entry.

Note: This does not check whether a JID may be blocked or blocked partially by other entries. E.g. containsEntry("user@domain.tld") will return false even if domain.tld is blocked completely.

QList<QString> QXmppBlocklist::entries() const

Returns a list of blocked entires.

Entries may be full JIDs, bare JIDs, domains or domains with resource, as in XEP-0191: Blocking Command.