QXmpp Version: 1.10.0
Public Types | Public Member Functions | Static Public Member Functions | List of all members
QXmppPubSubSubscription Class Reference

Public Types

enum  State : uint8_t {
  Invalid , None , Pending , Subscribed ,
  Unconfigured
}
 
enum  ConfigurationSupport : uint8_t { Unavailable , Available , Required }
 

Public Member Functions

 QXmppPubSubSubscription (const QString &jid={}, const QString &node={}, const QString &subId={}, State state=Invalid, ConfigurationSupport configurationSupport=Unavailable, const QDateTime &expiry={})
 
 QXmppPubSubSubscription (const QXmppPubSubSubscription &)
 Copy contructor.
 
 QXmppPubSubSubscription (QXmppPubSubSubscription &&)
 Move contructor.
 
QXmppPubSubSubscriptionoperator= (const QXmppPubSubSubscription &)
 Copy assignment operator.
 
QXmppPubSubSubscriptionoperator= (QXmppPubSubSubscription &&)
 Move-assignment operator.
 
QString jid () const
 
void setJid (const QString &jid)
 
QString node () const
 
void setNode (const QString &node)
 
QString subId () const
 
void setSubId (const QString &subId)
 
QDateTime expiry () const
 
void setExpiry (const QDateTime &expiry)
 
State state () const
 
void setState (State state)
 
ConfigurationSupport configurationSupport () const
 
void setConfigurationSupport (ConfigurationSupport support)
 
bool isConfigurationSupported () const
 
bool isConfigurationRequired () const
 

Static Public Member Functions

static QString stateToString (State)
 
static State stateFromString (const QString &)
 
static bool isSubscription (const QDomElement &)
 

Detailed Description

The QXmppPubSubSubscription class represents a PubSub subscription contained in event notifications and IQ requests, as defined in XEP-0060: Publish- Subscribe.

Since
QXmpp 1.5

Member Enumeration Documentation

◆ ConfigurationSupport

The SubscribeOptionsSupport enum describes whether the availability of a subscription configuration. This is also known as <subscribe-options/>.

Enumerator
Unavailable 

A subscription configuration is not advertised.

Available 

Configuration of the subscription is possible, but not required.

Required 

Configuration of the subscription is required. No event notifications are going to be sent until the subscription has been configured.

◆ State

The State enum describes the state of a subscription.

Enumerator
Invalid 

No state information is included.

None 

There is no subscription with the node.

Pending 

A subscription is pending.

Subscribed 

The user is subscribed to the node.

Unconfigured 

The subscription requires configuration before it becomes active.

Constructor & Destructor Documentation

◆ QXmppPubSubSubscription()

QXmppPubSubSubscription::QXmppPubSubSubscription ( const QString &  jid = {},
const QString &  node = {},
const QString &  subId = {},
State  state = Invalid,
ConfigurationSupport  configurationSupport = Unavailable,
const QDateTime &  expiry = {} 
)

Creates a new QXmppPubSubSubscription.

Parameters
jid
node
subId
state
configurationSupport
expiry

Member Function Documentation

◆ configurationSupport()

QXmppPubSubSubscription::ConfigurationSupport QXmppPubSubSubscription::configurationSupport ( ) const

Returns the availability of a subscription configuration.

◆ expiry()

QDateTime QXmppPubSubSubscription::expiry ( ) const

Returns the expiry date of the subscription.

If this timestamp is valid, the subscription is going to be cancelled at this date.

◆ isConfigurationRequired()

bool QXmppPubSubSubscription::isConfigurationRequired ( ) const

Returns whether configuration of the subscription required before event notifications are going to be sent to the user.

◆ isConfigurationSupported()

bool QXmppPubSubSubscription::isConfigurationSupported ( ) const

Returns whether a configuration of the subscription is possible.

◆ isSubscription()

bool QXmppPubSubSubscription::isSubscription ( const QDomElement &  element)
static

Returns true, if the element is a PubSub subscription element.

◆ jid()

QString QXmppPubSubSubscription::jid ( ) const

Returns the JID of the user of this subscription.

◆ node()

QString QXmppPubSubSubscription::node ( ) const

Returns the node name of this subscription.

◆ setConfigurationSupport()

void QXmppPubSubSubscription::setConfigurationSupport ( ConfigurationSupport  support)

Sets the availability of a subscription configuration.

◆ setExpiry()

void QXmppPubSubSubscription::setExpiry ( const QDateTime &  expiry)

Sets the expiry date of the subscription.

If this timestamp is valid, the subscription is going to be cancelled at this date.

◆ setJid()

void QXmppPubSubSubscription::setJid ( const QString &  jid)

Sets the JID of the user of this subscription.

◆ setNode()

void QXmppPubSubSubscription::setNode ( const QString &  node)

Sets the node name of this subscription.

◆ setState()

void QXmppPubSubSubscription::setState ( State  state)

Sets the state of the subscription.

◆ setSubId()

void QXmppPubSubSubscription::setSubId ( const QString &  subId)

Sets the subscription ID (may be empty).

◆ state()

QXmppPubSubSubscription::State QXmppPubSubSubscription::state ( ) const

Returns the state of the subscription.

◆ stateFromString()

QXmppPubSubSubscription::State QXmppPubSubSubscription::stateFromString ( const QString &  str)
static

Converts a string with a subscription state to the enum value.

◆ stateToString()

QString QXmppPubSubSubscription::stateToString ( State  state)
static

Converts a subscription state to string.

◆ subId()

QString QXmppPubSubSubscription::subId ( ) const

Returns the subscription ID (may be empty).


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