QXmpp Version: 1.5.6
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
QXmppPubSubManager Class Reference

The QXmppPubSubManager aims to provide publish-subscribe functionality as specified in XEP-0060: Publish-Subscribe (PubSub). More...

Inheritance diagram for QXmppPubSubManager:
Inheritance graph
[legend]
Collaboration diagram for QXmppPubSubManager:
Collaboration graph
[legend]

Classes

struct  InvalidServiceType
 

Public Types

enum  ServiceType { PubSubOrPep , PubSub , Pep }
 
enum  StandardItemId { Current }
 
using Result = std::variant< QXmpp::Success, QXmppError >
 
using FeaturesResult = std::variant< QVector< QString >, InvalidServiceType, QXmppError >
 
using NodesResult = std::variant< QVector< QString >, QXmppError >
 
using InstantNodeResult = std::variant< QString, QXmppError >
 
template<typename T >
using ItemResult = std::variant< T, QXmppError >
 
template<typename T >
using ItemsResult = std::variant< Items< T >, QXmppError >
 
using ItemIdsResult = std::variant< QVector< QString >, QXmppError >
 
using PublishItemResult = std::variant< QString, QXmppError >
 
using PublishItemsResult = std::variant< QVector< QString >, QXmppError >
 
using SubscriptionsResult = std::variant< QVector< QXmppPubSubSubscription >, QXmppError >
 
using AffiliationsResult = std::variant< QVector< QXmppPubSubAffiliation >, QXmppError >
 
using OptionsResult = std::variant< QXmppPubSubSubscribeOptions, QXmppError >
 
using NodeConfigResult = std::variant< QXmppPubSubNodeConfig, QXmppError >
 

Public Member Functions

 QXmppPubSubManager ()
 
 ~QXmppPubSubManager ()
 
QXmppTask< NodesResultrequestNodes (const QString &jid)
 
QXmppTask< ResultcreateNode (const QString &jid, const QString &nodeName)
 
QXmppTask< ResultcreateNode (const QString &jid, const QString &nodeName, const QXmppPubSubNodeConfig &config)
 
QXmppTask< InstantNodeResultcreateInstantNode (const QString &jid)
 
QXmppTask< InstantNodeResultcreateInstantNode (const QString &jid, const QXmppPubSubNodeConfig &config)
 
QXmppTask< ResultdeleteNode (const QString &jid, const QString &nodeName)
 
QXmppTask< ItemIdsResultrequestItemIds (const QString &serviceJid, const QString &nodeName)
 
template<typename T = QXmppPubSubBaseItem>
QXmppTask< ItemResult< T > > requestItem (const QString &jid, const QString &nodeName, const QString &itemId)
 
template<typename T = QXmppPubSubBaseItem>
QXmppTask< ItemResult< T > > requestItem (const QString &jid, const QString &nodeName, StandardItemId itemId)
 
template<typename T = QXmppPubSubBaseItem>
QXmppTask< ItemsResult< T > > requestItems (const QString &jid, const QString &nodeName)
 
template<typename T = QXmppPubSubBaseItem>
QXmppTask< ItemsResult< T > > requestItems (const QString &jid, const QString &nodeName, const QStringList &itemIds)
 
template<typename T >
QXmppTask< PublishItemResultpublishItem (const QString &jid, const QString &nodeName, const T &item)
 
template<typename T >
QXmppTask< PublishItemResultpublishItem (const QString &jid, const QString &nodeName, const T &item, const QXmppPubSubPublishOptions &publishOptions)
 
template<typename T >
QXmppTask< PublishItemsResultpublishItems (const QString &jid, const QString &nodeName, const QVector< T > &items)
 
template<typename T >
QXmppTask< PublishItemsResultpublishItems (const QString &jid, const QString &nodeName, const QVector< T > &items, const QXmppPubSubPublishOptions &publishOptions)
 
QXmppTask< ResultretractItem (const QString &jid, const QString &nodeName, const QString &itemId)
 
QXmppTask< ResultretractItem (const QString &jid, const QString &nodeName, StandardItemId itemId)
 
QXmppTask< ResultpurgeItems (const QString &jid, const QString &nodeName)
 
QXmppTask< SubscriptionsResultrequestSubscriptions (const QString &jid)
 
QXmppTask< SubscriptionsResultrequestSubscriptions (const QString &jid, const QString &nodeName)
 
