8#ifndef QXMPPROSTERMANAGER_H
9#define QXMPPROSTERMANAGER_H
11#include "QXmppClientExtension.h"
12#include "QXmppPresence.h"
13#include "QXmppRosterIq.h"
14#include "QXmppSendResult.h"
24class QXmppRosterManagerPrivate;
62 using Result = std::variant<QXmpp::Success, QXmppError>;
67 bool isRosterReceived()
const;
68 QStringList getRosterBareJids()
const;
71 QStringList getResources(
const QString &bareJid)
const;
72 QMap<QString, QXmppPresence> getAllPresencesForBareJid(
73 const QString &bareJid)
const;
75 const QString &resource)
const;
77 QXmppTask<Result> addRosterItem(
const QString &bareJid,
const QString &name = {},
const QSet<QString> &groups = {});
88 bool acceptSubscription(
const QString &bareJid,
const QString &reason = {});
89 bool refuseSubscription(
const QString &bareJid,
const QString &reason = {});
90 bool addItem(
const QString &bareJid,
const QString &name = {},
const QSet<QString> &groups = {});
91 bool removeItem(
const QString &bareJid);
92 bool renameItem(
const QString &bareJid,
const QString &name);
93 bool subscribe(
const QString &bareJid,
const QString &reason = {});
94 bool unsubscribe(
const QString &bareJid,
const QString &reason = {});
141 void _q_disconnected();
145 using RosterResult = std::variant<QXmppRosterIq, QXmppError>;
147 void handleSubscriptionRequest(
const QString &bareJid,
const QXmppPresence &presence,
bool accept);
150 const std::unique_ptr<QXmppRosterManagerPrivate> d;
The QXmppClientExtension class is the base class for QXmppClient extensions.
Definition: QXmppClientExtension.h:32
virtual void onUnregistered(QXmppClient *client)
Definition: QXmppClientExtension.cpp:95
virtual void onRegistered(QXmppClient *client)
Definition: QXmppClientExtension.cpp:85
virtual bool handleStanza(const QDomElement &stanza)
You need to implement this method to process incoming XMPP stanzas.
Definition: client/compat/removed_api.cpp:26
Main class for starting and managing connections to XMPP servers.
Definition: QXmppClient.h:62
Definition: QXmppMixManager.h:20
The QXmppPresence class represents an XMPP presence stanza.
Definition: QXmppPresence.h:22
The QXmppRosterIq::Item class represents a roster entry.
Definition: QXmppRosterIq.h:33
The QXmppRosterManager class provides access to a connected client's roster.
Definition: QXmppRosterManager.h:57
void subscriptionReceived(const QString &bareJid)
void subscriptionRequestReceived(const QString &subscriberBareJid, const QXmppPresence &presence)
void itemRemoved(const QString &bareJid)
void itemChanged(const QString &bareJid)
void itemAdded(const QString &bareJid)
void presenceChanged(const QString &bareJid, const QString &resource)
This signal is emitted when the presence of a particular bareJid and resource changes.
std::variant< QXmpp::Success, QXmppError > Result
Empty result containing QXmpp::Success or a QXmppError.
Definition: QXmppRosterManager.h:62
Definition: QXmppTask.h:62