gloox  1.0
Public Member Functions | List of all members
PrivateXML Class Reference

#include <privatexml.h>

Inheritance diagram for PrivateXML:
Inheritance graph
[legend]

Public Member Functions

 PrivateXML (ClientBase *parent)
virtual ~PrivateXML ()
std::string requestXML (const std::string &tag, const std::string &xmlns, PrivateXMLHandler *pxh)
std::string storeXML (const Tag *tag, PrivateXMLHandler *pxh)
virtual bool handleIq (const IQ &iq)
virtual void handleIqID (const IQ &iq, int context)
- Public Member Functions inherited from IqHandler
virtual ~IqHandler ()

Detailed Description

This class implements XEP-0049 (Private XML Storage).

Author
Jakob Schroeter js@ca.nosp@m.maya.nosp@m..net

Definition at line 37 of file privatexml.h.

Constructor & Destructor Documentation

PrivateXML ( ClientBase parent)

Constructor. Creates a new PrivateXML client that registers as IqHandler with ClientBase.

Parameters
parentThe ClientBase used for XMPP communication

Definition at line 54 of file privatexml.cpp.

~PrivateXML ( )
virtual

Virtual destructor.

Definition at line 64 of file privatexml.cpp.

Member Function Documentation

virtual bool handleIq ( const IQ iq)
inlinevirtual

Reimplement this function if you want to be notified about incoming IQs.

Parameters
iqThe complete IQ stanza.
Returns
Indicates whether a request of type 'get' or 'set' has been handled. This includes the obligatory 'result' answer. If you return false, a 'error' will be sent.
Since
1.0

Implements IqHandler.

Definition at line 72 of file privatexml.h.

void handleIqID ( const IQ iq,
int  context 
)
virtual

Reimplement this function if you want to be notified about incoming IQs with a specific value of the id attribute. You have to enable tracking of those IDs using Client::trackID(). This is usually useful for IDs that generate a positive reply, i.e. <iq type='result' id='reg'/> where a namespace filter wouldn't work.

Parameters
iqThe complete IQ stanza.
contextA value to restore context, stored with ClientBase::trackID().
Note
Only IQ stanzas of type 'result' or 'error' can arrive here.
Since
1.0

Implements IqHandler.

Definition at line 101 of file privatexml.cpp.

std::string requestXML ( const std::string &  tag,
const std::string &  xmlns,
PrivateXMLHandler pxh 
)

Use this function to request the private XML stored in the given namespace.

Parameters
tagChild element of the query element used to identify the requested XML fragment.
xmlnsThe namespace which qualifies the tag.
pxhThe handler to receive the result.
Returns
The ID of the sent query.

Definition at line 74 of file privatexml.cpp.

std::string storeXML ( const Tag tag,
PrivateXMLHandler pxh 
)

Use this function to store private XML stored in the given namespace.

Parameters
tagThe XML to store. This is the complete tag including the unique namespace. It is deleted automatically after sending it.
pxhThe handler to receive the result.
Returns
The ID of the sent query.

Definition at line 88 of file privatexml.cpp.


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