gloox  1.0.28
Public Member Functions | List of all members
MessageEvent Class Reference

#include <messageevent.h>

Inheritance diagram for MessageEvent:
Inheritance graph
[legend]

Public Member Functions

 MessageEvent (const Tag *tag)
 
 MessageEvent (int type, const std::string &id=EmptyString)
 
virtual ~MessageEvent ()
 
int event () const
 
std::string id () const
 
virtual const std::string & filterString () const
 
virtual StanzaExtensionnewInstance (const Tag *tag) const
 
Tagtag () const
 
virtual StanzaExtensionclone () const
 
- Public Member Functions inherited from StanzaExtension
 StanzaExtension (int type)
 
virtual ~StanzaExtension ()
 
virtual StanzaembeddedStanza () const
 
virtual TagembeddedTag () const
 
int extensionType () const
 

Detailed Description

An implementation of Message Events (XEP-0022) as a StanzaExtension.

Author
Jakob Schröter js@ca.nosp@m.maya.nosp@m..net
Since
1.0

Definition at line 32 of file messageevent.h.

Constructor & Destructor Documentation

◆ MessageEvent() [1/2]

MessageEvent ( const Tag tag)

Constructs a new object from the given Tag.

Parameters
tagA Tag to parse.

Definition at line 28 of file messageevent.cpp.

◆ MessageEvent() [2/2]

MessageEvent ( int  type,
const std::string &  id = EmptyString 
)
inline

Constructs a new object of the given type, with an optional message ID.

Parameters
typeOne or more MessageEventType .
idAn optional message ID. Links this Event to the message it is generated for.

Definition at line 47 of file messageevent.h.

◆ ~MessageEvent()

virtual ~MessageEvent ( )
inlinevirtual

Virtual destructor.

Definition at line 54 of file messageevent.h.

Member Function Documentation

◆ clone()

virtual StanzaExtension* clone ( ) const
inlinevirtual

Returns an identical copy of the current StanzaExtension.

Returns
An identical copy of the current StanzaExtension.

Implements StanzaExtension.

Definition at line 81 of file messageevent.h.

◆ event()

int event ( ) const
inline

Returns the object's event or events.

Returns
The object's event or events.

Definition at line 60 of file messageevent.h.

◆ filterString()

const std::string & filterString ( ) const
virtual

Returns an XPath expression that describes a path to child elements of a stanza that an extension handles.

Returns
The extension's filter string.

Implements StanzaExtension.

Definition at line 47 of file messageevent.cpp.

◆ id()

std::string id ( ) const
inline

Returns the event's ID.

Returns
The event's ID.

Definition at line 66 of file messageevent.h.

◆ newInstance()

virtual StanzaExtension* newInstance ( const Tag tag) const
inlinevirtual

Returns a new Instance of the derived type. Usually, for a derived class FooExtension, the implementation of this function looks like:

StanzaExtension* FooExtension::newInstance( const Tag* tag ) const
{
return new FooExtension( tag );
}
Tag * tag() const
Returns
The derived extension's new instance.

Implements StanzaExtension.

Definition at line 72 of file messageevent.h.

◆ tag()

Tag * tag ( ) const
virtual

Returns a Tag representation of the extension.

Returns
A Tag representation of the extension.

Implements StanzaExtension.

Definition at line 53 of file messageevent.cpp.


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