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

#include <forward.h>

Inheritance diagram for Forward:
Inheritance graph
[legend]

Public Member Functions

 Forward (Stanza *stanza, DelayedDelivery *delay)
 
 Forward (const Tag *tag=0)
 
virtual ~Forward ()
 
const DelayedDeliverywhen () const
 
virtual StanzaembeddedStanza () const
 
virtual TagembeddedTag () const
 
virtual Tagtag () const
 
const std::string & filterString () const
 
StanzaExtensionnewInstance (const Tag *tag) const
 
StanzaExtensionclone () const
 
- Public Member Functions inherited from StanzaExtension
 StanzaExtension (int type)
 
virtual ~StanzaExtension ()
 
int extensionType () const
 

Detailed Description

This is an implementation of Stanza Forwarding (XEP-0297) as a StanzaExtension.

Note
At this point, Forward can only hold forwarded Messages, not IQ or Presence. However, Forward can be used inside any type of stanza (<message>, <iq>, or <presence>).

XEP-Version: 0.5

Author
Jakob Schröter js@ca.nosp@m.maya.nosp@m..net
Fernando Sanchez
Since
1.0.5

Definition at line 40 of file forward.h.

Constructor & Destructor Documentation

◆ Forward() [1/2]

Forward ( Stanza stanza,
DelayedDelivery delay 
)

Creates a forwarding StanzaExtension, embedding the given Stanza and DelayedDelivery objects.

Parameters
stanzaThe forwarded Stanza. This Forward instance will own the Stanza object.
delayThe date/time the forwarded stanza was received at by the forwarder. This Forward instance will own the DelayedDelivery object.

Definition at line 24 of file forward.cpp.

◆ Forward() [2/2]

Forward ( const Tag tag = 0)

Creates a forwarding Stanza from the given Tag. The original Tag will be ripped off. If a valid Stanza is conatined (as a child) in the Tag it will be parsed, too. It can then be accessed through embeddedStanza(). The Tag that the Stanza was built from is available through embeddedTag().

Parameters
tagThe Tag to parse.

Definition at line 30 of file forward.cpp.

◆ ~Forward()

~Forward ( )
virtual

Virtual destructor.

Definition at line 47 of file forward.cpp.

Member Function Documentation

◆ clone()

StanzaExtension * clone ( ) const
virtual

Returns an identical copy of the current StanzaExtension.

Returns
An identical copy of the current StanzaExtension.

Implements StanzaExtension.

Definition at line 83 of file forward.cpp.

◆ embeddedStanza()

virtual Stanza* embeddedStanza ( ) const
inlinevirtual

This function returns the embedded Stanza, if any. You only have to reimplement it if your protocol flow contains embedded Stanzas.

Returns
The embedded Stanza. May be 0.

Reimplemented from StanzaExtension.

Definition at line 75 of file forward.h.

◆ embeddedTag()

virtual Tag* embeddedTag ( ) const
inlinevirtual

This function returns the embedded Tag that the embedded Stanza is based on, if any. You only have to reimplement it if your protocol flow contains embedded Stanzas.

Returns
The embedded Tag. May be 0.

Reimplemented from StanzaExtension.

Definition at line 78 of file forward.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 54 of file forward.cpp.

◆ newInstance()

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 );
}
virtual Tag * tag() const
Definition: forward.cpp:62
Returns
The derived extension's new instance.

Implements StanzaExtension.

Definition at line 87 of file forward.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 62 of file forward.cpp.

◆ when()

const DelayedDelivery* when ( ) const
inline

This function returns a pointer to a DelayedDelivery StanzaExtension which indicates when the forwarder originally received the forwarded stanza.

Returns
A pointer to a DelayedDelivery object. May be 0.

Definition at line 72 of file forward.h.


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