QXmppTask< AffiliationsResultrequestNodeAffiliations (const QString &jid, const QString &nodeName)
 
QXmppTask< AffiliationsResultrequestAffiliations (const QString &jid)
 
QXmppTask< AffiliationsResultrequestAffiliations (const QString &jid, const QString &nodeName)
 
QXmppTask< OptionsResultrequestSubscribeOptions (const QString &service, const QString &nodeName)
 
QXmppTask< OptionsResultrequestSubscribeOptions (const QString &service, const QString &nodeName, const QString &subscriberJid)
 
QXmppTask< ResultsetSubscribeOptions (const QString &service, const QString &nodeName, const QXmppPubSubSubscribeOptions &options)
 
QXmppTask< ResultsetSubscribeOptions (const QString &service, const QString &nodeName, const QXmppPubSubSubscribeOptions &options, const QString &subscriberJid)
 
QXmppTask< NodeConfigResultrequestNodeConfiguration (const QString &service, const QString &nodeName)
 
QXmppTask< ResultconfigureNode (const QString &service, const QString &nodeName, const QXmppPubSubNodeConfig &config)
 
QXmppTask< ResultcancelNodeConfiguration (const QString &service, const QString &nodeName)
 
QXmppTask< ResultsubscribeToNode (const QString &serviceJid, const QString &nodeName, const QString &subscriberJid)
 
QXmppTask< ResultunsubscribeFromNode (const QString &serviceJid, const QString &nodeName, const QString &subscriberJid)
 
QXmppTask< NodesResultrequestOwnPepNodes ()
 
QXmppTask< ResultcreateOwnPepNode (const QString &nodeName)
 
QXmppTask< ResultcreateOwnPepNode (const QString &nodeName, const QXmppPubSubNodeConfig &config)
 
QXmppTask< ResultdeleteOwnPepNode (const QString &nodeName)
 
template<typename T = QXmppPubSubBaseItem>
QXmppTask< ItemResult< T > > requestOwnPepItem (const QString &nodeName, const QString &itemId)
 
template<typename T = QXmppPubSubBaseItem>
QXmppTask< ItemResult< T > > requestOwnPepItem (const QString &nodeName, StandardItemId itemId)
 
template<typename T = QXmppPubSubBaseItem>
QXmppTask< ItemsResult< T > > requestOwnPepItems (const QString &nodeName)
 
QXmppTask< ItemIdsResultrequestOwnPepItemIds (const QString &nodeName)
 
template<typename T >
QXmppTask< PublishItemResultpublishOwnPepItem (const QString &nodeName, const T &item, const QXmppPubSubPublishOptions &publishOptions)
 
template<typename T >
QXmppTask< PublishItemResultpublishOwnPepItem (const QString &nodeName, const T &item)
 
template<typename T >
QXmppTask< PublishItemsResultpublishOwnPepItems (const QString &nodeName, const QVector< T > &items, const QXmppPubSubPublishOptions &publishOptions)
 
template<typename T >
QXmppTask< PublishItemsResultpublishOwnPepItems (const QString &nodeName, const QVector< T > &items)
 
QXmppTask< ResultretractOwnPepItem (const QString &nodeName, const QString &itemId)
 
QXmppTask< ResultretractOwnPepItem (const QString &nodeName, StandardItemId itemId)
 
QXmppTask< ResultpurgeOwnPepItems (const QString &nodeName)
 
QXmppTask< NodeConfigResultrequestOwnPepNodeConfiguration (const QString &nodeName)
 
QXmppTask< ResultconfigureOwnPepNode (const QString &nodeName, const QXmppPubSubNodeConfig &config)
 
QXmppTask< ResultcancelOwnPepNodeConfiguration (const QString &nodeName)
 
- Public Member Functions inherited from QXmppClientExtension
 QXmppClientExtension ()
 
virtual QStringList discoveryFeatures () const
 
virtual QList< QXmppDiscoveryIq::IdentitydiscoveryIdentities () const
 
virtual bool handleStanza (const QDomElement &stanza)
 You need to implement this method to process incoming XMPP stanzas.
 
virtual bool handleStanza (const QDomElement &stanza, const std::optional< QXmppE2eeMetadata > &e2eeMetadata)
 You need to implement this method to process incoming XMPP stanzas.
 
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=nullptr)
 

Static Public Member Functions

static QString standardItemIdToString (StandardItemId itemId)
 

Friends

class tst_QXmppPubSubManager
 
