forward.h
/*
Copyright (c) 2013-2023 by Jakob Schröter <js@camaya.net>
This file is part of the gloox library. http://camaya.net/gloox
This software is distributed under a license. The full license
agreement can be found in the file LICENSE in this distribution.
This software may not be copied, modified, sold or distributed
other than expressed in the named license agreement.
This software is distributed without any warranty.
*/
#ifndef FORWARD_H__
#define FORWARD_H__
#include "stanzaextension.h"
#include <string>
namespace gloox
{
class DelayedDelivery;
class Stanza;
class GLOOX_API Forward : public StanzaExtension
{
public:
Forward( Stanza* stanza, DelayedDelivery* delay );
Forward( const Tag* tag = 0 );
virtual ~Forward();
const DelayedDelivery* when() const { return m_delay; }
// reimplemented from StanzaExtension
virtual Stanza* embeddedStanza() const { return m_stanza; }
// reimplemented from StanzaExtension
virtual Tag* embeddedTag() const { return m_tag; }
// reimplemented from StanzaExtension
virtual Tag* tag() const;
// reimplemented from StanzaExtension
const std::string& filterString() const;
// reimplemented from StanzaExtension
StanzaExtension* newInstance( const Tag* tag ) const
{
return new Forward( tag );
}
// reimplemented from StanzaExtension
StanzaExtension* clone() const;
private:
Stanza* m_stanza;
Tag* m_tag;
DelayedDelivery* m_delay;
};
}
#endif // FORWARD_H__
gloox::DelayedDelivery
This is an implementation of XEP-0203 (Delayed Delivery).
Definition delayeddelivery.h:39
gloox::Forward::newInstance
StanzaExtension * newInstance(const Tag *tag) const
Definition forward.h:87
gloox::Forward::embeddedTag
virtual Tag * embeddedTag() const
Definition forward.h:78
gloox::Forward::when
const DelayedDelivery * when() const
Definition forward.h:72
gloox::Forward::embeddedStanza
virtual Stanza * embeddedStanza() const
Definition forward.h:75
gloox::Forward::Forward
Forward(Stanza *stanza, DelayedDelivery *delay)
Definition forward.cpp:24
gloox::Forward::tag
virtual Tag * tag() const
Definition forward.cpp:62
gloox::StanzaExtension
This class abstracts a stanza extension, which is usually an XML child element in a specific namespac...
Definition stanzaextension.h:204
gloox::StanzaExtension::StanzaExtension
StanzaExtension(int type)
Definition stanzaextension.h:211
gloox::Stanza
This is the base class for XMPP stanza abstractions.
Definition stanza.h:34
gloox::Tag
This is an abstraction of an XML element.
Definition tag.h:47
gloox
The namespace for the gloox library.
Definition adhoc.cpp:28