# XMPP::BaseStreamHandler Class Reference

`#include <xmpp.h>`

Inheritance diagram for XMPP::BaseStreamHandler:

List of all members.

## Public Member Functions

| BaseStreamHandler ()
| ~BaseStreamHandler ()
virtual PBoolean | Start (Transport *transport=0)
virtual PBoolean | Stop (const PString &error=PString::Empty())
void | SetAutoReconnect (PBoolean b=true, long timeout=1000)
PNotifierList & | ElementHandlers ()
Stream * | GetStream ()
virtual PBoolean | Write (const void *buf, PINDEX len)
virtual PBoolean | Write (const PString &data)
virtual PBoolean | Write (const PXML &pdu)
virtual void | OnElement (PXML &pdu)
virtual void | Main ()
| User override function for the main execution routine of the thread.

## Protected Member Functions

| PDECLARE_NOTIFIER (Stream, BaseStreamHandler, OnOpen)
| PDECLARE_NOTIFIER (Stream, BaseStreamHandler, OnClose)

## Protected Attributes

Stream * | m_Stream
PBoolean | m_AutoReconnect
PTimeInterval | m_ReconnectTimeout
PNotifierList | m_ElementHandlers

## Constructor & Destructor Documentation

XMPP::BaseStreamHandler::BaseStreamHandler | ( |  | ) |

XMPP::BaseStreamHandler::~BaseStreamHandler | ( |  | ) |

## Member Function Documentation

PNotifierList& XMPP::BaseStreamHandler::ElementHandlers | ( |  | ) | `[inline]`

Stream* XMPP::BaseStreamHandler::GetStream | ( |  | ) | `[inline]`

virtual void XMPP::BaseStreamHandler::Main | ( |  | ) | `[virtual]`

User override function for the main execution routine of the thread.

A descendent class must provide the code that will be executed in the thread within this function.

Note that the correct way for a thread to terminate is to return from this function.

Implements PThread.

virtual void XMPP::BaseStreamHandler::OnElement | ( | PXML & | pdu | ) | `[virtual]`

Reimplemented in XMPP::C2S::StreamHandler.

XMPP::BaseStreamHandler::PDECLARE_NOTIFIER | ( | Stream | ,
|  | BaseStreamHandler | ,
|  | OnClose |  |
| ) |  |  | `[protected]`

XMPP::BaseStreamHandler::PDECLARE_NOTIFIER | ( | Stream | ,
|  | BaseStreamHandler | ,
|  | OnOpen |  |
| ) |  |  | `[protected]`

void XMPP::BaseStreamHandler::SetAutoReconnect | ( | PBoolean | b = `true`,
|  | long | timeout = `1000` |
| ) |  |  |

virtual PBoolean XMPP::BaseStreamHandler::Start | ( | Transport * | transport = `0` | ) | `[virtual]`

Reimplemented in XMPP::C2S::StreamHandler.

virtual PBoolean XMPP::BaseStreamHandler::Stop | ( | const PString & | error = `PString::Empty()` | ) | `[virtual]`

virtual PBoolean XMPP::BaseStreamHandler::Write | ( | const PXML & | pdu | ) | `[virtual]`

virtual PBoolean XMPP::BaseStreamHandler::Write | ( | const PString & | data | ) | `[virtual]`

virtual PBoolean XMPP::BaseStreamHandler::Write | ( | const void * | buf,
|  | PINDEX | len |
| ) |  |  | `[virtual]`

## Member Data Documentation

PBoolean XMPP::BaseStreamHandler::m_AutoReconnect `[protected]`

PNotifierList XMPP::BaseStreamHandler::m_ElementHandlers `[protected]`

PTimeInterval XMPP::BaseStreamHandler::m_ReconnectTimeout `[protected]`

Stream* XMPP::BaseStreamHandler::m_Stream `[protected]`

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

- xmpp.h