class QXmppOmemoManagerPrivate
 

Additional Inherited Members

- Signals inherited from QXmppLoggable
void setGauge (const QString &gauge, double value)
 Sets the given gauge to value.
 
void logMessage (QXmppLogger::MessageType type, const QString &msg)
 This signal is emitted to send logging messages.
 
void updateCounter (const QString &counter, qint64 amount=1)
 Updates the given counter by amount.
 
- Protected Member Functions inherited from QXmppClientExtension
QXmppClientclient ()
 
virtual void setClient (QXmppClient *client)
 
void injectIq (const QDomElement &element, const std::optional< QXmppE2eeMetadata > &e2eeMetadata)
 
bool injectMessage (QXmppMessage &&message)
 
- Protected Member Functions inherited from QXmppLoggable
void debug (const QString &message)
 
void info (const QString &message)
 
void warning (const QString &message)
 
void logReceived (const QString &message)
 
void logSent (const QString &message)
 

Detailed Description

The QXmppPubSubManager aims to provide publish-subscribe functionality as specified in XEP-0060: Publish-Subscribe (PubSub).

However, it currently only supports a few PubSub use cases but all of the XEP-0060: Personal Eventing Protocol (PEP) ones. PEP allows a standard XMPP user account to function as a virtual PubSub service.

To make use of this manager, you need to instantiate it and load it into the QXmppClient instance as follows:

client->addExtension(manager);
QXmppClient * client()
Definition QXmppClientExtension.cpp:78
bool addExtension(QXmppClientExtension *extension)
Definition QXmppClient.cpp:263
The QXmppPubSubManager aims to provide publish-subscribe functionality as specified in XEP-0060: Publ...
Definition QXmppPubSubManager.h:21
QXmppPubSubManager()
Definition QXmppPubSubManager.cpp:187
Note
To subscribe to PEP event notifications use the QXmppClientExtension::discoveryFeatures method of your client extension according to section 9.2 of XEP-0060. For example:
QStringList YourExtension::discoveryFeatures() const
{
return { "http://jabber.org/protocol/tune+notify" };
}
Todo:
Since
QXmpp 1.5

Member Typedef Documentation

◆ AffiliationsResult

Contains the list of affiliations with the node(s) (QVector<QXmppPubSubAffiliation>) or the returned IQ error (QXmppStanza::Error).

◆ FeaturesResult

Type containing service discovery features, InvalidServiceType if the service is not of the desired type or the returned IQ error (QXmppStanza::Error).

◆ InstantNodeResult

Contains the name of the new node (QString) or the returned IQ error (QXmppStanza::Error).

◆ ItemIdsResult

Contains all item IDs that have been found (QVector<QString>) or the returned IQ error (QXmppStanza::Error).

◆ ItemResult

template<typename T >
QXmppPubSubManager::ItemResult

Contains the item if it has been found (std::optional<T>) or the returned IQ error (QXmppStanza::Error).

◆ ItemsResult

template<typename T >
QXmppPubSubManager::ItemsResult

Contains all items that have been found (QVector<T>) or the returned IQ error (QXmppStanza::Error).

◆ NodeConfigResult

Contains a node configuration (QXmppPubSubNodeConfig) or the returned IQ error (QXmppStanza::Error).

◆ NodesResult

Type containing a list of node names or the returned IQ error (QXmppStanza::Error).

◆ OptionsResult

Contains the current subscribe options (QXmppPubSubSubscribeOptions) or the returned IQ error (QXmppStanza::Error).

◆ PublishItemResult

Contains the ID of the item, if no ID was set in the request (QString) or the returned IQ error (QXmppStanza::Error).

◆ PublishItemsResult

Contains the IDs of the items, if no IDs were set in the request (QVector<QString>) or the returned IQ error (QXmppStanza::Error).

◆ Result

Result of a generic request without a return value. Contains Success in case everything went well. If the returned IQ contained an error a QXmppStanza::Error is reported.

◆ SubscriptionsResult

Contains a list of active subscriptions (QVector<QXmppPubSubSubscription>) or the returned IQ error (QXmppStanza::Error).

Member Enumeration Documentation

◆ ServiceType

Type of PubSub service

Enumerator
PubSubOrPep 

PubSub service or PEP service.

PubSub 

PubSub service only.

Pep 

PEP service only.

◆ StandardItemId

Pre-defined ID of a PubSub item

Enumerator
Current 

