QXmpp: QXmppBlocklist Class Reference

QXmpp Version: 1.14.3

Loading...
Searching...
No Matches
QXmppBlocklist Class Reference

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

## Public Types
using | BlockingState = std::variant<NotBlocked, PartiallyBlocked, Blocked>

## Public Member Functions
| QXmppBlocklist (QVector< QString > entries)
| Constructs with given entries.
QVector< QString > | entries () const
bool | containsEntry (QStringView) const
BlockingState | blockingState (const QString &jid) const

## Detailed Description

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

See also
  QXmppBlockingManager

Since
  QXmpp 1.6

## Member Typedef Documentation

## ◆ BlockingState

using QXmppBlocklist::BlockingState = std::variant<NotBlocked, PartiallyBlocked, Blocked>

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

## Member Function Documentation

## ◆ blockingState()

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
  BlockingState of the JID.

## ◆ containsEntry()

bool QXmppBlocklist::containsEntry | ( | QStringView | entry | ) | const

Checks whether the blocklist contains an 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.

## ◆ entries()

QVector< 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.

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

- QXmppBlockingManager.h
- QXmppBlockingManager.cpp