QXmpp  Version:1.0.0
Public Slots | Signals | Public Member Functions | Protected Member Functions | List of all members
QXmppStream Class Referenceabstract

The QXmppStream class is the base class for all XMPP streams. More...

#include <QXmppStream.h>

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

Public Slots

virtual void disconnectFromHost ()
 
virtual bool sendData (const QByteArray &)
 

Signals

void connected ()
 This signal is emitted when the stream is connected.
 
void disconnected ()
 This signal is emitted when the stream is disconnected.
 
- 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.
 

Public Member Functions

 QXmppStream (QObject *parent)
 
 ~QXmppStream ()
 Destroys a base XMPP stream.
 
virtual bool isConnected () const
 
bool sendPacket (const QXmppStanza &)
 
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=0)
 

Protected Member Functions

QSslSocket * socket () const
 
void setSocket (QSslSocket *socket)
 
virtual void handleStart ()
 
virtual void handleStanza (const QDomElement &element)=0
 
virtual void handleStream (const QDomElement &element)=0
 
void enableStreamManagement (bool resetSequenceNumber)
 
unsigned lastIncomingSequenceNumber () const
 Returns the sequence number of the last incoming stanza (XEP-0198).
 
void setAcknowledgedSequenceNumber (unsigned sequenceNumber)
 Sets the last acknowledged sequence number for outgoing stanzas (XEP-0198).
 
- 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 QXmppStream class is the base class for all XMPP streams.

Constructor & Destructor Documentation

◆ QXmppStream()

QXmppStream::QXmppStream ( QObject *  parent)

Constructs a base XMPP stream.

Parameters
parent

Member Function Documentation

◆ disconnectFromHost

void QXmppStream::disconnectFromHost ( )
virtualslot

Disconnects from the remote host.

◆ enableStreamManagement()

void QXmppStream::enableStreamManagement ( bool  resetSequenceNumber)
protected

Enables Stream Management acks / reqs (XEP-0198).

Parameters
resetSeqnoIndicates if the sequence numbers should be reset. This must be done iff the stream is not resumed.

Enables Stream Management acks / reqs (XEP-0198).

Parameters
resetSequenceNumberIndicates if the sequence numbers should be reset. This must be done iff the stream is not resumed.

◆ handleStanza()

virtual void QXmppStream::handleStanza ( const QDomElement &  element)
protectedpure virtual

Handles an incoming XMPP stanza.

Parameters
element

◆ handleStart()

void QXmppStream::handleStart ( )
protectedvirtual

Handles a stream start event, which occurs when the underlying transport becomes ready (socket connected, encryption started).

If you redefine handleStart(), make sure to call the base class's method.

◆ handleStream()

virtual void QXmppStream::handleStream ( const QDomElement &  element)
protectedpure virtual

Handles an incoming XMPP stream start.

Parameters
element

◆ isConnected()

bool QXmppStream::isConnected ( ) const
virtual

Returns true if the stream is connected.

Reimplemented in QXmppOutgoingClient, QXmppOutgoingServer, QXmppIncomingClient, and QXmppIncomingServer.

◆ sendData

bool QXmppStream::sendData ( const QByteArray &  data)
virtualslot

Sends raw data to the peer.

Parameters
data

◆ sendPacket()

bool QXmppStream::sendPacket ( const QXmppStanza packet)

Sends an XMPP packet to the peer.

Parameters
packet

◆ setSocket()

void QXmppStream::setSocket ( QSslSocket *  socket)
protected

Sets the QSslSocket used for this stream.

◆ socket()

QSslSocket * QXmppStream::socket ( ) const
protected

Returns the QSslSocket used for this stream.


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