Item of a singleton node (i.e., the node's single item)

Constructor & Destructor Documentation

◆ QXmppPubSubManager()

QXmppPubSubManager::QXmppPubSubManager ( )

Default constructor.

◆ ~QXmppPubSubManager()

QXmppPubSubManager::~QXmppPubSubManager ( )

Default destructor.

Member Function Documentation

◆ cancelNodeConfiguration()

QXmppTask< QXmppPubSubManager::Result > QXmppPubSubManager::cancelNodeConfiguration ( const QString &  service,
const QString &  nodeName 
)

Cancels the configuration process and uses the default or exisiting configuration.

Parameters
serviceJID of the pubsub service
nodeNameName of the pubsub node on the service
Returns
See also
requestNodeConfiguration()

◆ cancelOwnPepNodeConfiguration()

QXmppPubSubManager::cancelOwnPepNodeConfiguration ( const QString &  nodeName)
inline

This is a convenience method equivalent to calling cancelNodeConfiguration() the current account's bare JID.

Parameters
nodeNameName of the pubsub node on the service
Returns
See also
requestOwnPepNodeConfiguration()

◆ configureNode()

QXmppTask< QXmppPubSubManager::Result > QXmppPubSubManager::configureNode ( const QString &  service,
const QString &  nodeName,
const QXmppPubSubNodeConfig &  config 
)

Sets a node configuration.

Requires owner privileges. You can use requestNodeConfiguration() to receive a data form with all valid options and default values.

Parameters
serviceJID of the pubsub service
nodeNameName of the pubsub node on the service
config
Returns
See also
requestNodeConfiguration()

◆ configureOwnPepNode()

QXmppPubSubManager::configureOwnPepNode ( const QString &  nodeName,
const QXmppPubSubNodeConfig &  config 
)
inline

Sets a node configuration.

This is a convenience method equivalent to calling configureNode() the current account's bare JID.

Parameters
nodeNameName of the pubsub node on the service
config
Returns
See also
requestOwnPepNodeConfiguration()

◆ createInstantNode() [1/2]

QXmppTask< QXmppPubSubManager::InstantNodeResult > QXmppPubSubManager::createInstantNode ( const QString &  jid)

Creates an instant pubsub node with the default configuration.

The pubsub service automatically generates a random node name. On success it is returned via the QFuture.

Parameters
jidJabber ID of the entity hosting the pubsub service
Returns

◆ createInstantNode() [2/2]

auto QXmppPubSubManager::createInstantNode ( const QString &  jid,
const QXmppPubSubNodeConfig &  config 
)

Creates an instant pubsub node with a custom configuration.

The pubsub service automatically generates a random node name. On success it is returned via the QFuture.

Parameters
jidJabber ID of the entity hosting the pubsub service
configThe configuration for the node
Returns

◆ createNode() [1/2]

auto QXmppPubSubManager::createNode ( const QString &  jid,
const QString &  nodeName 
)

Creates an empty pubsub node with the default configuration.

Calling this before QXmppPubSubManager::publishItems is usually not necessary when publishing to a node for the first time if the service suppports the auto-create feature (Section 7.1.4 of XEP-0060).

Parameters
jidJabber ID of the entity hosting the pubsub service
nodeNamethe name of the node to be created
Returns

◆ createNode() [2/2]

auto QXmppPubSubManager::createNode ( const QString &  jid,
const QString &  nodeName,
const QXmppPubSubNodeConfig &  config 
)

Creates an empty pubsub node with a custom configuration.

Calling this before QXmppPubSubManager::publishItems is usually not necessary when publishing to a node for the first time if the service suppports the auto-create feature (Section 7.1.4 of XEP-0060).

Parameters
jidJabber ID of the entity hosting the pubsub service
nodeNamethe name of the node to be created
configThe configuration for the node
Returns

◆ createOwnPepNode() [1/2]

QXmppTask< Result > QXmppPubSubManager::createOwnPepNode ( const QString &  nodeName)
inline

Creates an empty PEP node with the default configuration.

This is a convenience method equivalent to calling QXmppPubSubManager::createNode on the current account's bare JID.

Calling this before QXmppPubSubManager::publishOwnPepItems is usually not necessary when publishing to a node for the first time if the service suppports the auto-create feature (Section 7.1.4 of XEP-0060).

Parameters
nodeNamethe name of the PEP node to be created
Returns

◆ createOwnPepNode() [2/2]

QXmppTask< Result > QXmppPubSubManager::createOwnPepNode ( const QString &  nodeName,
const QXmppPubSubNodeConfig &  config 
)
inline

Creates an empty PEP node with a custom configuration.

This is a convenience method equivalent to calling QXmppPubSubManager::createNode on the current account's bare JID.

Calling this before QXmppPubSubManager::publishOwnPepItems is usually not necessary when publishing to a node for the first time if the service suppports the auto-create feature (Section 7.1.4 of XEP-0060).

Parameters
nodeNamethe name of the PEP node to be created
configThe configuration for the node
Returns

◆ deleteNode()

auto QXmppPubSubManager::deleteNode ( const QString &  jid,
const QString &  nodeName 
)

Deletes a pubsub node.

Parameters
jidJabber ID of the entity hosting the pubsub service
nodeNamethe name of the node to delete along with all of its items
Returns

◆ deleteOwnPepNode()

QXmppPubSubManager::deleteOwnPepNode ( const QString &  nodeName)
inline

Deletes a PEP node.

This is a convenience method equivalent to calling QXmppPubSubManager::deleteNode on the current account's bare JID.

Parameters
nodeNamethe name of the PEP node to delete along with all of its items
Returns

◆ publishItem() [1/2]

template<typename T >
QXmppTask< QXmppPubSubManager::PublishItemResult > QXmppPubSubManager::publishItem ( const QString &  jid,
const QString &  nodeName,
const T &  item 
)

Publishs one item to a pubsub node.

This is a convenience method equivalent to calling QXmppPubSubManager::publishItem with no publish options.

Parameters
jidJabber ID of the entity hosting the pubsub service
nodeNamethe name of the node to publish the item to
itemthe item to publish
Returns

◆ publishItem() [2/2]

template<typename T >
QXmppTask< QXmppPubSubManager::PublishItemResult > QXmppPubSubManager::publishItem ( const QString &  jid,
const QString &  nodeName,
const T &  item,
const QXmppPubSubPublishOptions &  publishOptions 
)

Publishs one item to a pubsub node.

This is a convenience method equivalent to calling QXmppPubSubManager::publishItem with no publish options.

Parameters
jidJabber ID of the entity hosting the pubsub service
nodeNamethe name of the node to publish the item to
itemthe item to publish
publishOptionspublish-options for the items
Returns

◆ publishItems() [1/2]

template<typename T >
QXmppTask< QXmppPubSubManager::PublishItemsResult > QXmppPubSubManager::publishItems ( const QString &  jid,
const QString &  nodeName,
const QVector< T > &  items 
)

Publishs items to a pubsub node.

Parameters
jidJabber ID of the entity hosting the pubsub service
nodeNamethe name of the node to publish the items to
itemsthe items to publish
Returns

◆ publishItems() [2/2]

template<typename T >
QXmppTask< QXmppPubSubManager::PublishItemsResult > QXmppPubSubManager::publishItems ( const QString &  jid,
const QString &  nodeName,
const QVector< T > &  items,
const QXmppPubSubPublishOptions &  publishOptions 
)

Publishs items to a pubsub node.

Parameters
jidJabber ID of the entity hosting the pubsub service
nodeNamethe name of the node to publish the items to
itemsthe items to publish
publishOptionspublish-options for the items
Returns

◆ publishOwnPepItem() [1/2]

template<typename T >
QXmppTask< QXmppPubSubManager::PublishItemResult > QXmppPubSubManager::publishOwnPepItem ( const QString &  nodeName,
const T &  item 
)

Publishs one item to a PEP node.

Parameters
nodeNamethe name of the PEP node to publish the item to
itemthe item to publish
Returns

◆ publishOwnPepItem() [2/2]

template<typename T >
QXmppTask< QXmppPubSubManager::PublishItemResult > QXmppPubSubManager::publishOwnPepItem ( const QString &  nodeName,
const T &  item,
const QXmppPubSubPublishOptions &  publishOptions 
)

Publishs one item to a PEP node.

Parameters
nodeNamethe name of the PEP node to publish the item to
itemthe item to publish
publishOptionspublish-options for fine tuning
Returns

◆ publishOwnPepItems() [1/2]

template<typename T >
QXmppTask< QXmppPubSubManager::PublishItemsResult > QXmppPubSubManager::publishOwnPepItems ( const QString &  nodeName,
const QVector< T > &  items 
)

Publishs items to a PEP node.

Parameters
nodeNamethe name of the PEP node to publish the items to
itemsthe items to publish
Returns

◆ publishOwnPepItems() [2/2]

template<typename T >
QXmppTask< QXmppPubSubManager::PublishItemsResult > QXmppPubSubManager::publishOwnPepItems ( const QString &  nodeName,
const QVector< T > &  items,
const QXmppPubSubPublishOptions &  publishOptions 
)

Publishs items to a PEP node.

Parameters
nodeNamethe name of the PEP node to publish the items to
itemsthe items to publish
publishOptionspublish-options for fine tuning (optional). Pass an empty form to honor the default options of the PEP node
Returns

◆ purgeItems()

auto QXmppPubSubManager::purgeItems ( const QString &  jid,
const QString &  nodeName 
)

Purges all items from a node.

Parameters
jidJabber ID of the entity hosting the pubsub service
nodeNamethe name of the PEP node to delete along with all of its items
Returns

◆ purgeOwnPepItems()

QXmppPubSubManager::purgeOwnPepItems ( const QString &  nodeName)
inline

Purges all items from a PEP node.

This is a convenience method equivalent to calling QXmppPubSubManager::purgeItems on the current account's bare JID.

Parameters
nodeNamethe name of the PEP node to delete along with all of its items
Returns

◆ requestAffiliations() [1/2]

QXmppTask< QXmppPubSubManager::AffiliationsResult > QXmppPubSubManager::requestAffiliations ( const QString &  jid)

Requests the user's affiliations with all PubSub nodes on a PubSub service.

Parameters
jidJID of the pubsub service
Returns

◆ requestAffiliations() [2/2]

QXmppTask< QXmppPubSubManager::AffiliationsResult > QXmppPubSubManager::requestAffiliations ( const QString &  jid,
const QString &  nodeName 
)

Requests the user's affiliations with a PubSub node.

Parameters
jidJID of the pubsub service
nodeNameName of the pubsub node on the service.
Returns

◆ requestItem() [1/2]

template<typename T >
QXmppTask< QXmppPubSubManager::ItemResult< T > > QXmppPubSubManager::requestItem ( const QString &  jid,
const QString &  nodeName,
const QString &  itemId 
)

Requests a specific item of an entity's node.

Parameters
jidJabber ID of the entity hosting the pubsub service. For PEP this should be an account's bare JID
nodeNamethe name of the node to query
itemIdthe ID of the item to retrieve
Returns

◆ requestItem() [2/2]

template<typename T >
QXmppTask< QXmppPubSubManager::ItemResult< T > > QXmppPubSubManager::requestItem ( const QString &  jid,
const QString &  nodeName,
StandardItemId  itemId 
)

Requests a specific item of an entity's node.

Parameters
jidJabber ID of the entity hosting the pubsub service. For PEP this should be an account's bare JID
nodeNamethe name of the node to query
itemIdthe ID of the item to retrieve
Returns

◆ requestItemIds()

QXmppTask< QXmppPubSubManager::ItemIdsResult > QXmppPubSubManager::requestItemIds ( const QString &  serviceJid,
const QString &  nodeName 
)

Requests the IDs of all items of a pubsub service node via service discovery.

This uses a XEP-0030: Service Discovery items request to get a list of items.

Parameters
serviceJidJID of the entity hosting the pubsub service
nodeNamethe name of the node whose items are requested
Returns

◆ requestItems() [1/2]

template<typename T >
QXmppTask< QXmppPubSubManager::ItemsResult< T > > QXmppPubSubManager::requestItems ( const QString &  jid,
const QString &  nodeName 
)

Requests all items of an entity's node.

Parameters
jidJabber ID of the entity hosting the pubsub service. For PEP this should be an account's bare JID
nodeNamethe name of the node to query
Returns

◆ requestItems() [2/2]

template<typename T >
QXmppTask< QXmppPubSubManager::ItemsResult< T > > QXmppPubSubManager::requestItems ( const QString &  jid,
const QString &  nodeName,
const QStringList &  itemIds 
)

Requests items of an entity's node.

Parameters
jidJabber ID of the entity hosting the pubsub service. For PEP this should be an account's bare JID
nodeNamethe name of the node to query
itemIdsthe IDs of the items to retrieve. If empty, retrieves all items
Returns

◆ requestNodeAffiliations()

QXmppTask< QXmppPubSubManager::AffiliationsResult > QXmppPubSubManager::requestNodeAffiliations ( const QString &  jid,
const QString &  nodeName 
)

Requests the affiliations of all users on a PubSub node.

This can be used to view and manage affiliations of other users with a node. Owner privileges are required.

Parameters
jidJID of the pubsub service
nodeNameName of the pubsub node on the service.
Returns

◆ requestNodeConfiguration()

QXmppTask< QXmppPubSubManager::NodeConfigResult > QXmppPubSubManager::requestNodeConfiguration ( const QString &  service,
const QString &  nodeName 
)

Requests the node configuration and starts the configuration process.

Requires owner privileges. If the result is successful (a node config form has been returned) this starts the configuration process. The next step is to call configureNode() or cancelNodeConfiguration().

Parameters
serviceJID of the pubsub service
nodeNameName of the pubsub node on the service
Returns
See also
configureNode()
cancelNodeConfiguration()

◆ requestNodes()

QXmppTask< QXmppPubSubManager::NodesResult > QXmppPubSubManager::requestNodes ( const QString &  jid)

Requests all listed nodes of a pubsub service via service discovery.

This uses a XEP-0030: Service Discovery items request to get a list of nodes.

Parameters
jidJabber ID of the entity hosting the pubsub service
Returns

◆ requestOwnPepItem() [1/2]

template<typename T = QXmppPubSubBaseItem>
QXmppPubSubManager::requestOwnPepItem ( const QString &  nodeName,
const QString &  itemId 
)
inline

Requests a specific item of a PEP node.

This is a convenience method equivalent to calling QXmppPubSubManager::requestItem on the current account's bare JID.

Parameters
nodeNamename of the PEP node whose item is requested
itemIdID of the requested item

◆ requestOwnPepItem() [2/2]

template<typename T = QXmppPubSubBaseItem>
QXmppPubSubManager::requestOwnPepItem ( const QString &  nodeName,
StandardItemId  itemId 
)
inline

Requests a specific item of a PEP node.

This is a convenience method equivalent to calling QXmppPubSubManager::requestItem on the current account's bare JID.

Parameters
nodeNamename of the PEP node whose item is requested
itemIdID of the requested item

◆ requestOwnPepItemIds()

QXmppPubSubManager::requestOwnPepItemIds ( const QString &  nodeName)
inline

Requests the IDs of all items of a pubsub service node via service discovery.

This is a convenience method equivalent to calling QXmppPubSubManager::requestItemIds on the current account's bare JID.

Parameters
nodeNamename of the PEP node whose item IDs are requested

◆ requestOwnPepItems()

template<typename T = QXmppPubSubBaseItem>
QXmppPubSubManager::requestOwnPepItems ( const QString &  nodeName)
inline

Requests all items of a PEP node.

This is a convenience method equivalent to calling QXmppPubSubManager::requestItems on the current account's bare JID.

Parameters
nodeNamename of the PEP node whose items are requested

◆ requestOwnPepNodeConfiguration()

QXmppPubSubManager::requestOwnPepNodeConfiguration ( const QString &  nodeName)
inline

Requests the node configuration and starts the configuration process.

This is a convenience method equivalent to calling requestNodeConfiguration() the current account's bare JID.

Parameters
nodeNameName of the pubsub node on the service
Returns
See also
configureOwnPepNode()
cancelOwnPepNodeConfiguration()

◆ requestOwnPepNodes()

QXmppPubSubManager::requestOwnPepNodes ( )
inline

Requests all listed nodes of the own PEP service via service discovery.

This is a convenience method equivalent to calling QXmppPubSubManager::fetchNodes on the current account's bare JID.

◆ requestSubscribeOptions() [1/2]

QXmppTask< QXmppPubSubManager::OptionsResult > QXmppPubSubManager::requestSubscribeOptions ( const QString &  service,
const QString &  nodeName 
)

Requests the subscribe options form of the own subscription to a node.

Parameters
serviceJID of the pubsub service
nodeNameName of the pubsub node on the service.
Returns

◆ requestSubscribeOptions() [2/2]

QXmppTask< QXmppPubSubManager::OptionsResult > QXmppPubSubManager::requestSubscribeOptions ( const QString &  service,
const QString &  nodeName,
const QString &  subscriberJid 
)

Requests the subscribe options form of a user's subscription to a node.

Parameters
serviceJID of the pubsub service
nodeNameName of the pubsub node on the service
subscriberJidJID of the user to request the options for
Returns

◆ requestSubscriptions() [1/2]

QXmppTask< QXmppPubSubManager::SubscriptionsResult > QXmppPubSubManager::requestSubscriptions ( const QString &  jid)

Requests all subscriptions with a PubSub service.

Parameters
jidJID of the pubsub service
Returns

◆ requestSubscriptions() [2/2]

QXmppTask< QXmppPubSubManager::SubscriptionsResult > QXmppPubSubManager::requestSubscriptions ( const QString &  jid,
const QString &  nodeName 
)

Requests the subscription(s) with a specific PubSub node.

Parameters
jidJID of the pubsub service
nodeNameName of the node on the pubsub service
Returns

◆ retractItem() [1/2]

auto QXmppPubSubManager::retractItem ( const QString &  jid,
const QString &  nodeName,
const QString &  itemId 
)

Deletes an item from a pubsub node.

Parameters
jidJabber ID of the entity hosting the pubsub service
nodeNamethe name of the node to delete the item from
itemIdthe ID of the item to delete
Returns

◆ retractItem() [2/2]

auto QXmppPubSubManager::retractItem ( const QString &  jid,
const QString &  nodeName,
StandardItemId  itemId 
)

Deletes an item from a pubsub node.

Parameters
jidJabber ID of the entity hosting the pubsub service
nodeNamethe name of the node to delete the item from
itemIdthe ID of the item to delete

◆ retractOwnPepItem() [1/2]

QXmppPubSubManager::retractOwnPepItem ( const QString &  nodeName,
const QString &  itemId 
)
inline

Deletes an item from a PEP node.

This is a convenience method equivalent to calling QXmppPubSubManager::retractItem on the current account's bare JID.

Parameters
nodeNamethe name of the PEP node to delete the item from
itemIdthe ID of the item to delete

◆ retractOwnPepItem() [2/2]

QXmppPubSubManager::retractOwnPepItem ( const QString &  nodeName,
StandardItemId  itemId 
)
inline

Deletes an item from a PEP node.

This is a convenience method equivalent to calling QXmppPubSubManager::retractItem on the current account's bare JID.

Parameters
nodeNamethe name of the PEP node to delete the item from
itemIdthe ID of the item to delete

◆ setSubscribeOptions() [1/2]

QXmppTask< QXmppPubSubManager::Result > QXmppPubSubManager::setSubscribeOptions ( const QString &  service,
const QString &  nodeName,
const QXmppPubSubSubscribeOptions &  options 
)

Sets the subscription options for our own account.

Parameters
serviceJID of the pubsub service
nodeNameName of the pubsub node on the service
optionsThe new options to be set
Returns

◆ setSubscribeOptions() [2/2]

QXmppTask< QXmppPubSubManager::Result > QXmppPubSubManager::setSubscribeOptions ( const QString &  service,
const QString &  nodeName,
const QXmppPubSubSubscribeOptions &  options,
const QString &  subscriberJid 
)

Sets the subscription options for another users's account.

Parameters
serviceJID of the pubsub service
nodeNameName of the pubsub node on the service
optionsThe new options to be set
subscriberJidThe JID of the user
Returns

◆ standardItemIdToString()

QString QXmppPubSubManager::standardItemIdToString ( StandardItemId  itemId)
static

Returns a standard item ID string.

Parameters
itemIdstandard item ID to be translated
Returns
the item ID string or a default-constructed string if there is no corresponding one

◆ subscribeToNode()

QXmppTask< QXmppPubSubManager::Result > QXmppPubSubManager::subscribeToNode ( const QString &  serviceJid,
const QString &  nodeName,
const QString &  subscriberJid 
)

Subscribes to a node.

Warning
THIS API IS NOT FINALIZED YET!
Parameters
serviceJidJID of the pubsub service
nodeNamename of the pubsub node being subscribed
subscriberJidbare or full JID of the subscriber

◆ unsubscribeFromNode()

QXmppTask< QXmppPubSubManager::Result > QXmppPubSubManager::unsubscribeFromNode ( const QString &  serviceJid,
const QString &  nodeName,
const QString &  subscriberJid 
)

Unsubscribes from a node.

Warning
THIS API IS NOT FINALIZED YET!
Parameters
serviceJidJID of the pubsub service
nodeNamename of the pubsub node being subscribed
subscriberJidbare or full JID of the subscriber

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