carbons.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 CARBONS_H__
#define CARBONS_H__
#include "macros.h"
#include "stanzaextension.h"
#include "tag.h"
namespace gloox
{
class Forward;
class GLOOX_API Carbons : public StanzaExtension
{
public:
enum Type
{
Received,
Sent,
Enable,
Disable,
Private,
Invalid
};
Carbons( Type type );
Carbons( const Tag* tag = 0 );
virtual ~Carbons();
Type type() const { return m_type; }
// reimplemented from StanzaExtension
virtual Stanza* embeddedStanza() const;
// reimplemented from StanzaExtension
virtual Tag* embeddedTag() const;
// reimplemented from StanzaExtension
virtual const std::string& filterString() const;
// reimplemented from StanzaExtension
virtual StanzaExtension* newInstance( const Tag* tag ) const
{
return new Carbons( tag );
}
// reimplemented from StanzaExtension
virtual Tag* tag() const;
// reimplemented from StanzaExtension
virtual StanzaExtension* clone() const;
private:
Forward* m_forward;
Type m_type;
};
}
#endif // CARBONS_H__
gloox::Carbons
An implementation of Message Carbons (XEP-0280) as a StanzaExtension.
Definition carbons.h:117
gloox::Carbons::Type
Type
Definition carbons.h:123
gloox::Carbons::Sent
@ Sent
Definition carbons.h:125
gloox::Carbons::Received
@ Received
Definition carbons.h:124
gloox::Carbons::Enable
@ Enable
Definition carbons.h:126
gloox::Carbons::Disable
@ Disable
Definition carbons.h:127
gloox::Carbons::Private
@ Private
Definition carbons.h:128
gloox::Carbons::Invalid
@ Invalid
Definition carbons.h:129
gloox::Carbons::Carbons
Carbons(Type type)
Definition carbons.cpp:30
gloox::Carbons::newInstance
virtual StanzaExtension * newInstance(const Tag *tag) const
Definition carbons.h:166
gloox::Carbons::type
Type type() const
Definition carbons.h:154
gloox::Carbons::tag
virtual Tag * tag() const
Definition carbons.cpp:86
gloox::Forward
This is an implementation of Stanza Forwarding (XEP-0297) as a StanzaExtension.
Definition forward.h:41
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